This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to get nucleotide sequences for a given list of genomic positions.

Hi, I have a text file of 7500 genomic positions with their chr, start, end and want to get their nucleotide sequences. Can someone point me some tool or any thoughts on how to do it?

Thank you,

chip-seq sequence ngs

4 answers

Use getfasta from bedtools : http://bedtools.readthedocs.io/en/latest/content/tools/getfasta.html

if you use python:

    import pysam
    genome = pysam.Fastafile(path_to_genome+'genome.fa')
    sequence = genome.fetch(chr, start, end)

path_to_genome: would be any genome you have downloaded (e.g. hg19).

A: Retrieve a subset of FASTA from large multi-FASTA file

Log in to answer this question.