Mercurial > repos > davidvanzessen > mutation_analysis
comparison mutation_analysis.r @ 47:099cc1254f74 draft
Uploaded
| author | davidvanzessen |
|---|---|
| date | Mon, 09 Nov 2015 07:21:09 -0500 |
| parents | 9afd8430de2c |
| children | 5c6b9e99d576 |
comparison
equal
deleted
inserted
replaced
| 46:42e39033514b | 47:099cc1254f74 |
|---|---|
| 356 } | 356 } |
| 357 | 357 |
| 358 dat$percentage_mutations = round(dat$VRegionMutations / dat$VRegionNucleotides * 100, 2) | 358 dat$percentage_mutations = round(dat$VRegionMutations / dat$VRegionNucleotides * 100, 2) |
| 359 | 359 |
| 360 p = ggplot(dat, aes(best_match, percentage_mutations)) | 360 p = ggplot(dat, aes(best_match, percentage_mutations)) |
| 361 p = p + geom_boxplot(aes(middle=mean(percentage_mutations)), alpha=0.1, outlier.shape = NA) + geom_point(aes(colour=best_match), position="jitter") | 361 p = p + geom_point(aes(colour=best_match), position="jitter") + geom_boxplot(aes(middle=mean(percentage_mutations)), alpha=0.1, outlier.shape = NA) |
| 362 p = p + xlab("Subclass") + ylab("Frequency") + ggtitle("Frequency scatter plot") | 362 p = p + xlab("Subclass") + ylab("Frequency") + ggtitle("Frequency scatter plot") |
| 363 write.table(dat[,c("Sequence.ID", "best_match", "VRegionMutations", "VRegionNucleotides", "percentage_mutations")], "scatter.txt", sep="\t",quote=F,row.names=F,col.names=T) | 363 write.table(dat[,c("Sequence.ID", "best_match", "VRegionMutations", "VRegionNucleotides", "percentage_mutations")], "scatter.txt", sep="\t",quote=F,row.names=F,col.names=T) |
| 364 | 364 |
| 365 | 365 |
| 366 png(filename="scatter.png") | 366 png(filename="scatter.png") |
