Skip to content

Commit

Permalink
Merge pull request #6 from treangenlab/main_orphan
Browse files Browse the repository at this point in the history
Main orphan
  • Loading branch information
Fu-Yilei authored May 18, 2023
2 parents 70cff08 + 59a8e03 commit d71d38f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions meth_phaser_post_processing
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ def get_altered_vcf(original_vcf, output_vcf, block_relationship_dfs):
# print(split_rec, start_loc)
split_rec[-1] = split_rec[-1].replace(start_loc, get_altered_block_start_loc(current_chrom_final_block, int(start_loc))) # type: ignore
rec = "\t".join(split_rec)
rec = f"{rec}\n"
altered_vcf_file.writelines(rec.replace("1|0", "0|1"))
elif "0|1" in rec:
if "PS" in rec.split("\t")[-2]:
Expand All @@ -315,6 +316,7 @@ def get_altered_vcf(original_vcf, output_vcf, block_relationship_dfs):
# print(split_rec, start_loc)
split_rec[-1] = split_rec[-1].replace(start_loc, get_altered_block_start_loc(current_chrom_final_block, int(start_loc))) # type: ignore
rec = "\t".join(split_rec)
rec = f"{rec}\n"
altered_vcf_file.writelines(rec.replace("0|1", "1|0"))
else:
altered_vcf_file.writelines(rec)
Expand Down

0 comments on commit d71d38f

Please sign in to comment.