Question: How to generate consensus fasta uninterleaved from bam?
0
gravatar for elienesantossilva09
10 months ago by
elienesantossilva090 wrote:

Hello, I first extracted the fasta format consensus from various bam files. I used two different commands for the same purpose and both resulted in an interspersed fasta, from what I understand the overlapping reads are interspersed. However, I was wondering if there is a way to get the non-interleaved fast.

comando BBmap e samtools para extrair o fasta:

 for i in *.bam; do reformat.sh in=$i out=${i}.fa; done



 for i in *.bam; do sample_name=`echo $i | awk -F "." '{print $1}'`; samtools fasta -@ 16 $i > ${sample_name}.fa; done

both generated interleaved format fasta:

>E00382:156:HMFJCCCXX:1:1102:7659:38315/2
TTCCCCTTAAATAAGACATCACGATGGATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTTCGTCTGGGGGGTATGCACGCGATAGCATTGCGAGACGCTGGAGCCGGAGCACCCTATGTCGCAGT
>E00382:156:HMFJCCCXX:1:1105:22019:53803/1
ATGGATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTTCGTCTGGGGGGTATGCACGCGATAGCATTGCGAGACGCTGGAGCCGGAGCACCCTATGTCGCAGTATCTGTCTTTGATTCCTGCCCCA
>E00382:156:HMFJCCCXX:1:1105:26545:21210/1
CTACTTCAGGGCCATAAAGCCTAAATAGCCCACACGTTCCCCTTAAATAAGACATCACGATGGATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTTCGTCTGGGGGGTATGCACGCGATAGCATT
>E00382:156:HMFJCCCXX:1:1106:19116:22757/1
CATCACGATGGATCACAGGTCTATCACCCTATTAACCACTCACG

can anyone help me generate non-interleaved fastas from multiple files?

sequence genome • 248 views
ADD COMMENTlink modified 10 months ago by swbarnes28.2k • written 10 months ago by elienesantossilva090

Hello elienesantossilva09!

It appears that your post has been cross-posted to another site: Cross-posted on: http://seqanswers.com/forums/showthread.php?t=90651

This is typically not recommended as it runs the risk of annoying people in both communities.

ADD REPLYlink written 10 months ago by genomax87k

Hello elienesantossilva09 ,

you seems to be puzzled by what information all the different filetypes contain. I guess your question here is related to the one in you other thread? Have you take a look at the tutorial I've linked to over there? Is this what you are looking for?

fin swimmer

ADD REPLYlink written 10 months ago by finswimmer13k
0
gravatar for swbarnes2
10 months ago by
swbarnes28.2k
United States
swbarnes28.2k wrote:

Hello, I first extracted the fasta format consensus from various bam files.

I don't think you did. You just converted the bam file to fasta format.

I think there are filtering options in samtools fasta to get it to return only one read or the other at a time.

ADD COMMENTlink written 10 months ago by swbarnes28.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1299 users visited in the last hour