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?
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.
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