nf-core / bamtofastq

Converts bam or cram files to fastq format and does quality control.
https://nf-co.re/bamtofastq
MIT License
21 stars 13 forks source link

Edge case: less than 1000 reads #22

Closed FriederikeHanssen closed 6 months ago

FriederikeHanssen commented 3 years ago

For checking whether or not the file is paired end, the first 1000 reads are used. This was done originally to significantly improve runtime. However, when there are less than 1000 reads in the file present, i.e. as in some very small testdata, than this results in truly paired end reads, being detected as single end reads.

Solution idea:

check for the Toal number of reads. If they are above 1000, then proceed as no, otherwise take the total number of reads