Hai,
I am trying to extract 50 base pair sequence before and 50 bp after the coordinates present in my VCF files and write them to a file as fasta sequences. I have both the BAM files and the reference genome.
Can someone help me with the same?
Thanks in advance
See the answers here: https://www.biostars.org/p/46331/My mistake. Will leave this here since the comment below is nested.
Is she not telling here that her coordinates are in VCF file and sequence in bam or reference genome? If so, the it can be done like this using
bedtools
.It is unclear if OP wants to get the region from the fastq/alignments or from original/new consensus reference.