Open skchronicles opened 1 year ago
I just noticed that there was a that was a PR submitted to address the issue here: https://github.com/Magdoll/cDNA_Cupcake/pull/239
I ran into a few other issues while installing cDNA_Cupcake. I will describe each of them below:
The python package, sklearn
, that is listed in the setup.py file is depreciated and it has been removed from the python package index for the version of python that I am using python/3.10.6
default version you can install via apt-get for ubuntu/22.04-LTS
. It can be fixed by replacing sklearn
in the setup.py with scikit-learn
.
np.int
has been depreciated in numpy>=1.20.0
. Here is a description of the change. This causing problems in a few different places where you are declaring integers types in a few of your scripts:
To fix this issue, I replaced np.int
with np.int_
as the authors of numpy have suggested.
TLDR
To summarize, here are the set of commands, I had to run to install/patch cDNA_Cupcake to install it with python/3.10.6
:
mkdir -p /opt2/cdna_cupcake/28.0.0/ \
&& wget https://github.com/Magdoll/cDNA_Cupcake/archive/refs/tags/v28.0.0.tar.gz -O /opt2/cdna_cupcake/28.0.0/v28.0.0.tar.gz \
&& tar -zvxf /opt2/cdna_cupcake/28.0.0/v28.0.0.tar.gz -C /opt2/cdna_cupcake/28.0.0/ \
&& rm -f /opt2/cdna_cupcake/28.0.0/v28.0.0.tar.gz \
&& cd /opt2/cdna_cupcake/28.0.0/cDNA_Cupcake-28.0.0 \
# Patch: some pyx files contain python2,
# need to specify the langauage_level as
# py2 otherwise it defaults to py3.
&& sed -i 's/cythonize(ext_modules)/cythonize(ext_modules, language_level = "2")/' setup.py \
# sklearn is depreciated, use scikit-learn instead
&& sed -i 's/sklearn/scikit-learn/' setup.py \
# numpy, np.int is depreciated, use int instead:
# https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
&& find /opt2/cdna_cupcake/28.0.0/cDNA_Cupcake-28.0.0 \
-type f -exec grep 'np\.int' {} /dev/null \; 2> /dev/null \
| awk -F ':' -v q="'" -v b='\\' '{print "sed -i", q"s/np"b".int"b"("b"s"b"|$"b")/np.int_/g"q,$1}' \
| sort \
| uniq \
| bash \
&& python setup.py build \
&& python setup.py install
export PATH="${PATH}:/opt2/cdna_cupcake/28.0.0/cDNA_Cupcake-28.0.0/sequence"
Hello there,
I hope you're having an awesome day, and that all is going well on our side. I just wanted to reach out to you because I ran into an issue when installing/building cDNA_cupcake using the instructions that you have provided. I am installing/building cDNA_cupcake to use with sqanti3 with
python/3.10.6
.Here is the command I am running to install
cDNA_Cupcake/v28.0.0
:And here is the error message/traceback I get when running the command above:
It appears this pyx script,
cupcake/tofu/branch/c_branch.pyx
, contains python2 syntax. The warning the compiler is giving above before the traceback states that because the Compiler language_level directive is not set, it is defaulting to python3:This is causing the compiler to error out when it reaches the python2 style print statement. Can you please fix this on your side when you have a moment of free time? I also noticed this issue is documented/described here in at sqanti3. For the time being, I am going to patch the setup.py similar to what is described in the sqanti issue.
Thank you again for your time, and have a great day!
Best regards, @skchronicles