Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
Smalll change to increase Python2 compatibility (even though Python2 is almost dead)
Merge pull request #27 from B-UMMI/dev
  • Loading branch information
miguelpmachado authored Nov 26, 2019
2 parents c2d6252 + c137dff commit 2000af5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ReMatCh/modules/rematch_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,10 @@ def create_vcf(bam_file, sequence_to_analyse, outdir, counter, reference_file):
# Read vcf file
class Vcf:
def __init__(self, vcf_file, encoding=None, newline=None):
self.vcf = open(vcf_file, 'rt', encoding=encoding, newline=newline)
try:
self.vcf = open(vcf_file, 'rt', encoding=encoding, newline=newline)
except TypeError:
self.vcf = open(vcf_file, 'rt')
self.line_read = self.vcf.readline()
self.contigs_info_dict = {}
while self.line_read.startswith('#'):
Expand Down

0 comments on commit 2000af5

Please sign in to comment.