Mercurial > repos > davidvanzessen > mutation_analysis
diff aa_histogram.r @ 104:603a10976e9c draft
Uploaded
author | davidvanzessen |
---|---|
date | Wed, 22 Jun 2016 10:07:28 -0400 |
parents | e6bc976760d4 |
children | e4957ad476a2 |
line wrap: on
line diff
--- a/aa_histogram.r Tue Jun 21 05:30:16 2016 -0400 +++ b/aa_histogram.r Wed Jun 22 10:07:28 2016 -0400 @@ -4,6 +4,7 @@ input = args[1] outfile = args[2] +gene = args[3] print("---------------- read input ----------------") @@ -40,12 +41,12 @@ m = m + annotate("segment", x = 38.5, y = -0.05, xend=55.5, yend=-0.05, colour="darkgreen", size=1) + annotate("text", x = 47, y = -0.1, label="FR2") m = m + annotate("segment", x = 55.5, y = -0.07, xend=65.5, yend=-0.07, colour="darkblue", size=1) + annotate("text", x = 60.5, y = -0.15, label="CDR2") m = m + annotate("segment", x = 65.5, y = -0.05, xend=104.5, yend=-0.05, colour="darkgreen", size=1) + annotate("text", x = 85, y = -0.1, label="FR3") -m = m + expand_limits(y=c(-0.1,1)) + xlab("AA position") + ylab("Frequency") + ggtitle("AA mutation frequency") +m = m + expand_limits(y=c(-0.1,1)) + xlab("AA position") + ylab("Frequency") + ggtitle(paste(gene, "AA mutation frequency")) print("---------------- write/print ----------------") print("writing dat_dt") #need this -write.table(dat_dt, paste(dirname(outfile), "/aa_histogram.txt", sep=""), sep="\t",quote=F,row.names=F,col.names=T) +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)