Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gnomad files expected to be in a specific folder structure #6

Open
IsmailM opened this issue Dec 18, 2018 · 3 comments
Open

Gnomad files expected to be in a specific folder structure #6

IsmailM opened this issue Dec 18, 2018 · 3 comments

Comments

@IsmailM
Copy link
Member

IsmailM commented Dec 18, 2018

if mode == 'exome':
file = os.path.join(path_to_gnomad,'vcf','exomes','gnomad.exomes.r2.0.1.sites.vcf.gz')
elif mode == 'genome':
file = os.path.join(path_to_gnomad,'vcf','genomes','gnomad.genomes.r2.0.1.sites.'+chrom+'.vcf.gz')

Better to allow users to provide an set (i.e. an array) of full paths to VCF files (as they might have downloaded the Chr vcfs separately).

@IsmailM
Copy link
Member Author

IsmailM commented Dec 18, 2018

Further to #5

Add support for remote gnomad search: i.e. something like:

tabix https://storage.googleapis.com/gnomad-public/release/2.1/vcf/exomes/gnomad.exomes.r2.1.sites.chrX.vcf.bgz  X

In theory - that would simply be setting the default value of the array of files to an array of URLs and it should "just work" 🤞

@logust79
Copy link
Contributor

This sounds a legit option. Shall we add an option to allow users to choose whether to do it locally, or cloudly?

@IsmailM
Copy link
Member Author

IsmailM commented Dec 20, 2018

  • maybe make the remote option as the default? (and allow people to provide local files instead)
  • btw, I tried the remote URL with pysam (which is what you currently use) and it works perfectly - it downloads a small tbi file into the PWD, but that should be fine.
tbx = pysam.TabixFile('https://storage.googleapis.com/gnomad-public/release/2.1/vcf/exomes/gnomad.exomes.r2.1.sites.chrX.vcf.bgz')
for row in tbx.fetch("X"):
      print (str(row))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants