You're doing my job for me :).
Hello!
Is there a standard way to retrieve a sequence of dna given the chromosome number, start position, and end position? I am using biopython. I would like to do all of this locally without having to query an external source (as was suggested here How To Fetch Genomics Sequence Using Coordinates In Biopython). I have fasta files for the human chromosomes available locally (http://hgdownload.cse.ucsc.edu/goldenpath/hg19/chromosomes/) but have been unable to find a standard way to query them based on position.
Thanks!
1 answer
Sounds like this would be useful Pyfaidx: Efficient, "Pythonic" Random Access To Fasta Files Using Samtools-Compatible Indexing
BTW, there are convenient examples in the github repo.
Log in to answer this question.