This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Samtools sort results are different
samtools view -bhq 20 -@ 16 ./${sample}.sam | \
  samtools sort -m 5G -@ 16 -o ./${sample}.bam

The following results were obtained

starting new job with ongoing=0
[bam_sort_core] merging from 0 files and 16 in-memory blocks...

However, when the same method is used for different samples, only the following results appear

starting new job with ongoing=0

I don't know why, how can I find the problem?

samtools

Hang on, are the results different or is the log different?

It's all different. Without [bam_sort_core] that line of information,we would have got BAM files of more than 100kb, but we got BAM files of 20KB and 30Kb.

Another strange point is that for the same sample, when I use the reference genome of the whole genome, there will be two lines of information

starting new job with ongoing=0
[bam_sort_core] merging from 0 files and 16 in-memory blocks...

In the mitochondrial reference genome, there is only one line of information

starting new job with ongoing=0

and there is no other information.

Try echo-ing $sample before each command. I have a feeling $sample.sam is doing something unexpected.

0 answers

No answers yet.

Log in to answer this question.