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

Pathway Tools is not in the Path, mpwt can not work without it. #83

Closed
ChenCongZ opened this issue Nov 13, 2022 · 23 comments
Closed

Pathway Tools is not in the Path, mpwt can not work without it. #83

ChenCongZ opened this issue Nov 13, 2022 · 23 comments

Comments

@ChenCongZ
Copy link

When I run this pipeline, it prompts me: Pathway Tools is not in the Path, mpwt can not work without it. How should I solve it?

@ArnaudBelcour
Copy link
Contributor

Hi @ChenCongZ,

This message indicates that Pathway Tools executable (pathway-tools) is not available in the path environment variable. Have you installed Pathway Tools and add it to the path?

To add Pathway Tools to the path variable after its installation is explained in the readme:

https://github.com/AuReMe/mpwt#requirements

For Linux and macOS it is by using the following commands:

echo 'export PATH="$PATH:/your/install/directory/pathway-tools:"' >> ~/.bashrc
source ~/.bashrc

For Windows, you must add the path of the pathway tools folder to the Environment Variables. Open the Environment Variables window, select the Advanced system settings, Environment Variables. Then crate a new variables in the System variable.

But mpwt has not been tested on Windows, so I do not know if it works.

@ChenCongZ
Copy link
Author

Dear Mr AuReMe,
I run it in the window and put it in the System variable. Please check below.
QQ浏览器截图20221114202705

@ChenCongZ
Copy link
Author

Hi @ArnaudBelcour,
Its installation location is C:\Program Files\Pathway Tools according to https://github.com/AuReMe/mpwt#requirements. So it must be my installation problem or its path setting problem. However, I also tried many changes. No key problem was found.

@ChenCongZ
Copy link
Author

I tried it, too.
QQ浏览器截图20221114205503

@ChenCongZ
Copy link
Author

detailed information:
QQ浏览器截图20221114211800

@ArnaudBelcour
Copy link
Contributor

I think there is no problem with your installation of Pathway Tools.

For your environment variable, I think that there is an issue. The variable column (变量) of the System variable window must be path to add the path of Pathway Tools and not C:\Program Files\Pathway Tools to have access to the executable files in the path. But this will give access to the path to executables such as ptools.bat and at this time mpwt does not handle these scripts (and I am not sure if it will handle them one day). Especially since I do not have the time to make these modifications.

As I have explained in my first post, we tested and used mpwt only on Linux and macOS. On Windows, I have only used using the Windows Subsystem for Linux (by installing the Ubuntu subsystem on it and then installing the Pathway Tools installer associated with Linux), otherwise I do not think that mpwt can work with the powershell.

@ChenCongZ
Copy link
Author

Hi @ArnaudBelcour
Thank you for your help.
This problem occurred when I installed Pathway Tools, and I suspect that my window system can't read it. However, I have tried many methods, but I can't find the key installation problem. Can you check it for me?
QQ截图20221115190345

Warning: EnableWindow: (error 127) 找不到指定的程序(The specified program could not be found).

@ChenCongZ
Copy link
Author

I made the changes according to your suggestion.
QQ截图20221115190814

@ChenCongZ
Copy link
Author

Hi @ArnaudBelcour ,
Thank you for your help. I have solved the problem of the path. Can you tell me the version of the Pathway Tools used in testing "Metage2Metabo\test\metabolic_data\toy_bact"

@ChenCongZ
Copy link
Author

Because I want to get toy_bact SMBL format in testing "Metage2Metabo\test\metabolic_data\toy_bact"

@ChenCongZ
Copy link
Author

Hi @ArnaudBelcour,
This problem always occurs when I run Mpwt.
mpwt.multiprocess_pwt(input_folder='bacteria',patho_inference=True)
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\chencong\AppData\Local\Programs\Python\Python39\lib\site-packages\mpwt\mpwt_workflow.py", line 79, in multiprocess_pwt
error = utils.check_ptools_local_pwt()
File "C:\Users\chencong\AppData\Local\Programs\Python\Python39\lib\site-packages\mpwt\utils.py", line 61, in check_ptools_local_pwt
ptools_path = find_ptools_path()
File "C:\Users\chencong\AppData\Local\Programs\Python\Python39\lib\site-packages\mpwt\utils.py", line 46, in find_ptools_path
ptools_local_str = [line for line in pathway_tools_file if 'PTOOLS_LOCAL_PATH' in line][0]
File "C:\Users\chencong\AppData\Local\Programs\Python\Python39\lib\site-packages\mpwt\utils.py", line 46, in
ptools_local_str = [line for line in pathway_tools_file if 'PTOOLS_LOCAL_PATH' in line][0]
File "C:\Users\chencong\AppData\Local\Programs\Python\Python39\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte

