From 9f3bec4b908748539faca9a2bfcf49b47f3c47ec Mon Sep 17 00:00:00 2001 From: LaraFuhrmann <55209716+LaraFuhrmann@users.noreply.github.com> Date: Thu, 27 Feb 2025 12:49:29 +0100 Subject: [PATCH] #45 write cooocurring_mutations.csv in the beginning of main --- viloca/shorah_snv.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/viloca/shorah_snv.py b/viloca/shorah_snv.py index 949e9aa..34c44b2 100644 --- a/viloca/shorah_snv.py +++ b/viloca/shorah_snv.py @@ -546,7 +546,7 @@ def main(args): logging.info(str(inspect.getfullargspec(main))) - # write: "cooccurring_mutations.csv" + # start write: "cooccurring_mutations.csv" tmp_df =[] # iterate over haplotype files with open("coverage.txt") as cov_file: @@ -557,8 +557,9 @@ def main(args): file_stem = "w-%s-%s-%s" % (chrom, beg, end) haplo_filename = os.path.join(working_dir, "haplotypes", file_stem + ".reads-support.fas") ref_name = os.path.join(working_dir, "haplotypes", file_stem + ".ref.fas") - tmp_df.append(get_cooccuring_muts_df(fname_haplo, fname_ref, beg,end,chrom)) + tmp_df.append(get_cooccuring_muts_haplo_df(fname_haplo, fname_ref, beg,end,chrom)) pd.concat(tmp_df).to_csv("cooccurring_mutations.csv") + # finish write: "cooccurring_mutations.csv" # snpD_m is the file with the 'consensus' SNVs (from different windows) logging.debug("now parsing SNVs")