diff vsnp_determine_ref_from_data.py @ 4:efb86aade548 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vsnp commit 2e312886647244b416c64eca91e1a61dd1be939b"
author iuc
date Thu, 10 Dec 2020 15:25:53 +0000
parents 85587c8eb25f
children b08cc87b2888
line wrap: on
line diff
--- a/vsnp_determine_ref_from_data.py	Wed Dec 02 09:10:07 2020 +0000
+++ b/vsnp_determine_ref_from_data.py	Thu Dec 10 15:25:53 2020 +0000
@@ -12,17 +12,11 @@
 OUTPUT_METRICS_DIR = 'output_metrics'
 
 
-def get_base_file_name(file_path):
+def get_sample_name(file_path):
     base_file_name = os.path.basename(file_path)
     if base_file_name.find(".") > 0:
         # Eliminate the extension.
         return os.path.splitext(base_file_name)[0]
-    elif base_file_name.find("_fq") > 0:
-        # The "." character has likely
-        # changed to an "_" character.
-        return base_file_name.split("_fq")[0]
-    elif base_file_name.find("_fastq") > 0:
-        return base_file_name.split("_fastq")[0]
     return base_file_name
 
 
@@ -178,7 +172,7 @@
 
 
 def output_files(fastq_file, count_list, group, dbkey, dbkey_file, metrics_file):
-    base_file_name = get_base_file_name(fastq_file)
+    base_file_name = get_sample_name(fastq_file)
     output_dbkey(base_file_name, dbkey, dbkey_file)
     output_metrics(base_file_name, count_list, group, dbkey, metrics_file)