Skip to content

Commit

Permalink
Fix test data script.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdshw5 committed Apr 2, 2015
1 parent 7b8f921 commit 90c3bbc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/data/download_gene_fasta.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def fetch_genes(filename):
fasta.write(line)

def fetch_chr22(filename):
from subprocess import Popen, PIPE, call
from subprocess import Popen, PIPE

grch36 = 'ftp://ftp-trace.ncbi.nih.gov//1000genomes/ftp/pilot_data/technical/reference/human_b36_male.fa.gz'
curl = Popen(['curl', '-s', grch36], stdout=PIPE)
Expand All @@ -44,15 +44,18 @@ def fetch_chr22(filename):
elif chr22:
fasta.write(line)

def fetch_chr22_vcf(filename):
from subprocess import call
call(['curl', '-s', 'ftp://ftp-trace.ncbi.nih.gov//1000genomes/ftp/pilot_data/release/2010_07/exon/snps/CEU.exon.2010_03.genotypes.vcf.gz',
'-o', 'data/chr22.vcf.gz'])
'-o', filename])
call(['curl', '-s', 'ftp://ftp-trace.ncbi.nih.gov//1000genomes/ftp/pilot_data/release/2010_07/exon/snps/CEU.exon.2010_03.genotypes.vcf.gz.tbi',
'-o', 'data/chr22.vcf.gz.tbi'])
'-o', filename + '.tbi'])



if __name__ == "__main__":
path = os.path.dirname(__file__)
os.chdir(path)
fetch_genes("genes.fasta")
fetch_chr22_vcf("chr22.vcf.gz")
fetch_chr22("chr22.fasta")

0 comments on commit 90c3bbc

Please sign in to comment.