The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Bio-Tradis

Bio-Tradis contains a set of tools to analyse the output from TraDIS analyses. For more information on the TraDIS method, see http://genome.cshlp.org/content/19/12/2308

Build Status

Bio-Tradis provides functionality to: * detect TraDIS tags in a BAM file * add the tags to the reads * filter reads in a FastQ file containing a user defined tag * remove tags * map to a reference genome * create an insertion site plot file available as standalone scripts or as perl modules.

Installation

HomeBrew/LinuxBrew

To install the dependancies, the easiest way is through HomeBrew (OSX) or LinuxBrew (Linux). ``` brew tap homebrew/science brew install r smalt samtools cpanm sudo cpanm -f Bio::Tradis

R source("http://bioconductor.org/biocLite.R") biocLite() biocLite(c("edgeR","getopt", "MASS")) ````

Without Homebrew

Install SMALT version 0.7.6 or greater, Samtools version 1.3 or greater and R version 3.2 or greater. Ensure they are in your PATH.

sudo cpanm -f Bio::Tradis R source("http://bioconductor.org/biocLite.R") biocLite() biocLite(c("edgeR","getopt", "MASS"))

Windows

Install Linux.

Objects and Methods

Bio::Tradis::DetectTags

Bio::Tradis::AddTagsToSeq

Bio::Tradis::FilterTags

Bio::Tradis::RemoveTags

Bio::Tradis::Map

Bio::Tradis::TradisPlot

Bio::Tradis::RunTradis

Examples

Check whether file.bam contains TraDIS tag fields and, if so, adds the tags to the reads' sequence and quality strings.

Perl my $detector = Bio::Tradis::DetectTags(bamfile => 'file.bam'); if($detector->tags_present){ Bio::Tradis::AddTagsToSeq(bamfile => 'file.bam', outfile => 'tradis.bam')->add_tags_to_seq; } Filter a FastQ file with TraDIS tags attached for those matching the given tag. Then, remove the same tag from the start of all sequences in preparation for mapping.

Perl Bio::Tradis::FilterTags( fastqfile => 'tradis.fastq', tag => 'TAAGAGTGAC', outfile => 'filtered.fastq' )->filter_tags; Bio::Tradis::RemoveTags( fastqfile => 'filtered.fastq', tag => 'TAAGAGTGAC', outfile => 'notags.fastq' )->remove_tags; Create mapping object, index the given reference file and then map the fastq file to the reference. This will produce index files for the reference and a mapped SAM file named tradis_mapped.sam.

Perl my $mapping = Bio::Tradis::Map( fastqfile => 'notags.fastq', reference => 'path/to/reference.fa', outfile => 'tradis_mapped.sam' ); $mapping->index_ref; $mapping->do_mapping; Generate insertion site plot for only reads with a mapping score >= 50

Perl Bio::Tradis::TradisPlot(mappedfile => 'mapped.bam', mapping_score => 50)->plot; Run complete analysis on fastq files listed in file.list. This includes filtering and removing the tags allowing one mismatch to the given tag, mapping, BAM sorting and creation of an insertion site plot and stats file for each file listed in file.list.

Perl Bio::Tradis::RunTradis( fastqfile => 'file.list', tag => 'GTTGAGGCCA', reference => 'path/to/reference.fa', mismatch => 1 )->run_tradis;

Scripts

Executable scripts to carry out most of the listed functions are available in the bin:

A help menu for each script can be accessed by running the script with no parameters

Analysis Scripts

Three scripts are provided to perform basic analysis of TraDIS results in bin: