changeset 67:67a9ddf6a8f5 draft

Uploaded
author davidvanzessen
date Wed, 20 Apr 2016 05:32:45 -0400
parents 88e0e7665086
children 3636d5aaa127
files aa_histogram.r merge_and_filter.r
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/aa_histogram.r	Wed Apr 06 05:54:13 2016 -0400
+++ b/aa_histogram.r	Wed Apr 20 05:32:45 2016 -0400
@@ -29,6 +29,10 @@
 
 print("---------------- plot ----------------")
 
+#also need these two, I don't even know...
+print(paste("dat_freq", length(dat_freq)))
+print(paste("dat_dt", nrow(dat_dt)))
+
 m = ggplot(dat_dt, aes(x=i, y=freq)) + theme(axis.text.x = element_text(angle = 90, hjust = 1))
 m = m + geom_histogram(stat="identity", colour = "black", fill = "darkgrey", alpha=0.8) + scale_x_continuous(breaks=1:length(dat_freq), labels=1:length(dat_freq))
 m = m + annotate("segment", x = 0.5, y = -0.05, xend=26.5, yend=-0.05, colour="darkgreen", size=1) + annotate("text", x = 13, y = -0.1, label="FR1")
--- a/merge_and_filter.r	Wed Apr 06 05:54:13 2016 -0400
+++ b/merge_and_filter.r	Wed Apr 20 05:32:45 2016 -0400
@@ -59,10 +59,13 @@
 
 unmatched=summ[NULL,c("Sequence.ID", "chunk_hit_percentage", "nt_hit_percentage", "start_locations", "best_match")]
 
-if(any(higher_than)){
+if(!all(higher_than)){ #check for not all because that would mean the unmatched set is empty
 	unmatched = summ[!higher_than,]
 	unmatched = unmatched[,c("Sequence.ID", "chunk_hit_percentage", "nt_hit_percentage", "start_locations", "best_match")]
 	unmatched$best_match = paste("unmatched,", unmatched$best_match)
+}
+
+if(any(higher_than)){
 	summ = summ[higher_than,]
 }
 print(paste("Number of matched sequences:", nrow(summ)))