ssadedin / bazam

A read extraction and realignment tool for next generation sequencing data
GNU Lesser General Public License v2.1
99 stars 16 forks source link

samtools view -bSu in pipe is now redundant #17

Open tseemann opened 5 years ago

tseemann commented 5 years ago

FYI, the samtools view is not needed since version 1.3 (or earlier possibly)

java -jar build/libs/bazam.jar -bam my.bam | \
         bwa mem -p ref.fa  - | \
         samtools view -bSu - | \
         samtools sort -o out.bam 

Can be done as:

java -jar build/libs/bazam.jar -bam my.bam | \
         bwa mem -p ref.fa  - | \
         samtools sort > out.bam 

Much speed can be gained by using sort --threads X and --memory Xm too.

ssadedin commented 5 years ago

Thanks - will update docs!