RemiAllio / MitoFinder

MitoFinder: efficient automated large-scale extraction of mitogenomic data from high throughput sequencing data
86 stars 14 forks source link

invalid syntax with newest updated mitofinder file #54

Open michaeljmetzger opened 8 months ago

michaeljmetzger commented 8 months ago

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 commented 8 months ago

Hi,

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

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

michaeljmetzger commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

Thanks! MitoFinder now runs! It seems I have a different error with MitoHiFi now. I will come back to update if I ever fix it.

Michael J. Metzger Assistant Investigator Pacific Northwest Research Institute 720 Broadway Seattle, WA 98122 @. @. 206-330-1977 http://www.pnri.org/research-programs/metzger-lab/


From: Rémi Allio @.> Sent: Thursday, December 21, 2023 3:19:24 PM To: RemiAllio/MitoFinder @.> Cc: Michael Metzger @.>; Author @.> Subject: Re: [RemiAllio/MitoFinder] invalid syntax with newest updated mitofinder file (Issue #54)

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

— Reply to this email directly, view it on GitHubhttps://github.com/RemiAllio/MitoFinder/issues/54#issuecomment-1867043703, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMHW226WBKGDEV542BWN4BDYKS7XZAVCNFSM6AAAAABA64JNICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRXGA2DGNZQGM. You are receiving this because you authored the thread.Message ID: @.***>