Mercurial > repos > davidvanzessen > mutation_analysis
comparison aa_histogram.r @ 109:0096cd454380 draft
Uploaded
| author | davidvanzessen |
|---|---|
| date | Thu, 14 Jul 2016 07:29:56 -0400 |
| parents | 6add3e66f4fa |
| children | ade5cf6fd2dc |
comparison
equal
deleted
inserted
replaced
| 108:6add3e66f4fa | 109:0096cd454380 |
|---|---|
| 46 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") | 46 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") |
| 47 m = m + expand_limits(y=c(-0.1,1)) + xlab("AA position") + ylab("Frequency") + ggtitle(paste(gene, "AA mutation frequency")) | 47 m = m + expand_limits(y=c(-0.1,1)) + xlab("AA position") + ylab("Frequency") + ggtitle(paste(gene, "AA mutation frequency")) |
| 48 | 48 |
| 49 print("---------------- write/print ----------------") | 49 print("---------------- write/print ----------------") |
| 50 | 50 |
| 51 png(filename=paste(outdir, "/aa_histogram_", gene, ".png", sep=""), width=1280, height=720) | |
| 52 print(m) | |
| 53 dev.off() | |
| 54 | |
| 51 dat.sums = data.frame(index=1:length(mutations.at.position), mutations.at.position=mutations.at.position, aa.at.position=aa.at.position) | 55 dat.sums = data.frame(index=1:length(mutations.at.position), mutations.at.position=mutations.at.position, aa.at.position=aa.at.position) |
| 52 | 56 |
| 53 write.table(dat.sums, paste(outdir, "/aa_histogram_sum_", gene, ".txt", sep=""), sep="\t",quote=F,row.names=F,col.names=T) | 57 write.table(dat.sums, paste(outdir, "/aa_histogram_sum_", gene, ".txt", sep=""), sep="\t",quote=F,row.names=F,col.names=T) |
| 54 write.table(mutations.by.id.gene, paste(outdir, "/aa_histogram_count_", gene, ".txt", sep=""), sep="\t",quote=F,row.names=F,col.names=T) | 58 write.table(mutations.by.id.gene, paste(outdir, "/aa_histogram_count_", gene, ".txt", sep=""), sep="\t",quote=F,row.names=F,col.names=T) |
| 55 write.table(absent.aa.by.id.gene, paste(outdir, "/aa_histogram_absent_", gene, ".txt", sep=""), sep="\t",quote=F,row.names=F,col.names=T) | 59 write.table(absent.aa.by.id.gene, paste(outdir, "/aa_histogram_absent_", gene, ".txt", sep=""), sep="\t",quote=F,row.names=F,col.names=T) |
| 56 write.table(dat_dt, paste(outdir, "/aa_histogram_", gene, ".txt", sep=""), sep="\t",quote=F,row.names=F,col.names=T) | 60 write.table(dat_dt, paste(outdir, "/aa_histogram_", gene, ".txt", sep=""), sep="\t",quote=F,row.names=F,col.names=T) |
| 57 png(filename=paste(outdir, "/aa_histogram_", gene, ".png", sep=""), width=1280, height=720) | |
| 58 print(m) | |
| 59 dev.off() | |
| 60 } | 61 } |
