JetBrains-Research / span

SPAN Semi-supervised Peak Analyzer
https://doi.org/10.1093/bioinformatics/btab376
MIT License
9 stars 1 forks source link

Drosophila chromosomes ignored #42

Closed AlePur closed 7 months ago

AlePur commented 7 months ago

Hello, Thanks for the great peak calling tool.

It works with human ChIP but fails with drosophila (dm6) when creating SPAN model. The tool ignores chr2L/R and chr3L/R and thinks there are no reads on these chromosomes, even if the bigwigs show that there are reads. I suspect it has something to do with the names of these chromosomes, as chrX and chr4 are treated normally. I have made a hack where I rename the chromosomes (chr2L->chr2, chr2R->chr12, etc) in my bam file and call peaks directly without creating SPAN model (-f 0.0000001 -p out.peaks), and then I rename the chromosomes back to their original files in the bed file. However, as I said, this cannot be done with the model as I don't know how to rename the chromosomes after I get the SPAN model. Are they contained in the null.npz file? Editing the information.json and tar-ing the SPAN model again makes JBR unable to load the model.

I hope this can be fixed in the future, as I really enjoy the high quality peaks and don't want to use MACS2 ever again.

Aleksander

olegs commented 7 months ago

Hello, @AlePur Thank you for reporting this! Could you provide example of BAM file (downsampled) with chrome.sizes file, please?

AlePur commented 7 months ago

https://drive.google.com/file/d/1eOUyIivfUWALgPsCtn_rJG1TGPV2vyFY/view?usp=sharing

I ran this command: (same problem with control input.bam and higher ram (20GB)) java -Xmx8G -jar ../span-1.4.jar analyze -t sampled.bam --cs dm6.chrom.sizes -m out.span Peaks from chr2L, chr2R, chr3L, chr3R are missing. I am using 1.4 because it works with JBR and I'm not sure if the bug still exists in newest version. However, I my guess is that it's not fixed.

As I said, I think it's somehow a problem with the names of the chromosomes

Thanks for the quick answer, Aleksander

AlePur commented 7 months ago

With the latest version, I think the problem is resolved. I cannot be sure if the problem was caused by me possibly providing a human chrom.sizes file or something else.

Thanks again for the tool!