Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

unipept/peptonizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Peptonizer2000

This repository contains the implementation of the Peptonizer2000 algorithm, which is used for taxonomic inference of metaproteomics samples. Multiple different flavours of the Peptonizer2000 are offered; the original Python-code (which can be run through the command line using snakemake) and a TypeScript-version that allows you to integrate the Peptonizer into web applications. The TypeScript-version of the Peptonizer2000 is not a re-implementation of the original Python-code, but rather provides a very convenient wrapper around the Python code by leveraging the amazing Pyodide runtime. Read the instructions in this document to find out on how to run or install the Peptonizer.

Python counterpart

The actual code that builds the factor graph and actually executed the Peptonizer algorithm, is implemented in Python and can be found in the peptonizer folder.

Running as snakemake workflow

In order to run the Peptonizer2000 on your own system, you should install Conda, Mamba and all of its dependencies. Follow the installation instructions step-by-step for an explanation of what you should do.

  • Make sure that Conda and Mamba are installed. If these are not yet present on your system, you can follow the instructions on their README.
  • Go to the "workflow" directory by executing cd workflow from the terminal.
  • Run conda env create -f env.yml (make sure to run this command from the workflow directory) in order to install all dependencies and create a new conda environment (which is named "peptonizer" by default).
  • Run mamba install -c conda-forge -c bioconda -n peptonizer snakemake to install snakemake which is required to run the whole workflow from start-to-finish.
  • Run conda activate peptonizer to switch the current Conda environment to the peptonizer environment you created earlier.
  • Start the peptonizer with the command snakemake --use-conda --cores 1. If you have sufficient CPU and memory power available to your system, you can increase the amount of cores in order to speed up the workflow.

Generating Peptonizer Python package

Generating and packaging the Peptonizer as a Python package can be done by executing this command in the terminal (from within the peptonizer/peptonizer directory): python setup.py bdist_wheel. Note that the wheel (whl) file generated by this command is a packaged version of the Python library, which is required by the TypeScript-version of the Peptonizer.

TypeScript / JavaScript counterpart

Installing Peptonizer for 3rd party web applications

Installing the Peptonizer into your own application is simply a matter of running npm install [email protected] peptonizer or yarn add [email protected] peptonizer. All relevant typings for the project are shipped together with the JavaScript bundle.

Developing the peptonizer_ts

Everytime changes are made to the underlying Python-version of the Peptonizer, a new version of the Python whl-file needs to be generated using python build command provided earlier in this readme. Then, the whl-file needs to be encoded as base64 (otherwise it cannot be directly consumed by our Pyodide configuration). Run base64 <wheel_file.whl> <wheel_file.base64.whl> in order to perform the encoding, and make sure to place the file in the peptonizer_ts/src/workers/lib directory.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published