Question: How to generate consensus fasta uninterleaved from bam?
0
gravatar for elienesantossilva09
4 weeks 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 • 113 views
ADD COMMENTlink modified 4 weeks ago by swbarnes26.7k • written 4 weeks 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 4 weeks ago by genomax73k

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 4 weeks ago by finswimmer12k
0
gravatar for swbarnes2
4 weeks ago by
swbarnes26.7k
United States
swbarnes26.7k 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 4 weeks ago by swbarnes26.7k
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: 797 users visited in the last hour