Skip to content

Commit 6370e00

Browse files
authored
Merge pull request #64 from likhitha-surapaneni/bug/copy_number
Minor fix to handle copy number correctly
2 parents 8b56436 + 8bd80c0 commit 6370e00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/merge_region_call.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def generate_output(region_vcf, region_calls, out_vcf_path, header) -> None:
9696
new_rec.alts = tuple([call["ALT"] for call in calls])
9797
new_rec.info["SVLEN"] = ",".join(call["SVLEN"][0] if call["SVLEN"] is not None else "." for call in calls)
9898
if any(call.get("COPY_NUMBER") is not None for call in calls):
99-
new_rec.info["CN"] = ",".join(call.get("COPY_NUMBER", "NA") for call in calls)
99+
new_rec.info["CN"] = ",".join(str(call.get("COPY_NUMBER") or "NA") for call in calls)
100100
calls_max_stop = max(call["END"] for call in calls)
101101
if rec.stop != calls_max_stop:
102102
logging.warning(f"END of calls does not match with region ({rec.stop} vs. {calls_max_stop}) for variant region - {rec.id}:{rec.contig}:{rec.start}")

0 commit comments

Comments
 (0)