Skip to content

Commit

Permalink
#45 write cooocurring_mutations.csv in the beginning of main
Browse files Browse the repository at this point in the history
  • Loading branch information
LaraFuhrmann committed Feb 27, 2025
1 parent 9733154 commit 9f3bec4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions viloca/shorah_snv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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")
Expand Down

0 comments on commit 9f3bec4

Please sign in to comment.