Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] sqantie_qc.py report generation #363

Closed
2 tasks done
wdesaintjean opened this issue Dec 10, 2024 · 4 comments
Closed
2 tasks done

[BUG] sqantie_qc.py report generation #363

wdesaintjean opened this issue Dec 10, 2024 · 4 comments
Assignees
Labels
triage For developers to check

Comments

@wdesaintjean
Copy link

wdesaintjean commented Dec 10, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Have you loaded the SQANTI3.env conda environment?

  • I have loaded the SQANTI3.env conda environment

Problem description

Hello everyone,
I try to run sqantie_qc.py with the docker image provided in the git hub (v5.3.30, the latest) and I have one error when I ask to generate a report in markdown or pdf format.
When I use the argument --report skip, it's working well, but I want to have the "pretty" qc report if possible.
As I understand, a python dependencies in missing in the docker image, but I want to know if there are a solution be fore modifying your Dockerfile.
It's perhaps possible to use your R script (/SQANTI3/utilities/report_qc/SQANTI3_report.R) in local, but it's a little complicate to adapt the code.

Thank you for every answers you can provide

Code sample

sqanti3_qc.py corrected_gtf.gtf $gtf $fasta
-t $task.cpus
-o ${name_out}.sqanti3_qc
--dir ${name_out}.sqanti3_qc
--report both

Error

Command error:
/opt2/sqanti3/5.3.0/SQANTI3-5.3.0/sqanti3_qc.py:85: SyntaxWarning: invalid escape sequence '.'
seqid_rex1 = re.compile('PB.(\d+).(\d+)$')
/opt2/sqanti3/5.3.0/SQANTI3-5.3.0/sqanti3_qc.py:86: SyntaxWarning: invalid escape sequence '.'
seqid_rex2 = re.compile('PB.(\d+).(\d+)|\S+')
/opt2/sqanti3/5.3.0/SQANTI3-5.3.0/sqanti3_qc.py:87: SyntaxWarning: invalid escape sequence '.'
seqid_fusion = re.compile("PBfusion.(\d+).(\d+)\S*")
/opt2/sqanti3/5.3.0/SQANTI3-5.3.0/sqanti3_qc.py:582: SyntaxWarning: invalid escape sequence '\S'
gmst_rex = re.compile('(\S+\t\S+|GeneMark.hmm)|(\d+)_aa|(\S)|(\d+)|(\d+)')
Traceback (most recent call last):
File "/opt2/sqanti3/5.3.0/SQANTI3-5.3.0/sqanti3_qc.py", line 19, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'

Anything else?

No response

@wdesaintjean wdesaintjean added the triage For developers to check label Dec 10, 2024
@Fabian-RY
Copy link
Collaborator

Hi @wdesaintjean

Thanks for reaching us. Can you please show the full command you are using to launch Sqanti3 QC, including the docker parameters? I checked the presence of numpy and it's indeed installed in the container in the published version v5.3.0. I can execute both sqanti3_qc and use numpy inside the container using this line

docker run -it anaconesalab/sqanti3:5.3.0 sqanti3_qc.py

Fabián

@wdesaintjean
Copy link
Author

wdesaintjean commented Dec 12, 2024

Thanks for your answer, here is my complete command:
sqanti3_qc.py corrected_gtf.gtf Mus_musculus.GRCm38.99.gtf Mus_musculus.GRCm38.dna.primary_assembly.fa -t 12 -o stringtie2.sqanti3_qc --dir stringtie2.sqanti3_qc --report both

To be exact, I use the docker container in a nextflow module. I rebuild the image from your Dockerfile to be sure to have the most up to date version, you can find it on dockerhub: wdesaint/sqanti3
You are right, the python package seem to be here:

docker run -it wdesaint/sqanti3
user@52ca6467a49e:/data2$ pip list
WARNING: The directory '/home/user/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Package              Version
-------------------- -----------
argcomplete          3.4.0
argh                 0.31.3
bcbio-gff            0.7.1
biopython            1.81
bx-python            0.11.0
certifi              2024.8.30
contourpy            1.3.1
cycler               0.12.1
Cython               3.0.11
dill                 0.3.9
edlib                1.3.9.post1
fonttools            4.55.2
gffutils             0.13
gtftools             0.9.0
importlib_metadata   8.5.0
intervaltree         3.1.0
Jinja2               3.1.4
joblib               1.4.2
kiwisolver           1.4.7
MarkupSafe           3.0.2
matplotlib           3.9.3
munkres              1.1.4
numpy                1.26.4
packaging            24.2
pandas               2.2.3
parasail             1.3.4
patsy                1.0.1
pdf2image            1.17.0
pillow               10.3.0
pip                  24.3.1
psutil               6.1.0
pybedtools           0.10.0
pyfaidx              0.8.1.3
pyparsing            3.2.0
pysam                0.22.1
python-dateutil      2.9.0.post0
pytz                 2024.1
PyYAML               6.0.2
scikit-learn         1.5.2
SciPy                1.11.4
seaborn              0.13.2
setuptools           75.6.0
simplejson           3.19.3
six                  1.17.0
sortedcontainers     2.4.0
statsmodels          0.14.4
threadpoolctl        3.5.0
toml                 0.10.2
tomlkit              0.13.2
tzdata               2024.2
ultra_bioinformatics 0.1
unicodedata2         15.1.0
wheel                0.45.1
xmltodict            0.14.2
yq                   3.4.3
zipp                 3.21.0

And I said a mistake, the program return the same error no matter the type of output asked.
But why did it not working then? If you have any idea, please let me know. I will ask to my colleagues if they know the reason.

I don't know if this can help to solve the problem, but with the image skchronicles/sqanti3 pull few weeks ago, the only problem I encounter was a missing package in R, and i was unable to produce markdown and pdf report, but i had the output of sqanti_QC if I precised --report skip

@Fabian-RY
Copy link
Collaborator

Hi @wdesaintjean

I assume that you have build the docker without changes, so your docker, the one build from dockerfile and the one we have uploaded in dockerhub is the same image. Please tell me if that's not correct.

Can you please run these commands outside nextflow, directly on the terminal:

sqanti3_qc.py -h
docker run -it anaconesalab/sqanti3:5.3.0 sqanti3_qc.py -h
docker run -it wdesaint/sqanti3 sqanti3_qc.py -h

and tell me if any of those throws the error?

I suspect that maybe your nextflow pipeline is using the host python instead of the docker, which doesn't have numpy installed. Numpy is the first non-standard library that sqanti qc needs.

Regards

Fabián

@wdesaintjean
Copy link
Author

wdesaintjean commented Dec 13, 2024

Thank you again,
In fact the problem come for our server, that use charliecloud image (convert from docker) that needed to add a specific line to activate the conda environment in the image.
Our instalation is very specific.
Thank you for your help, I expect to be able to use SQANTI3 in my pipeline during the next week, I will close the issue at this moment if all works well.

@pabloati pabloati self-assigned this Jan 17, 2025
@wdesaintjean wdesaintjean reopened this Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage For developers to check
Projects
None yet
Development

No branches or pull requests

3 participants