Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import time
import re
import multiprocessing as mp
import gzip

# Internal
from GAPI import log
Expand Down Expand Up @@ -851,7 +852,10 @@ def read(self, filePath):
'''
Read VCF file
'''
vcfFile = open(filePath)
if str(filePath).endswith('.gz'):
vcfFile = gzip.open(filePath, 'rt')
else:
vcfFile = open(filePath)

## 1. Read VCF and differenciate between header and variant entries
header = []
Expand Down