Skip to content

Commit

Permalink
fix file handler issue when running as cli (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanesarango authored May 23, 2024
1 parent 48ba24d commit 0e55d09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mergesvvcf/mergedfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,9 @@ def passed_variant(record):
"String",
"Strand orientation of the adjacency in BEDPE format (DEL:+-, DUP:-+, INV:++/--)",
)

outfile = open(outfile,'w')
# outfile should be a file handler. if it's a file name open it
if isinstance(outfile, str):
outfile = open(outfile,'w')
print(outvcf.header, end="", file=outfile)

for variant in sorted(calldict, key=operator.itemgetter(0)):
Expand Down

0 comments on commit 0e55d09

Please sign in to comment.