pachterlab / splitcode

Flexible and efficient parsing, interpreting and editing of sequencing reads
https://pachterlab.github.io/splitcode/
BSD 2-Clause "Simplified" License
35 stars 0 forks source link

Counting all tag combinations and reads without tags #14

Open andreafratton opened 2 months ago

andreafratton commented 2 months ago

Hi, very useful tool! I would like to count the number of occurrences of all tag combinations despite using --keep-grp to select only certain combinations. Moreover, I wonder whether there is a possibility to add the count of all reads where no tag was identified to the mapping.txt file.

Yenaled commented 2 months ago

There is no feature to count all tag combinations while using --keep-grp. The only way to do so currently is to rerun the program without --keep-grp to generate a new file. Then, to count reads where no tag was identified, you can take the total number of reads processed and subtract by the sum of the numbers in that new file.

This is one of the cases where the program needs to be run twice to get your desired result (but your second run of the program doesn't need to write any output at least).

It is difficult to write a program that can encompass every single use case with just one run of the program, but I'll leave this issue open as these are things that could be added in a future release.