Thanks for looking at it. All good suggestions.
Thanks, I will just recast the start and end to int before printing.
Yes it is awkward. Argparse is the only parser that allows multiple lists as arguments. I guess I should change to argparse, even though it feels less Pythonic to me. I guess I can look at the MACS source which allows multiple input files.
I will change to tab and use underscore - I used space mostly for own convenience (viewing files without less -S when debugging).
I should also write a bit about how SICER is better than other software (I have found) for relatively weak signals over long stretches. Undersold feature not obvious from the paper.
I like all your suggestions so far, feel free to make more. Same goes for any features from SICER I have removed. I guess I should add bam support by bamToBed.
If you are interested in participating more I can move the repo to an org repo (I will of course do all the grunt work/heavy lifting though).
If you prefer/need to use the original please see: https://github.com/dariober/SICERpy
Can you comment more on why you removed bam support?
Removing BAM support was a bad idea in my opinion. I couldn't give you a million reasons for why, but i'd certainly like to hear your thoughts on why. Was it just implementation/technical issues? Since you're doing all this in python perhaps I can help?
That chapter that you refer to is not applicable - it talks about using text to store parameters or simple, text oriented information.
That should not be constructed as an argument against having data in binary format.
You can scroll down Istvan ๐
Not sure what that means to scroll down - I don't see anything more that would argue otherwise. I do actually own and have studied the Pragmatic Programmer quite a bit - it used to be one of my favorite books - it has helped me become a better programmer.
It says that using a binary format where a text format could do is inefficient and counterproductive. But it clearly states that there are numerous use cases where a text format's weaknesses are "unacceptable"
You will probably rerun the analyses many times. Having to run a time-consuming conversion step (the most time-consuming one in the algorithm) each time would be silly. It is also IO-intensive so parallell execution would not help much.
I am not just writing epic but a lot of helper scripts for ChIP-Seq and differential ChIP Seq. Adding a conversion step to bed in all of these before running the scripts would be a waste.
Also, where should I store the temporary bed files? Overflowing /tmp/ dirs is an eternal issue.
If I were to stream the data to bed using pipes, epic would not be fast anymore. I get a massive speedup from multiple cores if I use text files, presumably because the system knows it has the file in memory already. This is not the case if I start the pipe with bamToBed blabla | ...
There are many things that can go wrong when converting bam to bed, due to wonky bam files. I would get a bunch of github issues about "epic not being able to use my bam files" if I were to silently convert to bed within my programs.
I'll write more about it in the docs eventually.
If you want to discuss bam-support, please do it here: https://github.com/endrebak/epic/issues/44
I think these are valid points - the simplicity of a tool and the reduced complexity is always important.
From my perspective it feels like a communication problem - to me it mainly sounded like "I removed BAM file processing because I read in the Pragmatic Programmers that binary files are bad" so I had to comment ;-)
We shouldn't be getting around wonky bam files by asking the user to figure it out on their own, but I understand your point that it's a lot of extra code/issues to look after and debug for other people.
Just a quick note while we're here, on Github you write
but this is only true if all the chromosomes are the same length which is rarely the case, particularly for human. I think a more realistic speed up would be ~3-4x. If you could rework the scheduler to a queue of X cpus, where X is the number of free system cores, this should give you a healthy speedup to around 4-5x, depending on how efficient disk IO was previously.