This is a test version of Biostars. For the public version, visit https://www.biostars.org.
extracting fasta sequence from aligned reads

Hello everyone, I am working on a data set where I am mapping Hise reads on my reference sequence. I have three different samples. BAM file from all three samples showing nucleotide differences. I would like to get these sequences from the file so that I can align them and study further. I tried to extract fasta file using bedtools and converting bed to fasta. But I guess this only gives back the reference file sequences that is covered in the mapping. I tried extracting reads and then using trinity to cluster them. but for some reason, trinity is avoiding the region where there is sequence changes. could you please suggest me the way to extract sequences from the aligned reads without losing sequence changes in from the reads? thanks in advance

BAM files to extract fasta sequences from [https://drive.google.com/open?id=0B42oFSm-XOAUc05rOFZrQmhBNkk][2]

rna-seq bam fasta

I tried extracting reads and then using trinity to cluster them

Once you extract the reads (samtools view region and then samtools fasta?) then you can convert them to fasta and then do a multiple sequence alignment with a program you like. You would likely need to edit the alignment to replicate the one from NGS data depending on how many SNP's/indels there are.

1 answer

Open all three bam files with a genome browser. I know IGV can open several bam files simultaneously, once you zoom in enough, you will be able to see the sequence of the reads (thus the SNPs) mapping to the particular location you are interested.

Log in to answer this question.