And it is not working :/
"It is not working" is not really helpful, copy the error message, or, if no error message, explicitly say "there is no error message and bedtools produces an empty file", or something to this effect.
Anyway, I believe your command should be:
bedtools coverage -a file.bam -b file.gff
As per documentation:
As of version 2.24.0, the coverage tool has changed such that the coverage is computed for the A file, not the B file.
You are right, the command I gave above is the opposite of what you want. You really want
bedtools coverage -a file.gff -b file.bam
Regarding the error you got (
slurmstepd: error: task/cgroup: unable to add task[pid=XXXXXXX] to memory cg '(null)), it is related to excessive memory use. You can ask for more memory or try different queue. If you sort both bam and gff, you can pass the argument
-sorted to bedtools, which is both faster and uses less memory.
May it work if I convert the bam to bed?
Yes, should work both with bam or bed.
modified 25 days ago
26 days ago by
h.mon ♦ 18k