This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filter Genome for Specific Sites

Hello,

I have a list of ~1,300 single bp sites and a fully annotated genome. I'd like to create a fasta file with only the 1,300 sites (with ±300 bp on each side). My sites are in an Excel file right now with chromosome, position, strand, correlation, p-value as 5 separate columns. Does anyone know of a program/function that will subset a genome into the 1,300 sites/regions?

Thank you in advance!

bedtools

This is unhelpful and doesn't answer my question.

1 answer

I have a list of ~1,300 single bp sites

Convert your file to plain text BED format (three fields required).

Use bedtools slop to extend the range by 300 bp --> Extend The Coordinates Entries Within A Bed File
Then use bedtools getfasta or samtools faidx to extract the sequence.

Great, thank you!

Log in to answer this question.