0
$\begingroup$

Is there a tool which allows me to transform information in the form (chromosome number, start index, end index) to sequence information? For example, something like (6, 43770819, 43770841) should yield GACCCCCTCCACCCCGCCTCCGG as this is the relevant bases on the 6th chromosome.

A command line executable is preferred, although a web-based service is also fine. Thanks a bunch in advance.

$\endgroup$
  • 1
    $\begingroup$ I think this should be possible with Biomart. $\endgroup$ – Chris Mar 1 '16 at 14:20
1
$\begingroup$

You can write a small script to do that. Basically you just have to print a string from position-x to position-y. Explaining how to do that is not really on-topic here.

From available tools you can use getfasta from the bedtools package. This requires a BED file, or a GTF file as an input. The three column format as in your question will also work but usually the orientation (+/-) is also important to fetch the right sequence; otherwise all sequences would be fetched from the + strand only. GTF format is a bit different: the three columns in your question would be the first fourth and fifth column in the GTF. Seventh column holds the orientation.

bedtools getfasta [OPTIONS] -fi <input FASTA> -bed <BED/GFF/VCF> -fo <output FASTA>

(or):

getFastaFromBed [OPTIONS] -fi <input FASTA> -bed <BED/GFF/VCF> -fo <output FASTA>

There is another one called gffread which comes with the tophat package.

gffread takes a GTF/GFF file as an input and gives you a fasta file of sequences corresponding to the positions listed in the GTF file. The third column (feature) should be exon or transcript as this tool was actually designed to extract transcript sequences.

gffread -w transcripts.fa -g /path/to/genome.fa transcripts.gtf
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.