Hi, I'm experiencing difficulties trying to downsample .bam files using samtools view -s. Specifically some of the commands fail while others work; this seems sometimes to be correlated with the -s float argument being > 0.5 (but not always). Here I'm c/p'ing some of the code that worked and some which failed.
Thanks to any helpful suggestions!
samtools view -b -s 0.271 1.bam > 1_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.5077 2.bam > 2_ds.bam # gives 0 reads unexpectedly
samtools view -b -s 0.2113 3.bam > 3_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.3322 4.bam > 4_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.5306 5.bam > 5_ds.bam# gives 0 reads unexpectedly
samtools view -b -s 0.204 6.bam > 6_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.3841 7.bam > 7_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.4691 8.bam > 8_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.6861 9.bam > 9_ds.bam # gives 0 reads unexpectedly
samtools view -b -s 0.2261 10.bam > 10_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.6653 23.bam > 23_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.0444 24.bam > 24_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.0492 25.bam > 25_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.1648 26.bam > 26_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.0801 27.bam > 27_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.171 28.bam > 28_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.0979 29.bam > 29_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.0511 30.bam > 30_ds.bam # gives 730697 reads as expected
Thanks to any helpful suggestions!
samtools view -b -s 0.271 1.bam > 1_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.5077 2.bam > 2_ds.bam # gives 0 reads unexpectedly
samtools view -b -s 0.2113 3.bam > 3_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.3322 4.bam > 4_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.5306 5.bam > 5_ds.bam# gives 0 reads unexpectedly
samtools view -b -s 0.204 6.bam > 6_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.3841 7.bam > 7_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.4691 8.bam > 8_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.6861 9.bam > 9_ds.bam # gives 0 reads unexpectedly
samtools view -b -s 0.2261 10.bam > 10_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.6653 23.bam > 23_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.0444 24.bam > 24_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.0492 25.bam > 25_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.1648 26.bam > 26_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.0801 27.bam > 27_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.171 28.bam > 28_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.0979 29.bam > 29_ds.bam # gives 730697 reads as expected
samtools view -b -s 0.0511 30.bam > 30_ds.bam # gives 730697 reads as expected
Comment