sunbeam
sunbeam copied to clipboard
flagstats in mapping
Hi sunbeam team,
I have been modifying a bit the mapping
rule locally to be able to run only mapping with then the samtools flagstats
command on all of them to finally summarize everything in a table.
I was wondering whether you would be interested in adding such feature to sunbeam, and if so if I should open a pull request?
Thanks, Kenzo
Just managed to take a look now-- that looks pretty useful! It looks like the flagstats feature was added in samtools 1.10, so it would need a version bump in the environment.yml. I'm not a lead on Sunbeam things these days so I'll defer to @louiejtaylor on a PR versus extension or what have you. Thanks!
Hi, actually flagstat
is quite an old feature from samtools
so bumping the version should not be necessary. I actually just add my rules and it worked perfectelly for me.
The reason I need that was mainly to also avoid doing the mpileup
that I did not need and could be really ressource consuming when you have a lot of samples.
Oh, even better, then. And I see it now, I didn't realize that it takes either the command "flagstats" or "flagstat" in 1.10 but only "flagstat" in 1.9. Thanks.
But, does "flagstats" as you have in your branch work for you in samtools 1.9? Or did your samtools end up at a higher version, maybe? (My version that doesn't recognize the plural one is bioconda's samtools-1.9-h10a08f8_12. It only accepts samtools flagstat
.)
Indeed, you are right, I have version 1.10 of samtools
that I guess was installed since I reinstall sunbeam environment recently. In any case, what I can do is replace flagstats
by flagstat
in the rule name if you are ever interested in adding this to sunbeam "core"?
Yeah, maybe best to just stick with flagstat
since then there's no need to touch the package versioning.
Ok great! I am going to open a PR then.
Closing this now, the filtering implemented in sbx_mapping should accomplish the same end.