# HG changeset patch # User davidvanzessen # Date 1433237638 14400 # Node ID dde5ec84754940471c5338f0c43933a2c2acd30a # Parent ce8bd23d033537c716a5ef66b9a4b47b14c0748a Uploaded diff -r ce8bd23d0335 -r dde5ec847549 RScript.r --- a/RScript.r Tue Jun 02 05:26:52 2015 -0400 +++ b/RScript.r Tue Jun 02 05:33:58 2015 -0400 @@ -289,7 +289,7 @@ cat("", file=logfile, append=T) scales = 10^(0:6) #(0:ceiling(log10(max(scatterplot_locus_data$normalized_read_count)))) -p = ggplot(single_patients, aes(Rearrangement, normalized_read_count)) + scale_y_log10(breaks=scales,labels=scales) +p = ggplot(single_patients, aes(Rearrangement, normalized_read_count)) + scale_y_log10(breaks=scales,labels=scales) + expand_limits(y=c(0,1000000)) p = p + geom_point(aes(colour=type), position="jitter") p = p + xlab("In one or both samples") + ylab("Reads") p = p + facet_grid(.~Patient) + ggtitle("Scatterplot of the reads of the patients with a single sample") @@ -297,7 +297,7 @@ print(p) dev.off() -p = ggplot(single_patients, aes(Rearrangement, Frequency)) +p = ggplot(single_patients, aes(Rearrangement, Frequency)) + scale_y_continuous(limits = c(0, 100)) + expand_limits(y=c(0,100)) p = p + geom_point(aes(colour=type), position="jitter") p = p + xlab("In one or both samples") + ylab("Frequency") p = p + facet_grid(.~Patient) + ggtitle("Scatterplot of the frequency of the patients with a single sample") @@ -448,9 +448,9 @@ if(nrow(scatterplot_locus_data) != 0){ if(on == "normalized_read_count"){ scales = 10^(0:6) #(0:ceiling(log10(max(scatterplot_locus_data$normalized_read_count)))) - p = ggplot(scatterplot_locus_data, aes(type, normalized_read_count)) + scale_y_log10(breaks=scales,labels=scales) + p = ggplot(scatterplot_locus_data, aes(type, normalized_read_count)) + scale_y_log10(breaks=scales,labels=scales) + expand_limits(y=c(0,1000000)) } else { - p = ggplot(scatterplot_locus_data, aes(type, Frequency)) + p = ggplot(scatterplot_locus_data, aes(type, Frequency)) + scale_y_continuous(limits = c(0, 100)) + expand_limits(y=c(0,100)) } p = p + geom_point(aes(colour=type), position="jitter") p = p + xlab("In one or in multiple samples") + ylab(onShort) + ggtitle(paste(label1, label2, label3, onShort, product[iter, titleIndex]))