Closed kushtun closed 2 years ago
hello I know that having the python code would help a lot of persons I am working on a new version soon the .py will be available for the execution did you install the two packages needed for the run of the algorithm? and on wich os are you working on ? thanks for your email and sorry for that errors best On Dec 7, 2016 6:35 PM, "kushtun" notifications@github.com wrote:
Trying to run G4Hunter byte-compiled file results in:
File "./G4Hunter.py", line 1 SyntaxError: Non-ASCII character '\xcf' in file ./G4Hunter.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
Looks like bad magic number, etc. Generally not flexible to put up a byte-compiled python file for general use.
Having the .py file would allow people who don't have your particular flavor of python to still be able to run the tool.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AnimaTardeb/G4-Hunter/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AKtS4hw1AJUHdub7SBm1bcsVDOiL3CnFks5rFu5ggaJpZM4LG4H4 .
Hi,
I have the same problem. Actually the given file is a MacOS binary...
file G4Hunter
Gives:
G4Hunter: Mach-O 64-bit x86_64 executable
I can not run it under Linux.
Yes the file is a MacOS binary. It also appears the PATH handling is broken. I eventually got it running on MacOS Sierra, by running in the anaconda dir where my python is installed. Running in the install directory got:
G4-Hunter-master penington.j$ ./G4Hunter -h Traceback (most recent call last): File "G4Hunter.py", line 27, in init G4Hunter (/Users/MoiMeamina/G4Hunter-V4/G4/G4Hunter.c:8431) ImportError: No module named Bio
even though the biopython module was available (I checked). In a different directory:
anaconda penington.j$ ../G4-Hunter-master/G4Hunter -h
Welcome To G4Hunter :
(mac user here) i tried JocelynSP's method (no luck)
long story but on a mac i thought it was invoking system Python which is buried in /System/Library rather than /Library and ignores calls to manually installed current python libs and (at least mine) didnt like pip
...so i manually installed biopython using python 2.6 and now it works
but only if i run it from the biopython source dir
Im a python noob and this didnt make it any easier
Unfortunately, I have had no luck with any of the above solutions and am getting the same original error from kushtun's post. Anima, have you been able to produce a successful python code that could work in place of the byte-compiled file?
I am also working on a mac.
Can you please past the errors you have On May 17, 2017 10:27 PM, "mmrathbun333" notifications@github.com wrote:
Unfortunately, I have had no luck with any of the above solutions and am getting the same original error from kushtun's post. Anima, have you been able to produce a successful python code that could work in place of the byte-compiled file?
I am also working on a mac.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AnimaTardeb/G4-Hunter/issues/1#issuecomment-302221743, or mute the thread https://github.com/notifications/unsubscribe-auth/AKtS4gZrxyOoYrco05eqfUL3OoBqJ687ks5r61gZgaJpZM4LG4H4 .
File "G4Hunter", line 1 SyntaxError: Non-ASCII character '\xcf' in file G4Hunter on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
I have put up my own Python implementation as a "Pull request". I did not have a great deal of time I wanted to spend on it, so it does not make the demonstration plot, but if you run it with the supplied demonstration mitochondria file, and plot the 25-mer window scores you will see it gives the same result.
I get that error using python3 On Thu, 18 May 2017 at 7:27 am, Bedrat Amina notifications@github.com<mailto:notifications@github.com> wrote: I can help you if i know the commande executed, if you followed the instruction of the readme and if you have executed the fast test because all the errors bellow had been resolved and many other person successfully tuned the given version
Bedrat Amina dlF. https://github.com/AnimaTardeb/
On Wed, May 17, 2017 at 11:07 PM, mmrathbun333 notifications@github.com<mailto:notifications@github.com> wrote:
File "G4Hunter", line 1 SyntaxError: Non-ASCII character '\xcf' in file G4Hunter on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AnimaTardeb/G4-Hunter/issues/1#issuecomment-302232047, or mute the thread https://github.com/notifications/unsubscribe-auth/AKtS4jZkxKAksmI5w5aCYv6Lx4UdPLTHks5r62GkgaJpZM4LG4H4 .
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/AnimaTardeb/G4-Hunter/issues/1#issuecomment-302236698, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADwOrPkXQo20JzeE-WXyrPxFiTTlnD2Uks5r62ZKgaJpZM4LG4H4.
--
--
--
Brian Gloss | Senior Research Officer Genome Informatics Genomics and Epigenetics Division Garvan Institute of Medical Research The Kinghorn Cancer Centre, 370 Victoria Street, Darlinghurst, NSW 2010
Conjoint Lecturer, St Vincent's Clinical School, Faculty of Medicine, UNSW Australia Early Career Fellow, Cancer Institute of New South Wales
T: + 61 (0)2 9355 5768 I F: +61 (0)2 9295 8110 I E: b.gloss@garvan.org.au
www.garvan.org.au/research/cancer/genome-informatics
NOTICE Please consider the environment before printing this email. This message and any attachments are intended for the addressee named and may contain legally privileged/confidential/copyright information. If you are not the intended recipient, you should not read, use, disclose, copy or distribute this communication. If you have received this message in error please notify us at once by return email and then delete both messages. We accept no liability for the distribution of viruses or similar in electronic communications. This notice should not be removed.
Thank you all for your help. I followed the ReadMe and my issue is in the last command. I am using python 2.7 and tried running from within my biopython source dir (as suggested above), but still am getting the same error.
Molly-Rathbuns-MacBook-Pro:G4-hunter jax$ python G4Hunter -i Mitochondria_NC_012920_1.fasta -o tmp -w 25 -s 1.5
File "G4Hunter", line 1 SyntaxError: Non-ASCII character '\xcf' in file G4Hunter on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Molly-Rathbuns-MacBook-Pro:G4-hunter jax$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
The python implementation from JocelynSP ran with no problem, so I have used that approach as an alternative.
The binary does not run directly in python. Try calling it from your terminal I.e. G4Hunter -i Mitochondria_NC_012920_1.fasta -o tmp -w 25 -s 1.5
Also I got what appeared to be placeholder results file from running the native python implementation (I was trying to redo hg19) so I'd be interested in you get.
On Fri, 19 May 2017 at 12:17 am, Molly Rathbun notifications@github.com<mailto:notifications@github.com> wrote:
Thank you all for your help. I followed the ReadMe and my issue is in the last command. I am using python 2.7 and tried running from within my biopython source dir (as suggested above), but still am getting the same error.
`Molly-Rathbuns-MacBook-Pro:G4-hunter jax$ python G4Hunter -i Mitochondria_NC_012920_1.fasta -o tmp -w 25 -s 1.5
File "G4Hunter", line 1
SyntaxError: Non-ASCII character '\xcf' in file G4Hunter on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Molly-Rathbuns-MacBook-Pro:G4-hunter jax$ which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python`
The python implementation from JocelynSP ran with no problem, so I have used that approach as an alternative.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/AnimaTardeb/G4-Hunter/issues/1#issuecomment-302417237, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADwOrG-YXIhsVD4ygUZ8MYLb7Ay9gK3Kks5r7FLygaJpZM4LG4H4.
--
--
--
Brian Gloss | Senior Research Officer Genome Informatics Genomics and Epigenetics Division Garvan Institute of Medical Research The Kinghorn Cancer Centre, 370 Victoria Street, Darlinghurst, NSW 2010
Conjoint Lecturer, St Vincent's Clinical School, Faculty of Medicine, UNSW Australia Early Career Fellow, Cancer Institute of New South Wales
T: + 61 (0)2 9355 5768 I F: +61 (0)2 9295 8110 I E: b.gloss@garvan.org.au
www.garvan.org.au/research/cancer/genome-informatics
NOTICE Please consider the environment before printing this email. This message and any attachments are intended for the addressee named and may contain legally privileged/confidential/copyright information. If you are not the intended recipient, you should not read, use, disclose, copy or distribute this communication. If you have received this message in error please notify us at once by return email and then delete both messages. We accept no liability for the distribution of viruses or similar in electronic communications. This notice should not be removed.
Trying to run G4Hunter byte-compiled file results in:
File "./G4Hunter.py", line 1 SyntaxError: Non-ASCII character '\xcf' in file ./G4Hunter.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
Looks like bad magic number, etc. Generally not flexible to put up a byte-compiled python file for general use.
Having the .py file would allow people who don't have your particular flavor of python to still be able to run the tool.