carolzhou / multiPhATE

Throughput PhATE processing of draft or finished phage genomes
14 stars 7 forks source link

syntax error on sample config #9

Closed bognabognabogna closed 5 years ago

bognabognabogna commented 5 years ago

Hello, Thank you for sharing this pipeline, it seems to be able to solve all of my problems ;-) I am trying to run it on the sample config file, however, I get a vey similar error (see below) to the one reported in one of the closed issues (https://github.com/carolzhou/multiPhATE/issues/7).

I have included to following command in the script: print(sys.version) to make sure I use the right python version (which was the solution for the previous issue) and it is indeed python 3.7.4.

Do you happen to know how to fix this issue? Best wishes Bogna

>> python3 multiPhate.py sample.multiPhate.config _3.7.4 (default, Sep 7 2019, 18:27:02) [Clang 10.0.1 (clang-1001.0.46.4)] Checking files... Configuration complete. Preparing to run genecall module... Calling the gene-call module. File "/Users/bognasmug/Applications/multiPhATE/multiPhATE-master/GeneCalling/phate_genecallPhage.py", line 416 print(fileType, ": ", files[fileType], end=' ') ^ SyntaxError: invalid syntax Done! Preparing command strings for homology searches... Calling the sequence annotation module. Traceback (most recent call last): File "/Users/bognasmug/Applications/multiPhATE/multiPhATE-master/SequenceAnnotation/phate_sequenceAnnotation_main.py", line 87, in import phate_fastaSequence # generic fasta sequence module File "/Users/bognasmug/Applications/multiPhATE/multiPhATE-master/SequenceAnnotation/phatefastaSequence.py", line 426 print("Codon start locations:", end=' ')

carolzhou commented 5 years ago

Yes, that is an error that occurs under Python 2.x. It should not be happening under 3.x. I will do some more testing.

Sent from my iPhone

On Oct 15, 2019, at 7:39 AM, bognabognabogna notifications@github.com<mailto:notifications@github.com> wrote:

Hello, Thank you for sharing this pipeline, it seems to be able to solve all of my problems ;-) I am trying to run it on the sample config file, however, I get a vey similar error (see below) to the one reported in one of the closed issues (#7https://github.com/carolzhou/multiPhATE/issues/7).

I have included to following command in the script: print(sys.version) to make sure I use the right python version (which was the solution for the previous issue) and it is indeed python 3.7.4.

Do you happen to know how to fix this issue? Best wishes Bogna

python3 multiPhate.py sample.multiPhate.config 3.7.4 (default, Sep 7 2019, 18:27:02) [Clang 10.0.1 (clang-1001.0.46.4)] Checking files... Configuration complete. Preparing to run genecall module... Calling the gene-call module. File "/Users/bognasmug/Applications/multiPhATE/multiPhATE-master/GeneCalling/phate_genecallPhage.py", line 416 print(fileType, ": ", files[fileType], end=' ') ^ SyntaxError: invalid syntax Done! Preparing command strings for homology searches... Calling the sequence annotation module. Traceback (most recent call last): File "/Users/bognasmug/Applications/multiPhATE/multiPhATE-master/SequenceAnnotation/phate_sequenceAnnotation_main.py", line 87, in import phate_fastaSequence # generic fasta sequence module File "/Users/bognasmug/Applications/multiPhATE/multiPhATE-master/SequenceAnnotation/phate_fastaSequence.py", line 426 print("Codon start locations:", end=' ')

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/carolzhou/multiPhATE/issues/9?email_source=notifications&email_token=ACWGOO3FMCO2AFOHI6EXCXTQOXI2FA5CNFSM4JA5UETKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HR4UNLA, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACWGOOYONOLG36N7NDRISXDQOXI2FANCNFSM4JA5UETA.

rmostowy commented 5 years ago

Hi,

I have the same issue and I have executed the command using python 3.7.4 python3 multiPhate.py multiPhate.config However, the python command points to the version 2.7.10. Could it be that the main code relies on the python command, hence causing the version problem?

Rafal

carolzhou commented 5 years ago

Yes, I think this is the problem. There are two ways around this, currently: 1) You can run the code in a Conda environment that is set up to run Python 3.x. In this way, the driver code and all subordinate processing will be executed under Python 3.x. 2) You can identify (via grep) all of the lines of code that perform “python ….” and change those to “python3 ….”. I recommend fix #1, as it is never a good idea to be modifying the code. In a future release I can insert code to auto-detect the default python version. This is not something I had anticipated, since I’m now using Conda environments, as this is the easiest and most convenient way to manage various codes that depend on different versions of Python and other tools.

Thank you for using multiPhATE, and I appreciate your feedback. Please do let me know if either of these fixes solve the problem in your hands.

-Carol Zhou

From: rmostowy notifications@github.com Reply-To: carolzhou/multiPhATE reply@reply.github.com Date: Wednesday, October 16, 2019 at 2:34 AM To: carolzhou/multiPhATE multiPhATE@noreply.github.com Cc: Carol Zhou zhou4@llnl.gov, Comment comment@noreply.github.com Subject: Re: [carolzhou/multiPhATE] syntax error on sample config (#9)

Hi,

I have the same issue and I have executed the command using python 3.7.4 python3 multiPhate.py multiPhate.config However, the python command points to the version 2.7.10. Could it be that the main code relies on the python command, hence causing the version problem?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/carolzhou/multiPhATE/issues/9?email_source=notifications&email_token=ACWGOOYPZBNAIJS43BUGSF3QO3NYTA5CNFSM4JA5UETKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBL2VJI#issuecomment-542616229, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACWGOO3OOSEXUG472Q3T3J3QO3NYTANCNFSM4JA5UETA.

bognabognabogna commented 5 years ago

Thank you Carol. Running the code in a conda environment helped indeed!

carolzhou commented 5 years ago

I’m so glad. Let me know if you encounter any other issues. Thank you for using multuPhATE.

Sent from my iPhone

On Oct 26, 2019, at 9:01 AM, bognabognabogna notifications@github.com wrote:



Thank you Carol. Running the code in a conda environment helped indeed!

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/carolzhou/multiPhATE/issues/9?email_source=notifications&email_token=ACWGOOY5UUUPDP3NW6EYR4TQQRST3A5CNFSM4JA5UETKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECKLA4A#issuecomment-546615408, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACWGOO2LGDFXYPKOWIFZ63DQQRST3ANCNFSM4JA5UETA.