Skip to content

Commit

Permalink
Merge pull request #10 from selfdecode/feature/from_develop
Browse files Browse the repository at this point in the history
myheritage and vcf check
  • Loading branch information
adrianodemarino authored Dec 5, 2022
2 parents 37d8f27 + de63842 commit 76b5ca2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/snps/io/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def read(self):
elif re.match("^rs[0-9]*[, \t]{1}[1]", first_line):
d = self.read_generic(file, compression, skip=0)
print('SNPs library reader: Generic 4')
elif "vcf" in comments.lower() or "##contig" in comments.lower():
elif ("##" in first_line and "vcf" in comments.lower() and "#CHROM\tPOS" in comments) or "##contig" in comments.lower():
d = self.read_vcf(file, compression, "vcf", self._rsids)
print('SNPs library reader: VCF')
elif ("selfdecode" in comments.lower()):
Expand Down Expand Up @@ -817,6 +817,7 @@ def parser():
io.StringIO(file_string_out.getvalue()),
comment="#",
header=0,
sep='\t',
na_values=NA_VALUES,
names=["rsid", "chrom", "pos", "genotype"],
index_col=0,
Expand Down

0 comments on commit 76b5ca2

Please sign in to comment.