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>
getFastaFromBed [OPTIONS] -fi <input FASTA> -bed <BED/GFF/VCF> -fo <output FASTA>
There is another one called
gffread which comes with the
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
transcript as this tool was actually designed to extract transcript sequences.
gffread -w transcripts.fa -g /path/to/genome.fa transcripts.gtf