# HG changeset patch # User davidvanzessen # Date 1464269868 14400 # Node ID 9643b1fd9c450aaa03726ee502859f5bc1c013ee # Parent c532b3f8dc972a9258289c1fc3a8db58efe76b8a Uploaded diff -r c532b3f8dc97 -r 9643b1fd9c45 RScript.r --- a/RScript.r Wed Jan 06 11:00:00 2016 -0500 +++ b/RScript.r Thu May 26 09:37:48 2016 -0400 @@ -406,7 +406,10 @@ 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(factor(reorder(type, type.order)), normalized_read_count, group=link)) + geom_line() + scale_y_log10(breaks=scales,labels=scales) + expand_limits(y=c(0,10^6)) + scale_x_discrete(breaks=levels(scatterplot_data$type), labels=levels(scatterplot_data$type), drop=FALSE) + #p = ggplot(scatterplot_locus_data, aes(factor(reorder(type, type.order)), normalized_read_count, group=link)) + geom_line() + scale_y_log10(breaks=scales,labels=scales) + expand_limits(y=c(0,10^6)) + scale_x_discrete(breaks=levels(scatterplot_data$type), labels=levels(scatterplot_data$type), drop=FALSE) + print(paste("scatterplot_locus_data:")) + print(head(scatterplot_locus_data)) + p = ggplot(scatterplot_locus_data, aes(factor(reorder(type, type.order)), normalized_read_count, group=link)) + geom_line() + scale_y_log10(breaks=scales,labels=scales, limits=c(0,10^6)) + scale_x_discrete(breaks=levels(scatterplot_data$type), labels=levels(scatterplot_data$type), drop=FALSE) } else { p = ggplot(scatterplot_locus_data, aes(factor(reorder(type, type.order)), Frequency, group=link)) + geom_line() + scale_y_log10(limits=c(0.0001,100), breaks=c(0.0001, 0.001, 0.01, 0.1, 1, 10, 100), labels=c("0.0001", "0.001", "0.01", "0.1", "1", "10", "100")) + scale_x_discrete(breaks=levels(scatterplot_data$type), labels=levels(scatterplot_data$type), drop=FALSE) } @@ -918,12 +921,12 @@ } not_in_one = scatterplot_locus_data$type != "In one" if(sum(not_in_one) > 0){ - scatterplot_locus_data[not_in_one,]$type = "In multiple" + #scatterplot_locus_data[not_in_one,]$type = "In multiple" } p = NULL 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)))) + 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) + expand_limits(y=c(0,1000000)) } else { p = ggplot(scatterplot_locus_data, aes(type, Frequency)) + scale_y_log10(limits=c(0.0001,100), breaks=c(0.0001, 0.001, 0.01, 0.1, 1, 10, 100), labels=c("0.0001", "0.001", "0.01", "0.1", "1", "10", "100")) + expand_limits(y=c(0,100)) @@ -991,7 +994,7 @@ dev.off() } -if(F & nrow(triplets) != 0){ +if(nrow(triplets) != 0){ cat("Starting triplet analysis", file=logfile, append=T)