The old plotpeaks.sh script utilised bedtools to do some region merging.
I wanted to preserve the use of bedtools when translating the bash script to python code. So I wrote a bedtools_merge function in peakit.py. This utilise the pybedtools package. Although since bedtools merge function isn't really a complicated one, it'd be nice to just make our own implementation and remove the dependency.
Another reason to remove pybedtools dependency is because I think you can't install pybedtools if you don't have samtools installed on your machine (due to pybedtool's dependency to pysam, and how pysam requires the samtools library to compile). I need to double check this though.
pysam not being able to compile just seems to be a Python version 3.8.2 problem. Python version 3.8.2 is shipped with Catalina, and updating it to the latest version of 3.8(.10) fixed the problem.
The old
plotpeaks.sh
script utilisedbedtools
to do some region merging.I wanted to preserve the use of
bedtools
when translating the bash script to python code. So I wrote abedtools_merge
function inpeakit.py
. This utilise thepybedtools
package. Although since bedtools merge function isn't really a complicated one, it'd be nice to just make our own implementation and remove the dependency.Another reason to remove
pybedtools
dependency is because I think you can't installpybedtools
if you don't havesamtools
installed on your machine (due topybedtool
's dependency topysam
, and howpysam
requires thesamtools
library to compile). I need to double check this though.