Command-line Version of NP Analyst
Installation
The offline version of NP Analyst can be obtained through cloning/downloading the GitHub repository of NP Analyst as zip file.
https://github.com/liningtonlab/npanalyst
In order to install the CLI version of NP Analyst for Anaconda Python, use the following code in your Anaconda-aware terminal. Make sure to extract the .zip file and change the directory to the downloaded NP Analyst folder in the terminal.
cd PATH_to_downloaded_and_extracted_npanalyst_package
The following code will create a new Anaconda environment, named npanalyst, using Python 3.9 as the interpreter.
conda env create -f environment.yml
conda activate npanalyst
pip install .
The Workflow
The offline version follows the logic:
- Data type-dependent MS-file import
- Compound Activity Mapping, using the MS-data and an corresponding .csv-table that contains activity information.
- Automated export of Cytoscape/Gephi-readable graphML files for the comprehensive and community-specific networks and peak tables with annotated Activity and Cluster scores.
Changing Settings in the Config File
The NP Analyst config contains among others the settings for peak picking, alignment and also the threshold settings for the activity and cluster score. In order to create a custom config, the following line will create the config.json in the defined output folder. The output folder argument is optional, and the config file will be created in the current working directory when the argument is not given.
npanalyst get_config -o output-folder
The config.json file can be manipulated using any editor like for example Windows Notepad or Notepad++.
The replicate , basket and activity command take a config file as an optional argument.
Import MS-data
Whenever the code requires a specific file (eg the basketed.csv), make sure to either provide the full path or move to the folder with the respective files in the terminal.
mzML files
For mzML-files, the first step is to perform replicate comparison, between technical replicates. This step will create a folder, named replicated, in the respective output folder and will contain replicate-compared .csv files.
npanalyst replicate -i folder-to-mzML-files -o output-folder --config optional-config.json
Given you acquired for example 3 replicates for each extract, and therefore in total 150 files, the folder should contain 50 samples.
In the next step, we create the basketed.csv which is the peak list of the dataset.
npanalyst basket -i output-folder/replicated -o output-folder --config optional-config.json
graphML files
To import the MS-data via the graphML file, use the following syntax:
npanalyst import -t gnps -i network.graphml -o output-folder
MZmine 2-derived .csv peaklists
To import the MS-data via from a peak list in the .csv format, use the following syntax:
npanalyst import -t mzmine -i peaklist.csv -o output-folder
Perform Compound Activity Mapping
To perform Compound Activity Mapping, provide the activity-file.csv and the basketed.csv peak list.
npanalyst activity -a activity-file.csv -i basketed.csv -o output-folder --config optional-config.json