Skip to content

Commit

Permalink
fixed an issue that cause no new line in vcf file
Browse files Browse the repository at this point in the history
  • Loading branch information
Fu-Yilei committed May 18, 2023
1 parent 4369947 commit 59a8e03
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Empty file modified meth_phaser_parallel
100644 → 100755
Empty file.
6 changes: 2 additions & 4 deletions meth_phaser_post_processing
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@ def get_altered_vcf(original_vcf, output_vcf, block_relationship_dfs):
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"
print(rec)
altered_vcf_file.writelines(rec.replace("1|0", "0|1"))
altered_vcf_file.writelines(rec.replace("1|0", "0|1"))
elif "0|1" in rec:
if "PS" in rec.split("\t")[-2]:
split_rec = rec.split("\t")
Expand All @@ -318,8 +317,7 @@ def get_altered_vcf(original_vcf, output_vcf, block_relationship_dfs):
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"
print(rec)
altered_vcf_file.writelines(rec.replace("0|1", "1|0"))
altered_vcf_file.writelines(rec.replace("0|1", "1|0"))
else:
altered_vcf_file.writelines(rec)
flpl = [x[0] for x in flipping_list]
Expand Down
Empty file modified methphasing
100644 → 100755
Empty file.

0 comments on commit 59a8e03

Please sign in to comment.