Giter VIP home page Giter VIP logo

moss's Introduction

Moss

Anaconda-Server Badge install with bioconda

Moss is a multi-sample somatic single nucleotide variant (SNV) calling tool aiming for discovering variants with a low variant allele frequency that repeatedly appears in several samples. Moss works as an extension to existing single-sample somatic variant callers and improves the recall meanwhile maintains high precision. Moss takes as input the BAM files of multiple samples and corresponding VCF output of the single-sample caller.

Figure

Contents

  1. Installation
  2. Usage instructions

Installation

Using conda (recommended)

  1. Create a new conda environment named "moss" and install dependencies:

    conda create -n moss
  2. Then activate the created environment: conda activate moss.

  3. Install the package into current environment "moss":

    conda install -c bioconda moss

Build from source (alternative)

Dependencies

Moss is written in C++11 and thus requires a modern C++ compiler (GCC >= 4.8.1, or Clang). In addition, Moss has the following dependencies.

Compilation

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..

If HTSlib is not in the system path, CMake may not be able to find it. Users then need to manually set the path for htslib using ccmake:

ccmake ..

Then finally make Moss.

make

The compilation results in the executable moss.

Docker image

The docker image is available on Docker Hub, which can be pulled from Docker Hub by the following command docker pull chuanyiz/moss.

Usage instructions

Moss works on top of other somatic variant calling methods, such as Strelka2 and Mutect2. We assume you have already run the base variant caller as their manual suggested and get the VCF files of each sample.

Conda/compiled usage

Firstly run the python script scripts/union_candidates.py to generate a VCF file of candidates loci as an input to Moss. For example you can run the toy example in data/:

cd data
python ../scripts/union_candidates.py -f samples.list --normal-name sample0 -t strelka -o candidates.vcf

To run Moss, you need a reference genome FASTA file, BAM files for normal and tumor samples, realigned BAM files (optional but recommended), and a candidate loci VCF. For example, after you've built moss in the build/ directory, you can continue the toy example in data/:

cd build
./moss -r ../data/demo20.fa -b ../data/normal.sort.bam -R ../data/empty.bam -b ../data/sample0.spike.sort.bam -R ../data/empty.bam -b ../data/sample1.spike.sort.bam -R ../data/empty.bam -b ../data/sample2.spike.sort.bam -R ../data/empty.bam -b ../data/sample3.spike.sort.bam -R ../data/empty.bam -l ../data/candidates.vcf -m 4 -t -0.693 --ignore0 --grid-size 200 -o example.vcf

Finally, we filter the result VCF file:

bgzip example.vcf
tabix example.vcf.gz
python ../scripts/post_filter.py --normal-name sample0 -i example.vcf.gz -o example.post_filter.vcf

Docker usage

Organize your data in the same structure as the data/ folder. Modify the config.yaml following the instructions within the file, and it will be used to generate the commands for Moss within the container. When sterting the docker container, you need to bind-mount the data folder by argument -v path:/moss_data:, where path represents the absolute path to your data folder in the host, and /moss_data is the mounted location in the container.

docker run -it -v path:/moss_data: chuanyiz/moss /bin/bash -c "python /moss_scripts/run_moss.py -c /moss_data/config.yaml -o /moss_data/run_moss.sh && bash /moss_data/run_moss.sh"

moss's People

Contributors

chuanyiz avatar melkebir avatar

Stargazers

 avatar jligm-hash avatar

Watchers

James Cloos avatar Idoia Ochoa avatar

Forkers

wangdi2016

moss's Issues

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.