@ArnaudBelcour
Copy link
Contributor

Hi @ChenCongZ,

I do not think that the error comes from your installation of Pathway Tools.
mpwt is not working on Windows (as the binary and paths seem to be different from the ones of the Linux/macOS versions) and I have not the time and resource to work on this.

@ChenCongZ
Copy link
Author

Hi @ArnaudBelcour,
Thank you for your suggestion!
Recently I tried to solve these problems with ubuntu ( linux operating system) and got some progress. At the same time, I encountered some problems in the mpwt pipeline. It shown below:

Screenshot from 2022-11-25 10-51-46

@ChenCongZ
Copy link
Author

I used your data to get some results in the mpwt, but I have a question: I get XML data format like this, not the same as you get.Does this have an impact on M2M pipeline analysis?
Screenshot from 2022-11-25 19-41-53
Screenshot from 2022-11-25 19-42-17

@ArnaudBelcour
Copy link
Contributor

Hi @ChenCongZ,

For the first issue, it comes from the taxon_id.tsv file (for more information look at the readme). There are issues in the format, this file must look like:

Column 1 (ID) Column 2 (taxonomic ID)
bin_1 562

The taxonomic ID corresponds to the taxonomic ID associated with your organism in the NCBI taxonomy database. For example, here 562 corresponds to Escherichia coli.

For the XML files you created, yes this will impact Metag2Metabo results. You created these files using the --mx (in command line) or the xml_extraction (in python) option. This extracts XML files created by Pathway Tools. These files are different from the ones created by Metage2Metabo as they are created by the padmet package.
There are multiple differences such as different IDs, the XML from Pathway Tools will contain instantiated metabolites from metabolite class whereas SBML from padmet will only contained the classes.

If you use this as a test to find similar results, you need either to give the flat files (obtained with --md or dat_extraction) to Metage2Metabo or to launch Metage2Metabo with recon on your the same folder.

@ChenCongZ
Copy link
Author

Hi @ArnaudBelcour,
Thank you for your suggestion!
This prompt came up today when I reconstructed the metabolic network model of the test data based on your reminder. However, I don't know which step I overlooked.

reconstruction.recon('/home/chencong/test','/home/chencong/output3',noorphan_bool=True,padmet_bool=False,sbml_level={2},nb_cpu=2,clean=True,use_pwt_xml=True)
CRITICAL:metage2metabo.m2m.reconstruction:No /home/chencong/.ncbirc file, please fix it before using the program

@ChenCongZ
Copy link
Author

I also checked its status.
chencong@chencong-QiTianM428-A606:~$ ls -l /home/chencong/.bashrc
-rw-rw-rw- 1 chencong chencong 4027 Nov 26 10:58 /home/chencong/.bashrc

@ChenCongZ
Copy link
Author

Hi @arnaud Belcour,
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'.
Screenshot from 2022-11-26 21-25-21

@ChenCongZ
Copy link
Author

Hi @ArnaudBelcour,
I'm very sorry to bother you when you are busy, but I have encountered many problems during the reconstruction of metabolic pathway in a few days. I can solve some of them, but my limited ability can't solve all of them. I'm confused that I reconstructed metabolic pathway data by directly using the data annotated by prokka after binning. The annotated file (.gbk) of an organism is divided into several sections, and the specific files are listed below. Can files like this be directly used for data input without m2m?
bin.4.strict.txt

@ArnaudBelcour
Copy link
Contributor

Hi @ChenCongZ,

Yes this file can be used as input for mpwt/m2m. You need to change its extension (from txt to gbff). Furthermore, you need to use a taxon_id file to indicate the taxon ID corresponding to this file as there is no taxonomic information in the gbff file created by Prokka.
The different sections in the gbff file (called Locus) correspond to the different contig contained inside this bin, Pathway Tools will handle them without problems.

@ChenCongZ
Copy link
Author

Hi @ArnaudBelcour,
Thank you for your help.
I've got the single species sbml file.
But I encountered a problem converting seeds metabolites file.
Screenshot from 2022-12-01 15-02-02

@ChenCongZ
Copy link
Author

Hi @ArnaudBelcour,
Thank you for your help.
I've fixed these issues, thank you for your help.

@ChenCongZ
Copy link
Author

Hi @ArnaudBelcour,
I can run all the other results,but there is a issue about m2m.recon.
Screenshot from 2022-12-01 22-44-52

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