Hi everyone,
I am new working with Samtools and I need to convert a .BAM to a .fasta. I checked all the posts that I could but I do not have what I am looking for.
I used: samtools view filename.bam | awk '{OFS="\t"; print ">"$1"\n"$10}'
I did not get the .fasta format that I use to see. The .fasta generated has some "cuts" and "intervals" with a several number of "Ns". I am looking for a continuous "normal" .fasta and I do not mind whether it has Ns at all.
I also saw this, but did not tried: samtools bam2fq input.bam | seqtk seq -A > output.fa (Could this one help me?)
Thanks very much Community,
Ivan