Probably one of the most freq FAQ
latest thread in biostar
http://biostar.stackexchange.com/questions/6993/convert-bam-file-to-fasta-file
Samtofastq using Picard
http://picard.sourceforge.net/command-line-overview.shtml#SamToFastq
Samtools and awk to make fasta from sam
latest thread in biostar
http://biostar.stackexchange.com/questions/6993/convert-bam-file-to-fasta-file
Samtofastq using Picard
http://picard.sourceforge.net/command-line-overview.shtml#SamToFastq
Samtools and awk to make fasta from sam
samtools view filename.bam | awk '{OFS="\t"; print ">"$1"\n"$10}' - > filename.fasta Biopython and pysam (code contributed by Brad Chapman)http://biostar.stackexchange.com/questions/6993/convert-bam-file-to-fasta-file/6994#6994