Skip to content

Commit

Permalink
Now possible to add allele txt file in local folder
Browse files Browse the repository at this point in the history
  • Loading branch information
alina-bauer committed Aug 31, 2023
1 parent 71e843b commit 89259c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bin/check_requested_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def __main__():
# get the alleles
if args.alleles.startswith("http"):
alleles = [Allele(a) for a in urllib.request.urlopen(args.alleles).read().decode("utf-8").splitlines()]
elif args.alleles.endswith(".txt"):
alleles = [Allele(a) for a in open(args.alleles, "r").read().splitlines()]
else:
alleles = [Allele(a) for a in args.alleles.split(";")]

Expand Down
3 changes: 2 additions & 1 deletion bin/epaa.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,10 +1338,11 @@ def __main__():
# get the alleles
if args.alleles.startswith("http"):
alleles = [Allele(a) for a in urllib.request.urlopen(args.alleles).read().decode("utf-8").splitlines()]
elif args.alleles.endswith(".txt"):
alleles = [Allele(a) for a in open(args.alleles, "r").read().splitlines()]
else:
alleles = [Allele(a) for a in args.alleles.split(";")]

print("alleles nach sache: ", alleles)
# initialize MartsAdapter, GRCh37 or GRCh38 based
ma = MartsAdapter(biomart=references[args.reference])

Expand Down

0 comments on commit 89259c6

Please sign in to comment.