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

invalid syntax with newest updated mitofinder file #54

Open
michaeljmetzger opened this issue Dec 21, 2023 · 4 comments
Open

invalid syntax with newest updated mitofinder file #54

michaeljmetzger opened this issue Dec 21, 2023 · 4 comments

Comments

@michaeljmetzger
Copy link

I installed Mitofinder and when I run "mitofinder -h" I get this error that says line 148 in the mitofinder file has an error in it:

File "/home/metzgerm/mybiotools/MitoFinder/mitofinder", line 148
print "\n # For trimmed paired-end reads:\nmitofinder --megahit -j [seqid] \\n\t-1 [left_reads.fastq.gz] \\n\t-2 [right_reads.fastq.gz] \\n\t-r [genbank_reference.gb] \\n\t-o [genetic_code] \\n\t-p [threads] \\n\t-m [memory]\n\n # For trimmed single-end reads:\nmitofinder --megahit -j [seqid] \\n\t-s [SE_reads.fastq.gz] \\n\t-r [genbank_reference.gb] \\n\t-o [genetic_code] \\n\t-p [threads] \\n\t-m [memory]\n\n # For one assembly (one or more contig(s))\nmitofinder -j [seqid] \\n\t-a [assembly.fasta] \\n\t-r [genbank_reference.gb] \\n\t-o [genetic_code] \\n\t-p [threads] \\n\t-m [memory]\n"
^
SyntaxError: invalid syntax

@RemiAllio
Copy link
Owner

Hi,

MitoFinder is written in python2.7.
Does using the following command solve the problem?

python2.7 /home/metzgerm/mybiotools/MitoFinder/mitofinder -h

@michaeljmetzger
Copy link
Author

That does work! I am not sure why it defaults to python3. And I am not sure why MitoHiFi is not calling it with python2.7. I will try reinstalling MitoHiFi, making sure there are not other environments using python active to see if that fixes the issue that issue.

@RemiAllio
Copy link
Owner

The easiest fix might need you to replace the first line of MitoFinder executable and each .py file of the repository to ask the program to specifically use python2.7.
The line to write is as follows:
#!/usr/bin/python2.7
Corresponding to "#!"+the path to python 2 or python2.7 in your system (you can find the path using which python2.7)

sorry for the inconvenience…
Best,
Rémi

@michaeljmetzger
Copy link
Author

michaeljmetzger commented Dec 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants