Code Monkey home page Code Monkey logo

eawag-lcms-target-identification's Introduction

LC-MS Target Compound Identification

This repository contains a script that identifies target compounds present in a dataset of LC-MS peaks and generates a database of identified compounds. The script allows you to analyze this database and visualize the results using an interactive Datasette webfront.

Requirements

To use this script, you need to have the following software installed:

  • Docker
  • Python

How to run

To get started, clone or download this repository. Next, install all Python dependencies using the command:

pip install -r requirements.txt

Usage

Generating the database of identified compounds

To analyze a database of target compounds identified on the LC-MS data use the command:

python lcms_identification.py generate -l <peaklist.csv> -d <database.db> 

where <peaklist.csv> is a CSV file of experimental data containing (at least) the following columns for each peak in the LC-MS:

  • mz - Mass to charge ratio of the peak
  • rt - Retention time of the peak
  • intensity - Peak intensity

and <database.db> is a SQL database of target/suspect compounds containing (at least) a table compoundlist with (at least) the following columns:

  • mass_to_charge_ratio - Mass to charge ratio of the compound
  • retention_time - Retention time of the compound
  • retention_time_tolerance - Tolerance value for matching the compound's retention time

The script will identify the compounds present in <peaklist.csv> and generate a results_database.db database containing information on the identified compounds. Additionally, the script will open an interactive Datasette webfront to visualize the results.

Connecting to the Webfront

To directly connect to the Datasette webfront containing the results of the last dataset analyzed (without repeating the analysis), use the command:

python lcms_identification.py connect

Downloading as CSV file

To download a CSV file containing the results of the results contained in the Datasette webfront, run the command:

python lcms_identification.py download

Additional information

To get more information about the script and its options, run the command:

python lcms_identification.py --help

License

This project is licensed under the MIT License.

eawag-lcms-target-identification's People

Contributors

luisfabib avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.