Giter VIP home page Giter VIP logo

remocon's Introduction

REMOCON

REMOve CONtaminant reads before variant calling

Method

Requirements

  1. Perl - https://www.perl.org
  2. BWA - http://bio-bwa.sourceforge.net
  3. SAMtools 1.x - http://www.htslib.org
  4. Common linux commands: bash, gzip, ...

Install

If you already have Git (https://git-scm.com) installed, you can get the latest development version using Git.

git clone https://github.com/jiwoongbio/REMOCON.git

Usages

  1. Prepare BWA index files
bwa index <genome.fasta>
bwa index <genome.contaminant.fasta>
  1. Remove contaminant reads
  • Use remocon.sh
./remocon.sh <output.prefix> <genome.fasta> <genome.contaminant.fasta> <threads> <input.1.fastq> [input.2.fastq]
  • Use remocon.pl
# Align reads
bwa mem <genome.fasta>             <input.1.fastq> [input.2.fastq] | gzip > output.sam.gz
bwa mem <genome.contaminant.fasta> <input.1.fastq> [input.2.fastq] | gzip > output.contaminant.sam.gz

# (Optional) Recalculate alignment scores
perl remocon_alignment_score.pl output.sam.gz             | gzip > output.alignment_score_added.sam.gz             && mv output.alignment_score_added.sam.gz             output.sam.gz
perl remocon_alignment_score.pl output.contaminant.sam.gz | gzip > output.contaminant.alignment_score_added.sam.gz && mv output.contaminant.alignment_score_added.sam.gz output.contaminant.sam.gz

# Compare alignment scores and remove contaminant reads
perl remocon.pl output.sam.gz output.contaminant.sam.gz | gzip > output.contaminant_removed.sam.gz
  • Use remocon.sort.sh - take SAM files as input instead of FASTQ files
./remocon.sort.sh <output.prefix> <input.sam> <input.contaminant.sam>

remocon's People

Contributors

jiwoongbio 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.