Skip to content

Commit

Permalink
handle IYG gt files
Browse files Browse the repository at this point in the history
  • Loading branch information
arvkevi committed Feb 10, 2018
1 parent 7c5629e commit e1c4115
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sn.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ def _genes_for_good(path):
for snp in _23andme(path):
yield snp

def _iyg(path):
handle = csv.DictReader(open(path, "r"),
fieldnames=["name", "genotype"], delimiter="\t")
for row in handle:
yield SNP(name=row["name"], chromosome=None, position=0,
genotype=row["genotype"])

def decodeme(path):
handle = csv.DictReader(open(path, "r"),
Expand Down Expand Up @@ -151,6 +157,7 @@ def parse(path, source=None):
"23andme-exome-vcf": _23andme_exome,
"ancestry": _23andme_ancestry,
"genes-for-good": _genes_for_good,
"IYG": _iyg,
"ftdna-illumina": ftdna,
"decodeme": decodeme,
"vcf": _23andme_exome,
Expand Down

0 comments on commit e1c4115

Please sign in to comment.