Giter Site home page Giter Site logo

medi's Introduction

Metagenomic Estimation of Dietary Intake (MEDI)

This repo contains the MEDI nextflow pipeline(s) for recovering food abundances and nutrient composition from metagenomic shotgun sequencing data.

It contains capabilities for the following individual functionalities:

  1. Mapping items in FOODB to all currently available items in NCBI NIH databases and prioritizing hits
  2. Downloading, consolidating, ANI distance calculation using minhasing, for all full and partial assemblies and annotation of NCBI Taxonomy IDs for use with Kraken2.
  3. Building the Kraken2 and BRACKEN hashes/databases including decoy sequences.
  4. Perform quantification of food DNA and per-portion nutrient composition for metagenomic samples, starting from raw FASTQ files.

Installation

You will need a working miniforge or miniconda to start. YOu can follow the installation instructions here. After create an environment with the included conda environment file.

Start by cloning the repository and cd-ing into it.

git clone https://github.com/gibbons-lab/medi
cd medi
conda env create -n medi -f medi.yml

Finally download the appropriate binary version for architeuthis extract it and copy it to somwhere in your path (usually ~/bin).

After that activate the environment.

conda activate medi

And you are done. If you are running this on a HPC cluster or a cloud provider, you moght need to adjust your nextflow settings for your setup.

All pipelines support a --max_threads parameter that defines the maximum number of threads to use for any single process.

(1-2) Matching and downloading

nextflow run database.nf

This will boostrap the database from nothing, downloading all required files and performing the matching against the current versions of NCBI Genbank and Nucleotide. You can speed up the querying by obtaining and NCBI API key and adding it to your .Rprofile with

options(reutil.api.key="XXXXXX")

(3) Building the hashes

After running the previous step continue with

nextflow run build_kraken.nf --max_db_size=500

Here --max_db_size denotes the maximum size of the database in GB. The default will use no reduction but you can set this to a lower level which will create a smaller but less accurate hash. Note that for good performance you will need more RAM than what you choose here.

(4) Quantification for MGS samples

For your own sequencing data create a directory and either copy or link the medi pipeline there. You will need at least the quant.nf file and the scripts folder in there. Than create a data directory and within that a raw folder containing your unprocessed demultiplexed FASTQ files. So it should look like:

|- quant.nf
|- scripts/
|- data/
   |-- raw/

After that you can run MEDI with

nextflow run quant.nf --db=/path/to/medi_db

Where /path/to/medi_db/ should be the output directory from step (3). Usually medi/data/medi_db.

TODO

  • submit architeuthis to bioconda for easier installation
  • see if we can provide a reduced DB for download
  • make execution more flexible

medi's People

Contributors

cdiener avatar cschu avatar seangibbons 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.