Yes, it worked, thank you. It found 178.1k pairs and 33k singletons. I also tried bam2fastx-based script I found here but it found 211.3k pairs and 29k singletons. [However, using bam2fastx (from tophat) on its own exits fast with Error couldn't retrieve both reads for pair HWI..., although file was sorted by name]. Would appreciate clarifications on the inconsistencies between the results from these different approaches. Samtools flagstat output on this Bam file is:
447242 + 0 in total (QC-passed reads + QC-failed reads)
0 + 0 duplicates
447242 + 0 mapped (100.00%:-nan%)
447242 + 0 paired in sequencing
232755 + 0 read1
214487 + 0 read2
334230 + 0 properly paired (74.73%:-nan%)
413812 + 0 with itself and mate mapped
33430 + 0 singletons (7.47%:-nan%)
1354 + 0 with mate mapped to a different chr
1354 + 0 with mate mapped to a different chr (mapQ>=5)
My Bam file is from Tophat, and I would like to re-analyze these reads after filtering again with Tophat. Is it important to integrate them back with paired reads for re-analysis? It appears from here that singletons are not passed on to Cufflinks by Tophat for FPKM, but since they mapped, I would think that the Tophat/Cufflinks pipeline would make use of them? Are singletons tend to be splice-junction reads?