From 4b1c49b27c24c4b98808e48a93eb241cb3471589 Mon Sep 17 00:00:00 2001 From: jonas-fuchs Date: Tue, 6 Aug 2024 10:02:02 +0200 Subject: [PATCH] text mistake fix --- example_mave_data/MaveBindRBD.csv | 2 +- virheat/command.py | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/example_mave_data/MaveBindRBD.csv b/example_mave_data/MaveBindRBD.csv index ab422ae..11b58cb 100644 --- a/example_mave_data/MaveBindRBD.csv +++ b/example_mave_data/MaveBindRBD.csv @@ -1,4 +1,4 @@ -exaccession,hgvs_nt,hgvs_splice,hgvs_pro,score,average,library,AA +accession,hgvs_nt,hgvs_splice,hgvs_pro,score,average,library,AA urn:mavedb:00000044-a-1#7954,NA,NA,p.Lys199Val,0.09,0.07,2,K529V urn:mavedb:00000044-a-1#7955,NA,NA,p.Lys199Trp,-0.02,0,1,K529W urn:mavedb:00000044-a-1#7956,NA,NA,p.Lys199Trp,0.01,0,2,K529W diff --git a/virheat/command.py b/virheat/command.py index dd8d603..6bd3778 100644 --- a/virheat/command.py +++ b/virheat/command.py @@ -165,11 +165,13 @@ def main(sysargs=sys.argv[1:]): unique_mutations = data_prep.zoom_to_genomic_regions(unique_mutations, args.zoom) frequency_array = data_prep.create_freq_array(unique_mutations, frequency_lists) - # user specified delete options (removes mutations based on various rationales) - if args.delete: - frequency_array = data_prep.delete_common_mutations(frequency_array, unique_mutations) - if args.delete_n is not None: - frequency_array = data_prep.delete_n_mutations(frequency_array, unique_mutations, args.delete_n) + # enables the deletion option only if more than 1 vcf file is provided + if len(vcf_files) > 1: + # user specified delete options (removes mutations based on various rationales) + if args.delete: + frequency_array = data_prep.delete_common_mutations(frequency_array, unique_mutations) + if args.delete_n is not None: + frequency_array = data_prep.delete_n_mutations(frequency_array, unique_mutations, args.delete_n) # annotate low coverage if per base coverage from qualimap was provided data_prep.annotate_non_covered_regions(args.input[0], args.min_cov, frequency_array, file_names, unique_mutations)