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] sqanti3_qc.py :: use sys.executable instead of plain python3 call for inner command #354

Open
1 of 2 tasks
EricDeveaud opened this issue Nov 19, 2024 · 2 comments
Open
1 of 2 tasks
Labels
triage For developers to check

Comments

@EricDeveaud
Copy link

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,

sqanti3_qc.py use plain hard coded python3 call for inner commands.

ISOANNOT_CMD = "python3 "+ ISOANNOT_PROG + " {g} {c} {j} -gff3 {t} -o {o} -novel -stdout {i}".format(g=correctedGTF , c=outClassFile, j=outJuncFile, t=gff3_opt, o=iso_out, i=isoAnnot_sum)
sqanti3_qc.py:        ISOANNOT_CMD = "python3 "+ ISOANNOT_PROG + " {g} {c} {j} -o {o} -novel".format(g=correctedGTF , c=outClassFile, j=outJuncFile, o=iso_out)

when running with another interpreter than the one in PATH this may break.

PYTHON3 = sys.executable
ISOANNOT_CMD = sys.executale + " "+ ISOANNOT_PROG + " {g} {c} {j} -gff3 {t} -o {o} -novel -stdout {i}".format(g=correctedGTF , c=outClassFile, j=outJuncFile, t=gff3_opt, o=iso_out, i=isoAnnot_sum)
sqanti3_qc.py:        ISOANNOT_CMD = sys.executable + " " + ISOANNOT_PROG + " {g} {c} {j} -o {o} -novel".format(g=correctedGTF , c=outClassFile, j=outJuncFile, o=iso_out)

will be more robust and coinsistent.

regards

Eric

Code sample

No response

Error

No response

Anything else?

No response

@EricDeveaud EricDeveaud added the triage For developers to check label Nov 19, 2024
@EricDeveaud
Copy link
Author

same apply to sqanti_reads.py
python hardcoded

                cmd_sqanti = f"python {sqantiqcPath}/sqanti3_qc.py {gtf_files} {args.annotation} {args.genome} --skipORF --min_ref_len {args.min_ref_len} --aligner_choice {args.aligner_choice} -t {args.cpus} -d {args.input_dir}/{file_acc} -o {sampleID} -s {args.sites}"
                cmd_sqanti = f"python {sqantiqcPath}/sqanti3_qc.py {fastq_files} {args.annotation} {args.genome} --skipORF --min_ref_len {args.min_ref_len} --aligner_choice {args.aligner_choice} -t {args.cpus} -d {args.input_dir}/{file_acc} -o {sampleID} -s {args.sites} --fasta"
    cmd_plotting = f"python {plotting_script_path} --ref {args.annotation} --design {args.inDESIGN} -o {args.dir} --gene-expression {args.ANNOTEXP} --jxn-expression {args.JXNEXP} --perc-coverage {args.PERCCOV} --perc-junctions {args.PERCMAXJXN}"

@EricDeveaud
Copy link
Author

the same way sqanti3_rescue.py may replace python_path = distutils.spawn.find_executable('python') by python_path=sys.executable

NB depending on the OS, the packager, python may be python3 maybe not ;-)

eg on RHEL8

[gensoft]maestro-builder:SQANTI3/5.2.2 > python --version
Python 2.7.17
[gensoft]maestro-builder:SQANTI3/5.2.2 > python3 --version
Python 3.6.8

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

1 participant