Skip to content

Commit 93d19a6

Browse files
committed
[shorah_snv] fix ref_filename for different cases
1 parent 383a023 commit 93d19a6

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

viloca/shorah_snv.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,13 @@ def main(args):
556556

557557
file_stem = "w-%s-%s-%s" % (chrom, beg, end)
558558
haplo_filename = os.path.join(working_dir,"haplotypes/" + file_stem + ".reads-support.fas")
559-
ref_name = os.path.join(working_dir, "raw_reads/" +file_stem + ".ref.fas")
559+
if extended_window_mode:
560+
ref_name = "extended-ref"
561+
elif exclude_non_var_pos_threshold > 0:
562+
ref_name = "envp-full-ref"
563+
else:
564+
ref_name = "ref"
565+
ref_filename = os.path.join("raw_reads", f"{file_stem}.{ref_name}.fas")
560566
tmp_df.append(get_cooccuring_muts_haplo_df(haplo_filename, ref_name, beg,end,chrom))
561567
pd.concat(tmp_df).to_csv("cooccurring_mutations.csv")
562568
# finish write: "cooccurring_mutations.csv"

0 commit comments

Comments
 (0)