changeset 51:8fa8836bd605 draft

Uploaded
author davidvanzessen
date Tue, 16 May 2017 08:52:48 -0400
parents 75ee66a691a0
children 22dddabe3637
files merge_and_filter.r shm_csr.xml
diffstat 2 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/merge_and_filter.r	Mon May 15 03:13:16 2017 -0400
+++ b/merge_and_filter.r	Tue May 16 08:52:48 2017 -0400
@@ -224,16 +224,13 @@
 	
 	if(filter.unique == "remove"){
 		result = result[duplicated(result$unique.def) | duplicated(result$unique.def, fromLast=T),]
+		unique.defs = data.frame(table(result$unique.def))
+		unique.defs = unique.defs[unique.defs$Freq >= filter.unique.count,]
+		result = result[result$unique.def %in% unique.defs$Var1,]
 	}
-	
+
 	result$unique.def = paste(result$unique.def, gsub(",.*", "", result$best_match)) #keep the unique sequences that are in multiple classes, gsub so the unmatched don't have a class after it
-	
-	if(filter.unique == "remove"){
-        unique.defs = data.frame(table(result$unique.def))
-        unique.defs = unique.defs[unique.defs$Freq >= filter.unique.count,]
-        result = result[result$unique.def %in% unique.defs$Var1,]
-	} 
-	
+
 	result = result[!duplicated(result$unique.def),]
 }
 
--- a/shm_csr.xml	Mon May 15 03:13:16 2017 -0400
+++ b/shm_csr.xml	Tue May 16 08:52:48 2017 -0400
@@ -20,7 +20,7 @@
 			<option value="unproductive">Unproductive (Unproductive and Unproductive see comment)</option>
 			<option value="remove_unknown">Productive and Unproductive (Productive, Productive see comment, Unproductive, Unproductive and Unproductive see comment)</option>
 		</param>
-        <conditional name="filter_unique">
+		<conditional name="filter_unique">
 			<param name="filter_unique_select" type="select" label="Filter unique sequences" help="See below for an example.">
 				<option value="remove" selected="true">Remove uniques (Based on nucleotide sequence + C)</option>
 				<option value="keep">Keep uniques (Based on nucleotide sequence + C)</option>