Skip to content
Commits on Source (7)
......@@ -8,4 +8,9 @@ perl:
sudo: false
install:
- "source ./install_dependencies.sh"
before_script:
- cpanm --quiet --notest Dist::Zilla::App::Command::cover
- cpanm --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov
script: "dzil test"
after_success:
- dzil cover -test -report codecov
\ No newline at end of file
Carla Cummins (cc21@sanger.ac.uk)
Carla Cummins (path-help@sanger.ac.uk)
Andrew J. Page (ap13@sanger.ac.uk)
Lars Barquist (lars.barquist@uni-wuerzburg.de)
# This container will install Bio-Tradis from master
#
FROM debian:testing
# Install the dependancies
RUN apt-get update -qq && apt-get install -y sudo make wget unzip zlib1g-dev cpanminus gcc bzip2 libncurses5-dev libncursesw5-dev libssl-dev r-base git
RUN cpanm IPC::System::Simple DateTime::Locale DateTime
RUN sudo Rscript -e "source('http://bioconductor.org/biocLite.R')" -e "biocLite(c('edgeR','getopt', 'MASS'))"
RUN git clone https://github.com/sanger-pathogens/Bio-Tradis.git
RUN cd Bio-Tradis && ./install_dependencies.sh
ENV PATH /Bio-Tradis/bin:/Bio-Tradis/build/smalt-0.7.6-bin:/Bio-Tradis/build/tabix-master:/Bio-Tradis/build/samtools-1.3:$PATH
RUN export PATH
ENV PERL5LIB=/Bio-Tradis/lib:$PERL5LIB
RUN export PERL5LIB
\ No newline at end of file
Bio-Tradis
==========
Bio-Tradis contains a set of tools to analyse the output from TraDIS analyses. For command-line usage instructions, please see the tutorial in the file "BioTraDISTutorial.pdf". Note that default parameters are for comparative experiments, and will need to be modified for gene essentiality studies.
For more information on the TraDIS method, see http://bioinformatics.oxfordjournals.org/content/32/7/1109 and http://genome.cshlp.org/content/19/12/2308
# Bio-Tradis
A set of tools to analyse the output from TraDIS analyses
[![Build Status](https://travis-ci.org/sanger-pathogens/Bio-Tradis.svg?branch=master)](https://travis-ci.org/sanger-pathogens/Bio-Tradis)
[![Build Status](https://travis-ci.org/sanger-pathogens/Bio-Tradis.svg?branch=master)](https://travis-ci.org/sanger-pathogens/Bio-Tradis)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-brightgreen.svg)](https://github.com/sanger-pathogens/Bio-Tradis/blob/master/software_license)
[![status](https://img.shields.io/badge/Bioinformatics-10.1093-brightgreen.svg)](https://doi.org/10.1093/bioinformatics/btw022)
[![Docker Build Status](https://img.shields.io/docker/build/sangerpathogens/bio-tradis.svg)](https://hub.docker.com/r/sangerpathogens/bio-tradis)
[![Docker Pulls](https://img.shields.io/docker/pulls/sangerpathogens/bio-tradis.svg)](https://hub.docker.com/r/sangerpathogens/bio-tradis)
[![codecov](https://codecov.io/gh/sanger-pathogens/bio-tradis/branch/master/graph/badge.svg)](https://codecov.io/gh/sanger-pathogens/bio-tradis)
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.
## Contents
* [Introduction](#introduction)
* [Installation](#installation)
* [Required dependencies](#required-dependencies)
* [Bioconda](#bioconda)
* [Docker](#docker)
* [Usage](#usage)
* [Scripts](#scripts)
* [Analysis Scripts](#analysis-scripts)
* [Internal Objects and Methods](#internal-objects-and-methods)
* [Perl Programming Examples](#perl-programming-examples)
* [License](#license)
* [Feedback/Issues](#feedbackissues)
* [Citation](#citation)
Installation
=======
## Introduction
The Bio::TraDIS pipeline provides software utilities for the processing, mapping, and analysis of transposon insertion sequencing data. The pipeline was designed with the data from the TraDIS sequencing protocol in mind, but should work with a variety of transposon insertion sequencing protocols as long as they produce data in the expected format.
####HomeBrew/LinuxBrew
To install the dependancies, the easiest way is through [HomeBrew](http://brew.sh/) (OSX) or [LinuxBrew](http://brew.sh/linuxbrew/) (Linux).
```
brew tap homebrew/science
brew install r smalt samtools cpanm
sudo cpanm -f Bio::Tradis
For more information on the TraDIS method, see http://bioinformatics.oxfordjournals.org/content/32/7/1109 and http://genome.cshlp.org/content/19/12/2308.
R
source("http://bioconductor.org/biocLite.R")
biocLite()
biocLite(c("edgeR","getopt", "MASS"))
````
## Installation
Bio-Tradis has the following dependencies:
####Without Homebrew
Install [SMALT](https://www.sanger.ac.uk/resources/software/smalt/) version 0.7.6 or greater, [Samtools](http://www.htslib.org/) version 1.3 or greater and [R](https://cran.r-project.org/) version 3.2 or greater. Ensure they are in your PATH.
### Required dependencies
* smalt
* samtools
* tabix
* R
* Bioconductor
There are a number of ways to install Bio-Tradis and details are provided below. If you encounter an issue when installing Bio-Tradis please contact your local system administrator. If you encounter a bug please log it [here](https://github.com/sanger-pathogens/Bio-Tradis/issues) or email us at path-help@sanger.ac.uk.
### Bioconda
Install conda and enable the bioconda channel.
```
conda config --add channels r
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda
conda install r smalt samtools perl-app-cpanminus
sudo cpanm -f Bio::Tradis
R
source("http://bioconductor.org/biocLite.R")
......@@ -42,11 +57,30 @@ biocLite()
biocLite(c("edgeR","getopt", "MASS"))
```
####Windows
Install Linux.
### Docker
Bio-Tradis can be run in a Docker container. First install Docker, then install Bio-Tradis:
docker pull sangerpathogens/bio-tradis
Scripts
=======
To use Bio-Tradis use a command like this (substituting in your directories), where your files are assumed to be stored in /home/ubuntu/data:
docker run --rm -it -v /home/ubuntu/data:/data sangerpathogens/bio-tradis bacteria_tradis -h
## Usage
For command-line usage instructions, please see the tutorial in the file "BioTraDISTutorial.pdf". Note that default parameters are for comparative experiments, and will need to be modified for gene essentiality studies.
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
The functions are avalable as standalone scripts or as perl modules.
### Scripts
Executable scripts to carry out most of the listed functions are available in the `bin`:
* `check_tradis_tags` - Prints 1 if tags are present, prints 0 if not.
......@@ -56,10 +90,9 @@ Executable scripts to carry out most of the listed functions are available in th
* `tradis_plot` - Creates an gzipped insertion site plot
* `bacteria_tradis` - Runs complete analysis, starting with a fastq file and produces mapped BAM files and plot files for each file in the given file list and a statistical summary of all files. Note that the -f option expects a text file containing a list of fastq files, one per line.
A help menu for each script can be accessed by running the script with no parameters
A help menu for each script can be accessed by running the script with no parameters.
Analysis Scripts
================
### Analysis Scripts
Three scripts are provided to perform basic analysis of TraDIS results in `bin`:
* `tradis_gene_insert_sites` - Takes genome annotation in embl format along with plot files produced by bacteria_tradis and generates tab-delimited files containing gene-wise annotations of insert sites and read counts.
......@@ -67,15 +100,14 @@ Three scripts are provided to perform basic analysis of TraDIS results in `bin`:
* `tradis_comparison.R` - Takes tab files to compare two growth conditions using edgeR. This analysis requires experimental replicates.
Internal Objects and Methods
===================
####Bio::Tradis::DetectTags
### Internal Objects and Methods
__Bio::Tradis::DetectTags__
* Required parameters:
* `bamfile` - path to/name of file to check
* Methods:
* `tags_present` - returns true if TraDIS tags are detected in `bamfile`
####Bio::Tradis::AddTagsToSeq
__Bio::Tradis::AddTagsToSeq__
* Required parameters:
* `bamfile` - path to/name of file containing reads and tags
* Optional parameters:
......@@ -92,7 +124,7 @@ Internal Objects and Methods
in the correct orientation at the start of the sequences
in the resulting FastQ file.
####Bio::Tradis::FilterTags
__Bio::Tradis::FilterTags__
* Required parameters:
* `fastqfile` - path to/name of file to filter. This may be a gzipped fastq file, in which case a temporary unzipped version is used and removed on completion.
* `tag` - TraDIS tag to match
......@@ -102,7 +134,7 @@ Internal Objects and Methods
* Methods:
* `filter_tags` - output all reads containing the tag to `outfile`
####Bio::Tradis::RemoveTags
__Bio::Tradis::RemoveTags__
* Required parameters:
* `fastqfile` - path to/name of file to filter.
* `tag` - TraDIS tag to remove
......@@ -113,7 +145,7 @@ Internal Objects and Methods
* `remove_tags` - output all reads with the tags removed from both sequence and
quality strings to `outfile`
####Bio::Tradis::Map
__Bio::Tradis::Map__
* Required parameters:
* `fastqfile` - path to/name of file to map to the reference
* `reference` - path to/name of reference genome in fasta format (.fa)
......@@ -133,7 +165,7 @@ Internal Objects and Methods
For more information on the mapping and indexing options discussed here, see the SMALT manual (ftp://ftp.sanger.ac.uk/pub4/resources/software/smalt/smalt-manual-0.7.4.pdf)
####Bio::Tradis::TradisPlot
__Bio::Tradis::TradisPlot__
* Required parameters:
* `mappedfile` - mapped and sorted BAM file
* Optional parameters:
......@@ -142,7 +174,7 @@ Internal Objects and Methods
* Methods:
* `plot` - create insertion site plots for reads in `mappedfile`. This file will be readable by the Artemis genome browser (http://www.sanger.ac.uk/resources/software/artemis/)
####Bio::Tradis::RunTradis
__Bio::Tradis::RunTradis__
* Required parameters:
* `fastqfile` - file containing a list of fastqs (gzipped or raw) to run the
complete analysis on. This includes all (including
......@@ -158,8 +190,7 @@ Internal Objects and Methods
* Methods:
* `run_tradis` - run complete analysis
Perl Programming Examples
========
### Perl Programming Examples
You can reuse the Perl modules as part of other Perl scripts. This section provides example Perl code.
Check whether `file.bam` contains TraDIS tag fields and, if so, adds the tags
to the reads' sequence and quality strings.
......@@ -212,3 +243,14 @@ Bio::Tradis::RunTradis(
mismatch => 1
)->run_tradis;
```
## License
Bio-Tradis is free software, licensed under [GPLv3](https://github.com/sanger-pathogens/Bio-Tradis/blob/master/software_license).
## Feedback/Issues
Please report any issues to the [issues page](https://github.com/sanger-pathogens/bio-tradis/issues) or email path-help@sanger.ac.uk
## Citation
If you use this software please cite:
"The TraDIS toolkit: sequencing and analysis for dense transposon mutant libraries", Barquist L, Mayho M, Cummins C, Cain AK, Boinett CJ, Page AJ, Langridge G, Quail MA, Keane JA, Parkhill J. Bioinformatics. 2016 Apr 1;32(7):1109-11. doi: [10.1093/bioinformatics/btw022](https://doi.org/10.1093/bioinformatics/btw022). Epub 2016 Jan 21.
\ No newline at end of file
theme: jekyll-theme-cayman
\ No newline at end of file
......@@ -132,7 +132,7 @@ for my $insert_sites ( @ins_list ){
my $count = 0;
my $inserts = 0;
for(my $j=$read_start;$j < $read_end; $j++){
for(my $j=$read_start;$j <= $read_end; $j++){
$count += $insert_sites->[$j];
$inserts += 1 if $insert_sites->[$j] > 0;
}
......
bio-tradis (1.4.1+dfsg-1) unstable; urgency=medium
* New upstream version
* Point Vcs fields to salsa.debian.org
* Standards-Version: 4.2.1
* Fix perl interpreter
-- Andreas Tille <tille@debian.org> Wed, 17 Oct 2018 11:56:52 +0200
bio-tradis (1.3.3+dfsg-3) unstable; urgency=medium
* Standards-Version: 4.1.3
......
......@@ -9,9 +9,9 @@ Build-Depends: debhelper (>= 11~),
libtest-most-perl,
libtest-files-perl,
libbio-perl-perl
Standards-Version: 4.1.3
Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/bio-tradis.git
Vcs-Git: https://anonscm.debian.org/git/debian-med/bio-tradis.git
Standards-Version: 4.2.1
Vcs-Browser: https://salsa.debian.org/med-team/bio-tradis
Vcs-Git: https://salsa.debian.org/med-team/bio-tradis.git
Homepage: https://github.com/sanger-pathogens/Bio-Tradis
Package: bio-tradis
......@@ -25,7 +25,7 @@ Depends: ${perl:Depends},
r-cran-getopt,
r-cran-mass
Suggests: artemis,
r-bioc-edger,
r-bioc-edger
Description: analyse the output from TraDIS analyses of genomic sequences
Bio-Tradis contains a set of tools to analyse the output from
TraDIS analyses.
......
......@@ -11,6 +11,10 @@ TEST_FILES = $(shell find t -name "*.t")
override_dh_install:
dh_install
find debian/*/usr/bin -name "*.R" -exec sh -c 'mv {} `echo {} | sed "s/\.R$$//"`' \;
dh_install
for pl in `grep -Rl '#!/usr/bin/env[[:space:]]\+perl' debian/*/usr/*` ; do \
sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
done
override_dh_auto_test:
dh_auto_test -- TEST_FILES="$(TEST_FILES)"
......@@ -3,7 +3,7 @@ author = Carla Cummins <path-help@sanger.ac.uk>
license = GPL_3
copyright_holder = Wellcome Trust Sanger Institute
copyright_year = 2013
version = 1.3.3
version = 1.4.1
[MetaResources]
homepage = http://www.sanger.ac.uk/
......@@ -53,6 +53,8 @@ filename = t/data/TradisPlot/expected.plot.gz
filename = t/data/TradisPlot/test.mapped.bam
filename = t/data/AddTags/expected_tradis.cram
filename = t/data/DetectTags/sample_sm_tr.cram
filename = t/data/DetectTags/AE004091.fasta
filename = t/data/DetectTags/AE004091.fasta.fai
filename = t/data/AddTags/sample_sm_tr.cram
filename = t/data/CombinePlots/tabix_sorted.insert_site_plot.gz.tbi
filename = t/data/CombinePlots/tabix_sorted.insert_site_plot.gz
......
......@@ -13,7 +13,7 @@ use Moose;
use Getopt::Long qw(GetOptionsFromArray);
use Cwd qw(abs_path cwd);
use Bio::Tradis::RunTradis;
use TryCatch;
use Try::Tiny;
has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
......@@ -161,10 +161,10 @@ sub run {
$analysis->run_tradis;
$at_least_one_good_fastq = 1;
}
catch (Bio::Tradis::Exception::TagFilterError $e) {
catch {
my $tag = $self->tag;
warn "There was a problem filtering '$full_path' by '$tag'; it looks like the tag was not found in any read\n";
}
};
}
if ( ! $at_least_one_good_fastq ) {
Bio::Tradis::Exception::TagFilterError->throw( error => "None of the input files contained the specified tag. Please check that your inputs are valid fastq files and that at least one read in one of them starts with the specified tag\n" );
......
This diff is collapsed.
ENA|AE004091|AE004091.2 6264404 71 60 61