This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to get sequence for a particular locus from .gff3 or .fa file?

I have genomic data from Phytozome in .fa and .gff3 format. My understanding is that this is not the right format for IGV and I can't figure how else to view genomic data on a Mac. I can run Linux or Windows if I need to...

I want to get the sequence for a particular locus from 3 versions of the Eucalyptus grandis genome. Once I get it, I'll have no problem running MUSCLE to show the differences. How do I get the sequence out from these files, ideally on a Mac? Thanks for the help.

genome

2 answers

bedtools getfasta -fi hg19.fa -bed targetRegion.bed -fo output.fa

GFF3 is an annotation file (or, more accurately, generic genomic features format), not a genomic sequence file. You'll need the reference genome (.fa file) that corresponds to your GFF3. Then, you can use BEDtools getfasta command (via Mac Terminal) to extract the sequence of your desired locus.

Log in to answer this question.