Skip to content

Commit 25f447a

Browse files
committed
Bugfix when -o option is set
1 parent be1f6fb commit 25f447a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

eigenstrat_snp_coverage.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,13 @@ def get_ind_names(indf):
5454
parser.add_argument("-v", "--version", action='version', version="%(prog)s {}".format(VERSION), help="Print the version and exit.")
5555
args = parser.parse_args()
5656

57-
## Print version and exit
58-
if args.version:
59-
print(VERSION, file=sys.stderr)
60-
sys.exit(0)
61-
6257
## Set dynamic output files
6358
if args.Output == None:
6459
out_file = sys.stdout
6560
if args.json:
6661
json_output = args.Input+'_eigenstrat_coverage.json'
6762
else:
68-
out_file = args.Output
63+
out_file = open(args.Output, 'w')
6964
if args.json:
7065
json_output = args.Output+'.json'
7166

0 commit comments

Comments
 (0)