chmccarthy / Pangloss

Pangenome analysis of eukaryotes.
GNU General Public License v3.0
18 stars 4 forks source link

about config file and command! #1

Closed sunnycqcn closed 5 years ago

sunnycqcn commented 5 years ago

Hello, Could you help me check the config file is correct? I try to run Pangloss.py with test dataset. However, I always get the error as following. I set the config file as following what you introduced. But I am not sure it is correct. The attachment config.txt

is my config file.

./Pangloss.py: line 81: Pangloss: A pipeline for pan-genome analysis of microbial eukaryotes.

Written by Charley McCarthy, Genome Evolution Lab, Department of Biology, Maynooth University between 2017-2019 (Charley.McCarthy@nuim.ie).

See Pangloss/README.md for more information.

To-do:

Recent changes: v0.9.1 (August 2019)

chmccarthy commented 5 years ago

This is due to a pretty basic error on my part, there was no Python shebang line at the start of Pangloss.py so your OS was interpreting the file through the shell rather than through Python itself. Should be resolved with the latest commit e99fd9b3648ec511a79b742c4fb7617367b83eff where I've added #!/usr/bin/env python to the top of Pangloss.py. As for your config file, nothing looks out of the ordinary to me there. I'm going to mark this issue as closed but feel to comment if you're having issues further down the line.

sunnycqcn commented 5 years ago

Hello, The above error have fixed. The yn00 path still looks some problem, although you have presented that it has been fixed. Could you help me check this error? Thanks, Fuyou

(Pangloss) [fuf@biocluster Test_Dataset]$ Pangloss.py --qc config.ini File "/home/AAFC-AAC/fuf/miniconda3/envs/Pangloss/bin/Pangloss.py", line 332 print "{0}, {1} has unusual frameshift mutation and can't be run through yn00.".format(e, cluster) ^ SyntaxError: invalid syntax

chmccarthy commented 5 years ago

I notice you're running Pangloss in miniconda3, which is Python3-based. Pangloss is Python2-based at the moment (it's what I was working in at the time of writing), so the fact that it uses the print statement rather than the print() function is what's causing the problem. I'll work on updating Pangloss to Python3 in the next few weeks once I have some downtime.

sunnycqcn commented 5 years ago

Hello, I think this error is still about python environment set. My question is Pangloss.py only can run under Python2.7. I installed Python2.7 environment under miniconda3 with two ways, I got the error as following. 1.under funannotate environment with Python2.7 Traceback (most recent call last): File "/home/AAFC-AAC/fuf/miniconda3/envs/funannotate/bin/Pangloss.py", line 630, in main() File "/home/AAFC-AAC/fuf/miniconda3/envs/funannotate/bin/Pangloss.py", line 585, in main PanOCTHandler(panoct_default_args) File "/home/AAFC-AAC/fuf/miniconda3/envs/funannotate/bin/Pangloss.py", line 284, in PanOCTHandler PanOCT.GenerateClusterFASTAs("genomes/genomes.txt") File "/home/AAFC-AAC/fuf/Pangloss/Pangloss/PanOCT.py", line 144, in GenerateClusterFASTAs core, acc = ParseMatchtable(matchtable) File "/home/AAFC-AAC/fuf/Pangloss/Pangloss/Tools.py", line 154, in ParseMatchtable clusters = reader(open(matchtable), delimiter="\t") IOError: [Errno 2] No such file or directory: './panoct/matchtable.txt' Traceback (most recent call last): File "/home/AAFC-AAC/fuf/miniconda3/envs/funannotate/bin/Pangloss.py", line 630, in main() File "/home/AAFC-AAC/fuf/miniconda3/envs/funannotate/bin/Pangloss.py", line 596, in main IPSHandler(ip_path) File "/home/AAFC-AAC/fuf/miniconda3/envs/funannotate/bin/Pangloss.py", line 294, in IPSHandler GO.RunInterProScan("/gm_pred/sets/allprot.db", ips_path, cores) File "/home/AAFC-AAC/fuf/Pangloss/Pangloss/GO.py", line 32, in RunInterProScan "./go/ips.db", "-o", "./go/ips.output.tsv", "-f", "tsv", "-cpu", str(cores)]) File "/home/AAFC-AAC/fuf/miniconda3/envs/funannotate/lib/python2.7/subprocess.py", line 172, in call return Popen(popenargs, **kwargs).wait() File "/home/AAFC-AAC/fuf/miniconda3/envs/funannotate/lib/python2.7/subprocess.py", line 394, in init errread, errwrite) File "/home/AAFC-AAC/fuf/miniconda3/envs/funannotate/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

  1. under python2.7 in miniconda3 Traceback (most recent call last): File "/home/AAFC-AAC/fuf/Pangloss/Pangloss.py", line 630, in main() File "/home/AAFC-AAC/fuf/Pangloss/Pangloss.py", line 585, in main PanOCTHandler(panoct_default_args) File "/home/AAFC-AAC/fuf/Pangloss/Pangloss.py", line 284, in PanOCTHandler PanOCT.GenerateClusterFASTAs("genomes/genomes.txt") File "/home/AAFC-AAC/fuf/Pangloss/Pangloss/PanOCT.py", line 144, in GenerateClusterFASTAs core, acc = ParseMatchtable(matchtable) File "/home/AAFC-AAC/fuf/Pangloss/Pangloss/Tools.py", line 154, in ParseMatchtable clusters = reader(open(matchtable), delimiter="\t") IOError: [Errno 2] No such file or directory: './panoct/matchtable.txt' Traceback (most recent call last): File "/home/AAFC-AAC/fuf/Pangloss/Pangloss.py", line 630, in main() File "/home/AAFC-AAC/fuf/Pangloss/Pangloss.py", line 596, in main IPSHandler(ip_path) File "/home/AAFC-AAC/fuf/Pangloss/Pangloss.py", line 294, in IPSHandler GO.RunInterProScan("/gm_pred/sets/allprot.db", ips_path, cores) File "/home/AAFC-AAC/fuf/Pangloss/Pangloss/GO.py", line 32, in RunInterProScan "./go/ips.db", "-o", "./go/ips.output.tsv", "-f", "tsv", "-cpu", str(cores)]) File "/home/AAFC-AAC/fuf/miniconda3/envs/py2/lib/python2.7/subprocess.py", line 172, in call return Popen(popenargs, **kwargs).wait() File "/home/AAFC-AAC/fuf/miniconda3/envs/py2/lib/python2.7/subprocess.py", line 394, in init errread, errwrite) File "/home/AAFC-AAC/fuf/miniconda3/envs/py2/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Thanks, Fuyou
chmccarthy commented 4 years ago

Hi Fuyou,

The error you're getting is the same in both runs:

clusters = reader(open(matchtable), delimiter="\t") IOError: [Errno 2] No such file or directory: './panoct/matchtable.txt'

In both cases Pangloss is looking for a file called "matchtable.txt" in the subfolder "panoct". This subfolder is for the output of panoct.pl, which runs pangenome analysis on your predicted protein sets. The error seems to imply that panoct.pl didn't run correctly or that organizing its output wasn't handled correctly, so maybe check to see that you can run panoct.pl in your environment. If you just want the predicted protein sets run Pangloss with the argument --pred_only.