Mercurial > repos > davidvanzessen > mutation_analysis
diff aa_histogram.r @ 105:e4957ad476a2 draft
Uploaded
author | davidvanzessen |
---|---|
date | Thu, 23 Jun 2016 03:58:03 -0400 |
parents | 603a10976e9c |
children | 01c9993865af |
line wrap: on
line diff
--- a/aa_histogram.r Wed Jun 22 10:07:28 2016 -0400 +++ b/aa_histogram.r Thu Jun 23 03:58:03 2016 -0400 @@ -20,20 +20,8 @@ dat_freq = mutations.at.position / aa.at.position dat_dt = data.frame(i=1:length(dat_freq), freq=dat_freq) -print("---------------- weird stuff ----------------") - -options(width=220) - -print(dat[,20:40]) - -print(dat_dt) #need this or it will fail???? - print("---------------- plot ----------------") -#also need these two, I don't even know... -print(paste("dat_freq", length(dat_freq))) -print(paste("dat_dt", nrow(dat_dt))) - m = ggplot(dat_dt, aes(x=i, y=freq)) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) m = m + geom_bar(stat="identity", colour = "black", fill = "darkgrey", alpha=0.8) + scale_x_continuous(breaks=1:length(dat_freq), labels=1:length(dat_freq)) m = m + annotate("segment", x = 0.5, y = -0.05, xend=26.5, yend=-0.05, colour="darkgreen", size=1) + annotate("text", x = 13, y = -0.1, label="FR1") @@ -45,9 +33,7 @@ print("---------------- write/print ----------------") -print("writing dat_dt") #need this write.table(dat_dt, paste(dirname(outfile), "/aa_histogram_", gene, ".txt", sep=""), sep="\t",quote=F,row.names=F,col.names=T) -print("writing png") #also need this, file is haunted png(filename=outfile, width=1280, height=720) print(m) dev.off()