This is a test version of Biostars. For the public version, visit https://www.biostars.org.
".sam" file - should it contain multiple samples?

Hi. I feel like this might be a stupid question, but I can't seem to find an answer anywhere. I'm currently trying to align my paired-end reads to a reference genome. To do this, I believe I need to create a ".sam" file using "bwa".

However, what I don't understand is, should I create one .sam file that contains all of my paired-end samples? That is, I have around 100 samples that are paried-end (so, in total, 200 files). Should I align all of these samples to the reference genome "in one go" so that I have one large .sam file containg all my 100 samples? Or should I create 100x .sam files where I've aligned each sample separately?

My goal later is to find SNPs of these samples.

Thanks!

sam

1 answer

If each "sample" is an independent specimen then one usually produces one alignment per sample. Don't use sam files, use bam right away. SAM is human-readable, by this uncompressed, therefore large and takes up space. DOwnstream things like variant calling run on the binary bam format.

bwa mem (options...) | samtools view -o out.bam

Thank you. The samples are independent, but they belong to a four different populations (sampling sites).

Log in to answer this question.