diff stacks.py @ 3:0e0ff9e9c761 default tip

fix inputs clean name
author cmonjeau
date Mon, 28 Sep 2015 13:21:35 +0000
parents d6ba40f6c824
children
line wrap: on
line diff
--- a/stacks.py	Mon Aug 24 15:39:12 2015 +0000
+++ b/stacks.py	Mon Sep 28 13:21:35 2015 +0000
@@ -35,7 +35,7 @@
 	for line in open(input_config, "r").readlines():
 		if line.strip() != '':
 			extract=line.strip().split("::")
-			tab_files[extract[0].replace(" (", ".").replace(" ", ".").replace(")", "").replace(":", ".").replace("/", ".")]=extract[1]
+			tab_files[extract[0].replace("(", ".").replace(" ", ".").replace(")", "").replace(":", ".").replace("/", ".")]=extract[1]
 
 	# tabfiles[name]-> path
 	return tab_files
@@ -47,12 +47,12 @@
 	for line in open(input_config, "r").readlines():
 		if line.strip() != '':
 			extract=line.strip().split("::")
-			parse_name=re.search("^STACKS.*\((.*\.[ATCG]*\.fq)\)$", extract[0])
+			parse_name=re.search("STACKS.*\((.*\.[ATCG]*).*\)$", extract[0])
 			# rename galaxy name in a short name
 			if parse_name:				
 				extract[0]=parse_name.groups(1)[0]
 
-			tab_files[extract[0].replace(" (", ".").replace(" ", ".").replace(")", "").replace(":", ".").replace("/", ".")]=extract[1]
+			tab_files[extract[0].replace("(", ".").replace(" ", ".").replace(")", "").replace(":", ".").replace("/", ".")]=extract[1]
 			
 	# tabfiles[name]-> path
 	return tab_files