Mercurial > repos > iuc > vsnp_add_zero_coverage
diff vsnp_determine_ref_from_data.py @ 3:2e863710a2f0 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:26:25 +0000 |
parents | 4cc004985e27 |
children | e12ccc57875c |
line wrap: on
line diff
--- a/vsnp_determine_ref_from_data.py Wed Dec 02 09:10:53 2020 +0000 +++ b/vsnp_determine_ref_from_data.py Thu Dec 10 15:26:25 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)