[med-svn] [bio-tradis] 01/02: New upstream version 1.3.1+dfsg
Andreas Tille
tille at debian.org
Fri Mar 3 22:45:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository bio-tradis.
commit 03634387e0df91b4d14eab1526cea4dca4c8bd3b
Author: Andreas Tille <tille at debian.org>
Date: Fri Mar 3 23:44:36 2017 +0100
New upstream version 1.3.1+dfsg
---
.gitignore | 20 +
.travis.yml | 11 +
AUTHORS | 3 +
README.md | 211 +++++++
bin/add_tradis_tags | 20 +
bin/bacteria_tradis | 21 +
bin/check_tradis_tags | 20 +
bin/combine_tradis_plots | 23 +
bin/filter_tradis_tags | 21 +
bin/remove_tradis_tags | 20 +
bin/tradis_comparison.R | 116 ++++
bin/tradis_essentiality.R | 78 +++
bin/tradis_gene_insert_sites | 329 ++++++++++
bin/tradis_merge_plots | 98 +++
bin/tradis_plot | 21 +
dist.ini | 60 ++
install_dependencies.sh | 110 ++++
lib/Bio/Tradis.pm | 31 +
lib/Bio/Tradis/AddTagsToSeq.pm | 203 ++++++
lib/Bio/Tradis/Analysis/Exceptions.pm | 20 +
lib/Bio/Tradis/Analysis/InsertSite.pm | 207 +++++++
lib/Bio/Tradis/CombinePlots.pm | 327 ++++++++++
lib/Bio/Tradis/CommandLine/AddTags.pm | 84 +++
lib/Bio/Tradis/CommandLine/CheckTags.pm | 70 +++
lib/Bio/Tradis/CommandLine/FilterFastqTags.pm | 84 +++
lib/Bio/Tradis/CommandLine/PlotCombine.pm | 101 +++
lib/Bio/Tradis/CommandLine/PlotTradis.pm | 79 +++
lib/Bio/Tradis/CommandLine/RemoveFastqTags.pm | 84 +++
lib/Bio/Tradis/CommandLine/RunMapping.pm | 118 ++++
lib/Bio/Tradis/CommandLine/TradisAnalysis.pm | 271 ++++++++
lib/Bio/Tradis/CommandLine/TradisBam.pm | 99 +++
lib/Bio/Tradis/DetectTags.pm | 54 ++
lib/Bio/Tradis/Exception.pm | 16 +
lib/Bio/Tradis/FilterTags.pm | 162 +++++
lib/Bio/Tradis/Map.pm | 143 +++++
lib/Bio/Tradis/Parser/Bam.pm | 192 ++++++
lib/Bio/Tradis/Parser/Cigar.pm | 71 +++
lib/Bio/Tradis/Parser/Fastq.pm | 101 +++
lib/Bio/Tradis/RemoveTags.pm | 122 ++++
lib/Bio/Tradis/RunTradis.pm | 511 ++++++++++++++++
lib/Bio/Tradis/Samtools.pm | 102 ++++
lib/Bio/Tradis/TradisPlot.pm | 60 ++
.../Tradis_SR_RR_12dark_42r1_rehyb12_index8.xml | 461 ++++++++++++++
recipes/Tradis_adapter_primers.xlsx | Bin 0 -> 49848 bytes
recipes/Transposon10/Chemistry/Chemistry.xml | 413 +++++++++++++
recipes/Transposon10/Exposures/Sony.xml | 7 +
recipes/Transposon10/Exposures/SonyV2.xml | 11 +
recipes/Transposon10/Protocol/1Read1Index.xml | 24 +
recipes/Transposon10/Protocol/1Read2Index.xml | 25 +
recipes/Transposon10/Protocol/2Read1Index.xml | 28 +
recipes/Transposon10/Protocol/2Read2Index.xml | 31 +
recipes/Transposon10/Reads/Reads.xml | 23 +
recipes/Transposon10/Reagents/MaintenanceWash.xml | 25 +
recipes/Transposon10/Reagents/PostRunWash.xml | 25 +
recipes/Transposon10/Reagents/Sequencing.xml | 24 +
recipes/Transposon10/Wash/LineWash.xml | 102 ++++
recipes/Transposon10/Wash/MaintenanceWash.xml | 115 ++++
recipes/Transposon10/Wash/PostRunWash.xml | 180 ++++++
recipes/Transposon10/Wash/PostRunWashOriginal.xml | 115 ++++
recipes/Transposon10/Wash/StandbyWash.xml | 70 +++
recipes/Transposon12/Chemistry/Chemistry.xml | 413 +++++++++++++
recipes/Transposon12/Exposures/Sony.xml | 7 +
recipes/Transposon12/Exposures/SonyV2.xml | 11 +
recipes/Transposon12/Protocol/1Read1Index.xml | 26 +
recipes/Transposon12/Protocol/1Read2Index.xml | 27 +
recipes/Transposon12/Protocol/2Read1Index.xml | 30 +
recipes/Transposon12/Protocol/2Read2Index.xml | 33 +
recipes/Transposon12/Reads/Reads.xml | 23 +
recipes/Transposon12/Reagents/MaintenanceWash.xml | 25 +
recipes/Transposon12/Reagents/PostRunWash.xml | 25 +
recipes/Transposon12/Reagents/Sequencing.xml | 24 +
...30702_ImplementingCarryoverDecontamWash_v3.docx | Bin 0 -> 375530 bytes
recipes/Transposon12/Wash/LineWash.xml | 102 ++++
recipes/Transposon12/Wash/MaintenanceWash.xml | 115 ++++
recipes/Transposon12/Wash/PostRunWash.xml | 180 ++++++
recipes/Transposon12/Wash/PostRunWashOriginal.xml | 115 ++++
recipes/Transposon12/Wash/StandbyWash.xml | 70 +++
software_license | 680 +++++++++++++++++++++
t/Bio/Tradis/AddTagsToSeq.t | 97 +++
t/Bio/Tradis/Analysis/InsertSite.t | 115 ++++
t/Bio/Tradis/CombinePlots.t | 120 ++++
t/Bio/Tradis/CommandLine/TradisAnalysis.t | 92 +++
t/Bio/Tradis/DetectTags.t | 55 ++
t/Bio/Tradis/FilterTags.t | 101 +++
t/Bio/Tradis/Map.t | 77 +++
t/Bio/Tradis/Parser/Bam.t | 105 ++++
t/Bio/Tradis/Parser/Cigar.t | 84 +++
t/Bio/Tradis/Parser/Fastq.t | 52 ++
t/Bio/Tradis/RemoveTags.t | 82 +++
t/Bio/Tradis/RunTradis.t | 261 ++++++++
t/Bio/Tradis/TradisPlot.t | 43 ++
t/data/AddTags/expected_tradis.bam | Bin 0 -> 3098 bytes
t/data/AddTags/expected_tradis.cram | Bin 0 -> 20372 bytes
t/data/AddTags/sample_sm_no_tr.bam | Bin 0 -> 3098 bytes
t/data/AddTags/sample_sm_tr.bam | Bin 0 -> 3062 bytes
t/data/AddTags/sample_sm_tr.cram | Bin 0 -> 20303 bytes
t/data/CombinePlots/comb_expected.stats | 3 +
t/data/CombinePlots/comb_sample.txt | 2 +
t/data/CombinePlots/first.expected.plot | 20 +
t/data/CombinePlots/sample1.sm.plot.gz | Bin 0 -> 63 bytes
t/data/CombinePlots/sample2.sm.plot.gz | Bin 0 -> 63 bytes
t/data/CombinePlots/second.expected.plot | 25 +
.../CombinePlots/tabix_sorted.insert_site_plot.gz | Bin 0 -> 211 bytes
.../tabix_sorted.insert_site_plot.gz.tbi | Bin 0 -> 109 bytes
t/data/CombinePlots/test1.plot | 20 +
t/data/CombinePlots/test2.plot | 20 +
t/data/CombinePlots/test3.plot | 25 +
t/data/CombinePlots/test4.plot | 25 +
t/data/CombinePlots/zip_comb_exp.plot | 100 +++
t/data/CombinePlots/zip_comb_exp.stats | 2 +
t/data/CombinePlots/zip_comb_list.txt | 1 +
t/data/CommandLine/fastq.list | 2 +
t/data/CommandLine/test_1.fastq | 56 ++
t/data/CommandLine/test_2.fastq | 56 ++
t/data/DetectTags/sample_sm_no_tr.bam | Bin 0 -> 3017 bytes
t/data/DetectTags/sample_sm_tr.bam | Bin 0 -> 3062 bytes
t/data/DetectTags/sample_sm_tr.cram | Bin 0 -> 20303 bytes
t/data/FilterTags/expected.1mm.caa.fastq | 40 ++
t/data/FilterTags/expected.caa.fastq | 32 +
t/data/FilterTags/expected.tna.fastq | 12 +
t/data/FilterTags/sample.fastq | 52 ++
t/data/FilterTags/sample.fastq.gz | Bin 0 -> 611 bytes
t/data/InsertSite/2_reads.bam | Bin 0 -> 632 bytes
t/data/InsertSite/small_multi_sequence.bam | Bin 0 -> 12248 bytes
t/data/Map/expected.mapped | 26 +
t/data/Map/smallref.fa | 165 +++++
t/data/Map/test.fastq | 92 +++
t/data/Parsers/test.bam | Bin 0 -> 539 bytes
t/data/Parsers/test.fastq | 8 +
t/data/RemoveTags/expected.rm.1mm.caa.fastq | 40 ++
t/data/RemoveTags/expected.rm.caa.fastq | 40 ++
t/data/RemoveTags/expected.rm.tna.fastq | 12 +
t/data/RemoveTags/sample.caa.fastq | 40 ++
t/data/RemoveTags/sample.tna.fastq | 12 +
t/data/RunTradis/expected.1mm.plot.gz | Bin 0 -> 120 bytes
t/data/RunTradis/expected.plot.gz | Bin 0 -> 119 bytes
t/data/RunTradis/filelist.txt | 2 +
t/data/RunTradis/filtered.fastq | 92 +++
t/data/RunTradis/mapped.sam | 26 +
t/data/RunTradis/notags.fastq | 92 +++
t/data/RunTradis/smallref.fa | 165 +++++
t/data/RunTradis/test.tagged.fastq | 112 ++++
t/data/RunTradis/test.tagged.fastq.gz | Bin 0 -> 1316 bytes
t/data/RunTradis/test2.tagged.fastq | 452 ++++++++++++++
t/data/RunTradis/test2.tagged.fastq.gz | Bin 0 -> 4625 bytes
t/data/TradisPlot/expected.plot.gz | Bin 0 -> 120 bytes
t/data/TradisPlot/sample.fastq | 52 ++
t/data/TradisPlot/test.mapped.bam | Bin 0 -> 1395 bytes
148 files changed, 11284 insertions(+)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d117ab7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,20 @@
+blib/
+.build/
+_build/
+cover_db/
+inc/
+Build
+!Build/
+Build.bat
+.last_cover_stats
+Makefile
+Makefile.old
+MANIFEST.bak
+META.yml
+MYMETA.yml
+nytprof.out
+pm_to_blib
+Bio-Tradis-*
+.DS_Store
+*.tar.gz
+*.swp
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..b1893fb
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,11 @@
+language: perl
+addons:
+ apt:
+ packages:
+ - zlib1g-dev
+perl:
+ - "5.14"
+sudo: false
+install:
+ - "source ./install_dependencies.sh"
+script: "dzil test"
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..4746756
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,3 @@
+Carla Cummins (cc21 at sanger.ac.uk)
+Andrew J. Page (ap13 at sanger.ac.uk)
+Lars Barquist (lars.barquist at uni-wuerzburg.de)
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6a40e3f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,211 @@
+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
+
+[![Build Status](https://travis-ci.org/sanger-pathogens/Bio-Tradis.svg?branch=master)](https://travis-ci.org/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.
+
+Installation
+=======
+
+####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
+
+R
+source("http://bioconductor.org/biocLite.R")
+biocLite()
+biocLite(c("edgeR","getopt", "MASS"))
+````
+
+####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.
+
+```
+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
+* 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
+* Required parameters:
+ * `bamfile` - path to/name of file containing reads and tags
+* Optional parameters:
+ * `outfile` - defaults to `file.tr.bam` for an input file named `file.bam`
+* Methods:
+ * `add_tags_to_seq` - add TraDIS tags to reads. For unmapped reads, the tag
+ is added to the start of the read sequence and quality
+ strings. For reads where the flag indicates that it is
+ mapped and reverse complemented, the reverse complemented
+ tags are added to the end of the read strings.
+ This is because many conversion tools (e.g. picard) takes
+ the read orientation into account and will re-reverse the
+ mapped/rev comp reads during conversion, leaving all tags
+ in the correct orientation at the start of the sequences
+ in the resulting FastQ file.
+
+####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
+* Optional parameters:
+ * `mismatch` - number of mismatches to allow when matching the tag. Default = 0
+ * `outfile` - defaults to `file.tag.fastq` for an input file named `file.fastq`
+* Methods:
+ * `filter_tags` - output all reads containing the tag to `outfile`
+
+####Bio::Tradis::RemoveTags
+* Required parameters:
+ * `fastqfile` - path to/name of file to filter.
+ * `tag` - TraDIS tag to remove
+* Optional parameters:
+ * `mismatch` - number of mismatches to allow when removing the tag. Default = 0
+ * `outfile` - defaults to `file.rmtag.fastq` for and input file named `file.fastq`
+* Methods:
+ * `remove_tags` - output all reads with the tags removed from both sequence and
+ quality strings to `outfile`
+
+####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)
+* Optional parameters:
+ * `refname` - name to assign to the reference index files. Default = ref.index
+ * `outfile` - name to assign the mapped SAM file. Default = mapped.sam
+* Methods:
+ * `index_ref` - create index files of the reference genome. These are required
+ for the mapping step. Only skip this step if index files already
+ exist. -k and -s options for referencing are calculated based
+ on the length of the reads being mapped:
+ * <70 : `-k 13 -s 4`
+ * >70 & <100 : `-k 13 -s 6`
+ * >100 : `-k 20 -s 13`
+ * `do_mapping` - map `fastqfile` to `reference`. Options used for mapping are:
+ `-r -1, -x and -y 0.96`
+
+ 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
+* Required parameters:
+ * `mappedfile` - mapped and sorted BAM file
+* Optional parameters:
+ * `outfile` - base name to assign to the resulting insertion site plot. Default = tradis.plot
+ * `mapping_score` - cutoff value for mapping score. Default = 30
+* 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
+* Required parameters:
+ * `fastqfile` - file containing a list of fastqs (gzipped or raw) to run the
+ complete analysis on. This includes all (including
+ intermediary format conversion and sorting) steps starting from
+ filtering and, finally, producing an insertion site plot and a
+ statistical summary of the analysis.
+ * `tag` - TraDIS tag to filter for and then remove
+ * `reference` - path to/name of reference genome in fasta format (.fa)
+* Optional parameters:
+ * `mismatch` - number of mismatches to allow when filtering/removing the tag. Default = 0
+ * `tagdirection` - direction of the tag, 5' or 3'. Default = 3
+ * `mapping_score` - cutoff value for mapping score. Default = 30
+* Methods:
+ * `run_tradis` - run complete analysis
+
+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`:
+
+* `check_tradis_tags` - Prints 1 if tags are present, prints 0 if not.
+* `add_tradis_tags` - Generates a BAM file with tags added to read strings.
+* `filter_tradis_tags` - Create a fastq file containing reads that match the supplied tag
+* `remove_tradis_tags` - Creates a fastq file containing reads with the supplied tag removed from the sequences
+* `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
+
+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.
+* `tradis_essentiality.R` - Takes a single tab-delimited file from tradis_gene_insert_sites to produce calls of gene essentiality. Also produces a number of diagnostic plots.
+* `tradis_comparison.R` - Takes tab files to compare two growth conditions using edgeR. This analysis requires experimental replicates.
diff --git a/bin/add_tradis_tags b/bin/add_tradis_tags
new file mode 100755
index 0000000..f4cf68f
--- /dev/null
+++ b/bin/add_tradis_tags
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+
+package Bio::Tradis::Bin::DetectTags;
+
+# ABSTRACT: check if tr tag is present
+# PODNAME: check_tags
+
+=head1 SYNOPSIS
+
+Checks the presence of tr/tq tags in a given BAM file
+
+=cut
+
+BEGIN { unshift( @INC, '../lib' ) }
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '/software/pathogen/internal/prod/lib/' ) }
+
+use Bio::Tradis::CommandLine::AddTags;
+
+Bio::Tradis::CommandLine::AddTags->new(args => \@ARGV, script_name => $0)->run;
diff --git a/bin/bacteria_tradis b/bin/bacteria_tradis
new file mode 100755
index 0000000..5680dcc
--- /dev/null
+++ b/bin/bacteria_tradis
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+
+package Bio::Tradis::Bin::RunTradis;
+
+# ABSTRACT: Perform full tradis analysis
+# PODNAME: run_tradis
+
+=head1 SYNOPSIS
+
+Take a fastq, reference and a tag and generates insertion
+site plots for use in Artemis
+
+=cut
+
+BEGIN { unshift( @INC, '../lib' ) }
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '/software/pathogen/internal/prod/lib/' ) }
+
+use Bio::Tradis::CommandLine::TradisAnalysis;
+
+Bio::Tradis::CommandLine::TradisAnalysis->new(args => \@ARGV, script_name => $0)->run;
diff --git a/bin/check_tradis_tags b/bin/check_tradis_tags
new file mode 100755
index 0000000..ac1007c
--- /dev/null
+++ b/bin/check_tradis_tags
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+
+package Bio::Tradis::Bin::DetectTags;
+
+# ABSTRACT: check if tr tag is present
+# PODNAME: check_tags
+
+=head1 SYNOPSIS
+
+Checks the presence of tr/tq tags in a given BAM file
+
+=cut
+
+BEGIN { unshift( @INC, '../lib' ) }
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '/software/pathogen/internal/prod/lib/' ) }
+
+use Bio::Tradis::CommandLine::CheckTags;
+
+Bio::Tradis::CommandLine::CheckTags->new(args => \@ARGV, script_name => $0)->run;
diff --git a/bin/combine_tradis_plots b/bin/combine_tradis_plots
new file mode 100755
index 0000000..9d90d2c
--- /dev/null
+++ b/bin/combine_tradis_plots
@@ -0,0 +1,23 @@
+#!/usr/bin/env perl
+
+package Bio::Tradis::Bin::CombineTradisPlots;
+
+# ABSTRACT: Combine multiple plotfiles and generate updated statistics for the combined files
+
+# PODNAME: combine_tradis_plot
+
+=head1 SYNOPSIS
+
+Takes a tab-delimited file with an ID as the first column followed by
+a list of plotfiles to combine per row. The ID will be used to name the new
+plotfile and as an identifier in the stats file, so ensure these are unique.
+
+=cut
+
+BEGIN { unshift( @INC, '../lib' ) }
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '/software/pathogen/internal/prod/lib/' ) }
+
+use Bio::Tradis::CommandLine::PlotCombine;
+
+Bio::Tradis::CommandLine::PlotCombine->new(args => \@ARGV, script_name => $0)->run;
diff --git a/bin/filter_tradis_tags b/bin/filter_tradis_tags
new file mode 100755
index 0000000..01ae6a2
--- /dev/null
+++ b/bin/filter_tradis_tags
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+
+package Bio::Tradis::Bin::FilterTags;
+
+# ABSTRACT: filter tags at start of fastq sequences
+# PODNAME: filter_tags
+
+=head1 SYNOPSIS
+
+Checks tags at the start of the fastq sequence and returns a file containing those that
+match the tag provided
+
+=cut
+
+BEGIN { unshift( @INC, '../lib' ) }
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '/software/pathogen/internal/prod/lib/' ) }
+
+use Bio::Tradis::CommandLine::FilterFastqTags;
+
+Bio::Tradis::CommandLine::FilterFastqTags->new(args => \@ARGV, script_name => $0)->run;
diff --git a/bin/remove_tradis_tags b/bin/remove_tradis_tags
new file mode 100755
index 0000000..0d54139
--- /dev/null
+++ b/bin/remove_tradis_tags
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+
+package Bio::Tradis::Bin::RemoveTags;
+
+# ABSTRACT: remove user specified tags from start of fastq sequences
+# PODNAME: remove_tags
+
+=head1 SYNOPSIS
+
+Removes tags from the sequence and quality strings based on user input
+
+=cut
+
+BEGIN { unshift( @INC, '../lib' ) }
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '/software/pathogen/internal/prod/lib/' ) }
+
+use Bio::Tradis::CommandLine::RemoveFastqTags;
+
+Bio::Tradis::CommandLine::RemoveFastqTags->new(args => \@ARGV, script_name => $0)->run;
diff --git a/bin/tradis_comparison.R b/bin/tradis_comparison.R
new file mode 100755
index 0000000..c3f5164
--- /dev/null
+++ b/bin/tradis_comparison.R
@@ -0,0 +1,116 @@
+#!/usr/bin/env Rscript
+
+# PODNAME: tradis_comparison.R
+# ABSTRACT: tradis_comparison.R
+
+library("edgeR")
+library("getopt")
+
+options(width=80)
+
+opt = getopt(matrix( c('help', 'h', 0, "logical",
+ 'verbose', 'v', 0, "integer",
+ 'controls', 'c', 1, "character",
+ 'conditions', 'm', 1, "character",
+ 'output', 'o', 1, "character",
+ 'plot', 'p', 1, "character",
+ 'filter', 'f', 0, "logical",
+ 'mincount', 't', 1, "integer"
+), ncol=4, byrow=TRUE ) );
+
+if(! is.null(opt$help) || is.null(opt$controls ) || is.null(opt$conditions ) )
+{
+ cat(paste("Usage: tradis_comparison.R [-h] [-f] [-t read cutoff] [-o outputfile.csv] [-p outputplot.pdf] --controls controls.txt --conditions conditions.txt\n\n"));
+ writeLines(c(strwrap("Compares two experimental conditions using the method of Dembek et al. mBio 2015. Read counts per gene are compared using edgeR. This analysis requires experimental replicates."),
+ "\n\nRequired Arguments:\n",
+ strwrap("--controls : 'control' libraries, generally growth in a permissive condition"),
+ strwrap("--conditions : libraries exposed to the experimental condition being compared"),
+ "\nOptional Arguments:\n",
+ strwrap("-o : output filename"),
+ strwrap("-p : output filename for diagnostic plots"),
+ strwrap("-f : enable filtering on minimum read counts"),
+ strwrap("-t : if --filter is enabled, sets minimum read count necessary in one condition for a gene to be included in the comparison."),"\n"))
+ q(status=1);
+}
+
+if( is.null(opt$filter)) {opt$filter=FALSE}
+if( is.null(opt$mincount)) {opt$mincount = 0}
+
+# parse contols and conditions files to lists
+control_files <- scan(opt$controls, what="", sep="\n")
+condition_files <- scan(opt$conditions, what="", sep="\n")
+
+if(length(control_files) < 2 || length(condition_files) < 2){
+ print("2 or more controls/conditions must be provided")
+}
+if(length(control_files) != length(condition_files)){
+ print("Unequal number of conditions and controls provided")
+}
+
+control_list = list()
+for(i in 1:length(control_files)){
+ control_list[[i]] <- read.table(control_files[i], sep="\t",header=TRUE, quote="\"", stringsAsFactors=F)
+}
+condition_list = list()
+for(i in 1:length(condition_files)){
+ condition_list[[i]] <- read.table(condition_files[i], sep="\t",header=TRUE, quote="\"", stringsAsFactors=F)
+}
+
+# set default output filename
+if ( is.null(opt$output ) ) { opt$output = paste(opt$condition1,opt$control1, ".output.csv",sep = "")}
+
+#only look at genes with counts > 0 (or input alternative) in some condition
+all_list <- c(control_list, condition_list)
+
+# make list of rows where read count > 0 (or input alternative) in all controls and conditions
+read_counts = do.call(cbind, lapply(all_list, function(x){ x$read_count }))
+
+#old case for only 0.
+if(! opt$filter){
+ zeros = apply( apply(read_counts, 1, ">", 0), 2, any )
+} else {
+ zeros_cont = apply( apply(read_counts[,1:length(control_files)], 1, ">", opt$mincount), 2, all )
+ zeros_cond = apply( apply(read_counts[,(length(control_files) + 1):(length(control_files) + length(condition_files))], 1, ">", opt$mincount), 2, all )
+ zeros = (zeros_cont | zeros_cond)
+}
+
+
+# remove these rows
+noness_list = lapply(all_list, function(x){ x[zeros,] } )
+
+#build count matrix
+count_mat <- do.call(cbind, lapply(noness_list, function(x){x[,7]}))
+conds = c()
+for(i in 1:length(control_files)){
+ conds <- c(conds, "ctrl")
+}
+for(i in 1:length(condition_files)){
+ conds <- c(conds, "cond")
+}
+conds <- as.factor(conds)
+
+
+if( is.null(opt$plot) ){ opt$plot = paste(opt$condition1,opt$control1,".output.pdf",sep = "") }
+pdf( opt$plot )
+
+#edgeR
+d <- DGEList(counts = count_mat, group=conds)
+plotMDS.DGEList(d, labels=conds)
+d <- calcNormFactors(d)
+d <- estimateCommonDisp(d)
+d <- estimateTagwiseDisp(d)
+de.tgw <- exactTest(d,pair=c("ctrl","cond"))
+
+ctrl1_noness <- noness_list[[1]]
+diff <- cbind(ctrl1_noness[,1:2],ctrl1_noness[,11],de.tgw$table,q.value=p.adjust(de.tgw$table$PValue,"BH"))
+
+
+#volcano plot
+plot(diff$logFC, -log(diff$q.value, base=2), xlim=range(c(-6,6)),xlab="Log2 Fold-Change, cond - Ctrl",ylab="-Log2 Q-value", cex = .5, pch=20)
+abline(h=-log(0.01), col="red")
+abline(v=-2, col="red")
+abline(v=2, col="red")
+
+
+#write results
+write.table(diff,file=opt$output,append=FALSE, quote=TRUE, sep=",", row.names=FALSE, col.names=c("locus_tag","gene_name","function","logFC","logCPM","PValue","q.value"))
diff --git a/bin/tradis_essentiality.R b/bin/tradis_essentiality.R
new file mode 100755
index 0000000..6626e82
--- /dev/null
+++ b/bin/tradis_essentiality.R
@@ -0,0 +1,78 @@
+#!/usr/bin/env Rscript
+
+# PODNAME: tradis_essentiality.R
+# ABSTRACT: tradis_essentiality.R
+
+library("MASS")
+options(warn=-1)
+options(width=80)
+
+args <- commandArgs(trailingOnly = TRUE)
+input = args[1]
+
+if( is.na(input) ){
+ cat(paste("Usage: tradis_essentiality.R data.tab\n\n"))
+ cat(strwrap("Produces calls of gene essentiality using an adaptation of the method described in Langridge et al. Genome Research 2009 and Barquist et al. NAR 2013. A loess curve is fit to the distribution of insertion indices, and used to identify the minima between the 'essential' and 'non-essential' distributions. These distributions are then used to fit gamma distributions, which are then used to calculate log-odds ratios, which are used to determine an insertion-index threshold for [...]
+ q(status=1)
+}
+
+STM_baseline <- read.table(input, sep="\t",header=TRUE,stringsAsFactors=F, quote="\"")
+
+ii <- STM_baseline$ins_index
+
+#identify second maxima
+h <- hist(ii, breaks=100,plot=FALSE)
+maxindex <- which.max(h$density[3:length(h$density)])
+maxval <- h$mids[maxindex+2]
+
+# print pdf of loess curve and later on, histogram
+pdf(paste(input, "QC_and_changepoint_plots", "pdf", sep = "."))
+
+#find inter-mode minima with loess
+nG <- length(STM_baseline$read_count)
+r <- floor(maxval *1000)
+I = ii < r / 1000
+h1 = hist(ii[I],breaks=(0:r/1000))
+lo <- loess(h1$density ~ c(1:length(h1$density))) #loess smothing over density
+plot(h1$density, main="Density")
+lines(predict(lo),col='red',lwd=2)
+m = h1$mids[which.min(predict(lo))]
+I1 = ((ii < m)&(ii >= 0))
+
+h = hist(ii, breaks=100,plot=FALSE)
+I2 = ((ii >= m)&(ii < h$mids[max(which(h$counts>5))]))
+f1 = (sum(I1) + sum(ii == 0))/nG
+f2 = (sum(I2))/nG
+
+d1 = fitdistr(ii[I1], "exponential")
+d2 = fitdistr(ii[I2], "gamma") #fit curves
+
+# print pdf of histogram
+#pdf("Loess_and_changepoint_estimation.pdf")
+
+#plots
+hist(ii,breaks=200, xlim=c(0,0.1), freq=FALSE,xlab="Insertion index", main="Gamma fits")
+lines(0:50/500, f1*dgamma(0:50/500, 1, d1$estimate[1])) # was [2]
+lines(0:50/500, f2*dgamma(0:50/500, d2$estimate[1], d2$estimate[2]))
+# print changepoint
+
+#calculate log-odds ratios to choose thresholds
+lower <- max(which(log((pgamma(1:500/10000, d2$e[1],d2$e[2])*(1-pgamma(1:500/10000, 1,d1$e[1], lower.tail=FALSE)))/(pgamma(1:500/10000, 1,d1$e[1], lower.tail=FALSE)*(1-pgamma(1:500/10000, d2$e[1],d2$e[2]))) , base=2) < -2))
+upper <- min(which(log((pgamma(1:500/10000, d2$e[1],d2$e[2])*(1-pgamma(1:500/10000, 1,d1$e[1], lower.tail=FALSE)))/(pgamma(1:500/10000, 1,d1$e[1], lower.tail=FALSE)*(1-pgamma(1:500/10000, d2$e[1],d2$e[2]))) , base=2) > 2))
+
+essen <- lower/10000
+ambig <- upper/10000
+
+lines(c(lower/10000, lower/10000), c(0,20), col="red")
+lines(c(upper/10000, upper/10000), c(0,20), col="red")
+
+mtext(paste(essen, ":", "Essential changepoint"), side=3, adj=1, padj=2)
+mtext(paste(ambig, ":", "Ambiguous changepoint"), side=3, adj=1, padj=3.75)
+dev.off()
+
+
+write.csv(STM_baseline, file=paste(input, "all", "csv", sep="."), row.names = FALSE, col.names= TRUE, quote=FALSE)
+write.csv(STM_baseline[STM_baseline$ins_index < essen,], file=paste(input, "essen", "csv", sep="."), row.names = FALSE, col.names= TRUE, quote=FALSE)
+write.csv(STM_baseline[STM_baseline$ins_index >= essen & STM_baseline$ins_index < ambig,], file=paste(input, "ambig", "csv", sep="."), row.names = FALSE, col.names= TRUE, quote=FALSE)
+
+
diff --git a/bin/tradis_gene_insert_sites b/bin/tradis_gene_insert_sites
new file mode 100755
index 0000000..29446c5
--- /dev/null
+++ b/bin/tradis_gene_insert_sites
@@ -0,0 +1,329 @@
+#!/usr/bin/env perl
+
+package Bio::Tradis::Bin::GeneInsertSites;
+
+# ABSTRACT: Generate insertion site details from TraDIS pipeline plots
+
+# PODNAME: tradis_gene_insert_sites
+
+=head1 NAME
+
+tradis_gene_insert_sites.pl
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+This script is for TRADIS analysis. It takes in a plot file created by the TRADIS pathogen informatics pipeline, and an embl file of
+annotation.
+It then outputs a tab delimited file with the insert site details. This is then used as input to an R script to calculate essentialit
+y.
+
+=head1 CONTACT
+
+path-help at sanger.ac.uk
+Original author: Lars Barquist
+
+=head1 METHODS
+
+=cut
+
+use strict;
+use warnings;
+no warnings 'uninitialized';
+use Bio::SeqIO;
+use Getopt::Long;
+use Text::CSV;
+use File::Basename;
+use Data::Dumper;
+
+my ($help,$output_suffix,$trim5,$trim3,$joined_output);
+
+GetOptions(
+ 'o|output_suffix=s' => \$output_suffix,
+ 'trim5=f' => \$trim5,
+ 'trim3=f' => \$trim3,
+ 'j|joined_output' => \$joined_output,
+ 'h|help' => \$help,
+);
+
+my $usage = qq[
+Take in a plot file(s) and an embl file and produce a tab delimited file with insert site details to use as input to an R script to t
+est for essentiality.
+
+Usage: tradis_gene_insert_sites
+ -o|output_suffix <suffix to add to output files (optional, default = tradis_gene_insert_sites.csv)>
+ -trim5 <trim insertion sites from 5' end of gene (optional, default = 0)>
+ -trim3 <trim insertion sites from 3' end of gene (optional, default = 0)>
+ -j|joined_output <output a single file with all info. default = one file per input file>
+ -h|help <display this message>
+
+tradis_gene_insert_sites my_annotation.embl my_insert_site_plot.gz
+
+tradis_gene_insert_sites my_annotation.embl my_insert_site_plot
+
+# multiple plot files
+tradis_gene_insert_sites my_annotation.embl plot1.gz plot2.gz plot3.gz plot4.gz
+
+# specifiy an output suffix
+# this will result in a file named my_insert_site_plot1.my_output.csv
+tradis_gene_insert_sites -o my_output.csv my_annotation.embl my_insert_site_plot1
+
+# Trim insertion sites from start or end of gene
+tradis_gene_insert_sites my_annotation.embl -trim5 0.1 -trim3 0.1 my_annotation.embl my_insert_site_plot.gz
+
+The trim parameter is the fraction of the gene length trimmed.
+
+# place all info into a single file
+tradis_gene_insert_sites -o output_suffix.csv -j my_annotation.embl plot1.gz plot2.gz plot3.gz
+
+Resulting file: joined_output.output_suffix.csv
+
+];
+
+
+$output_suffix ||= "tradis_gene_insert_sites.csv";
+$trim5 ||= 0;
+$trim3 ||= 0;
+
+( !$help
+ && scalar( @ARGV ) >= 2
+ && $trim5 >= 0 && $trim5 < 1
+ && $trim3 >= 0 && $trim3 < 1 ) or die $usage;
+
+my $embl_file = shift @ARGV;
+my $cds_coordinates = cds_locations($embl_file);
+my $annotation_file = Bio::SeqIO->new(-file => $embl_file, -format => 'EMBL') or die "Error: Couldnt open the annotation file\n";
+
+
+my @out_list = create_output_files( \@ARGV, $joined_output, $output_suffix );
+my @ins_list = prepare_inputs( \@ARGV, $joined_output );
+
+my $loop_index = 0;
+for my $insert_sites ( @ins_list ){
+ my $output_filename = $out_list[$loop_index];
+ open(my $out_fh, "+>", $output_filename) or die "Couldnt open output file\n";
+ my $csv = Text::CSV->new ( { binary => 1, sep_char => "\t" } ) or die "";
+ $csv->eol("\n");
+ $csv->print($out_fh, output_header());
+
+ while (my $sequence_annotation = $annotation_file->next_seq())
+ {
+ for my $feature ($sequence_annotation->get_SeqFeatures())
+ {
+ next if($feature->primary_tag eq 'gene' && ( is_gene_within_cds($cds_coordinates, $feature) == 1) );
+
+ next if !($feature->primary_tag eq 'CDS' || $feature->primary_tag eq 'polypeptide' || $feature->primary_tag eq 'gene');
+ my $feature_id = get_feature_id($feature);
+ my $gene_name = get_gene_name($feature);
+ my $product_value = get_product_value($feature);
+ my $rna_value = get_rna_value($feature);
+
+ # Trim insertion sites from start or end of gene
+ # Number of bases trimmed are -trim5 or -trim3 parameters multiplied by gene length.
+ my ($read_start,$read_end);
+ if($feature->strand == 1){
+ $read_start = $feature->start + int($trim5 * ($feature->end - $feature->start + 1));
+ $read_end = $feature->end - int($trim3 * ($feature->end - $feature->start + 1));
+ }else {
+ $read_start = $feature->start + int($trim3 * ($feature->end - $feature->start + 1));
+ $read_end = $feature->end - int($trim5 * ($feature->end - $feature->start + 1));
+ }
+
+ my $count = 0;
+ my $inserts = 0;
+ for(my $j=$read_start;$j < $read_end; $j++){
+ $count += $insert_sites->[$j];
+ $inserts += 1 if $insert_sites->[$j] > 0;
+ }
+ my $ins_index = $inserts / ($read_end - $read_start + 1);
+
+ my $row = [$feature_id,$gene_name,$rna_value,$feature->start,$feature->end,$feature->strand,$count,$ins_index, ($feature->end - $
+ feature->start + 1),$inserts,$product_value];
+ $csv->print($out_fh, $row);
+ }
+ }
+ close($out_fh);
+ $loop_index++;
+}
+
+sub prepare_inputs {
+ my ( $files, $joined_output ) = @_;
+
+ if( $joined_output ){
+ my $insert_sites;
+ for my $f ( @{ $files } ) {
+ $insert_sites = read_in_plot_file( $f, $insert_sites );
+ }
+ return ($insert_sites);
+ }
+ else {
+ my @ins_list;
+ for my $f ( @{ $files } ){
+ push( @ins_list, read_in_plot_file( $f, [] ) );
+ }
+ return @ins_list;
+ }
+}
+
+sub create_output_files {
+ my ( $files, $joined_output, $output_suffix ) = @_;
+
+ return ("joined_output.$output_suffix") if ( $joined_output );
+
+ my @outfiles;
+ for my $f ( @{ $files } ){
+ my $basename = fileparse( $f, '.gz' );
+ $basename =~ s/\.insert_site_plot//;
+ push( @outfiles, "$basename.$output_suffix" );
+ }
+ return @outfiles;
+}
+
+sub is_gene_within_cds
+{
+ my($cds_coordinates, $gene_feature) = @_;
+ for my $current_coords(@{$cds_coordinates})
+ {
+ next if( $current_coords->[0] > $gene_feature->start);
+ next if( $current_coords->[1] < $gene_feature->end);
+ return 1;
+ }
+
+ return 0;
+}
+
+sub cds_locations
+{
+ my($embl_file) = @_;
+ my @cds_coordinates;
+
+ my $annotation_file = Bio::SeqIO->new(-file => $embl_file, -format => 'EMBL') or die "Error: Couldnt open the annotation file\n";
+ while (my $sequence_annotation = $annotation_file->next_seq())
+ {
+ for my $feature ($sequence_annotation->get_SeqFeatures())
+ {
+ next if !($feature->primary_tag eq 'CDS');
+ push(@cds_coordinates, [$feature->start,$feature->end]);
+ }
+ }
+ return \@cds_coordinates;
+}
+
+
+sub get_feature_id
+{
+ my($feature) = @_;
+ my $feature_id = int(rand(10000));
+ my @junk;
+ if($feature->has_tag('locus_tag'))
+ {
+ ($feature_id, @junk) = $feature->get_tag_values('locus_tag');
+ }
+ elsif($feature->has_tag('ID'))
+ {
+ ($feature_id, @junk) = $feature->get_tag_values('ID');
+ }
+ elsif($feature->has_tag('systematic_id'))
+ {
+ ($feature_id, @junk) = $feature->get_tag_values('systematic_id');
+ }
+ else
+ {
+ $feature_id = join("_",($feature->seq_id(), $feature->strand, $feature->start, $feature->end ));
+ }
+ $feature_id =~ s/^"|"$//g;
+ return $feature_id ;
+}
+
+sub get_gene_name
+{
+ my($feature) = @_;
+ my $gene_name;
+ my @junk;
+ if($feature->has_tag('gene'))
+ {
+ ($gene_name, @junk) = $feature->get_tag_values('gene');
+ }
+ else
+ {
+ $gene_name = get_feature_id($feature);
+ }
+ $gene_name =~ s/\W//g;
+ return $gene_name;
+}
+
+sub get_product_value
+{
+ my($feature) = @_;
+ my $product = "";
+ my @junk;
+ if($feature->has_tag('product'))
+ {
+ ($product, @junk) = $feature->get_tag_values('product');
+ }
+ my $pseudo_gene = get_pseudo_gene_value($feature);
+ if(defined($pseudo_gene))
+ {
+ return $pseudo_gene;
+ }
+
+ return $product;
+}
+
+sub read_in_plot_file
+{
+ my($plot_filename,$read_ar) = @_;
+
+ my $fh;
+
+ if($plot_filename =~ m/gz$/)
+ {
+ open($fh, "-|",'gunzip -c '.$plot_filename) or die "Couldnt open plot file\n";
+ }
+ else
+ {
+ open($fh, $plot_filename) or die "Couldnt open plot file\n";
+ }
+ my $i = 0;
+ while(<$fh>)
+ {
+ chomp;
+ my @inserts_per_base = split /\s/, $_;
+ my $combined_insert_for_base = $inserts_per_base[0] + $inserts_per_base[1];
+ if(defined($read_ar->[$i]))
+ {
+ $read_ar->[$i] += $combined_insert_for_base;
+ }
+ else
+ {
+ push(@{$read_ar}, $combined_insert_for_base);
+ }
+ $i++;
+ }
+ close($fh);
+ return $read_ar;
+}
+
+sub get_rna_value
+{
+ my($feature) = @_;
+
+ return 1 if($feature->has_tag('ncRNA'));
+ return 0;
+}
+
+sub get_pseudo_gene_value
+{
+ my($feature) = @_;
+ if($feature->has_tag('pseudo'))
+ {
+ return "pseudogene";
+ }
+ return undef;
+}
+
+sub output_header
+{
+ ['locus_tag','gene_name','ncrna','start','end','strand','read_count','ins_index','gene_length','ins_count','fcn'];
+}
diff --git a/bin/tradis_merge_plots b/bin/tradis_merge_plots
new file mode 100755
index 0000000..05c1109
--- /dev/null
+++ b/bin/tradis_merge_plots
@@ -0,0 +1,98 @@
+#!/usr/bin/env perl
+
+package Bio::Tradis::Bin::MergePlots;
+
+# ABSTRACT:
+
+# PODNAME: tradis_merge_plots
+
+=head1 NAME
+
+tradis_merge_plots
+
+=head1 SYNOPSIS
+
+tradis_merge_plots - Given a study name or ID, group by sample and tag, and generate tab files for input to R.
+
+=head1 DESCRIPTION
+
+Given a study name or ID, group by sample and tag, and generate tab files for input to R.
+
+=head1 CONTACT
+
+path-help at sanger.ac.uk
+
+=head1 METHODS
+
+=cut
+
+package TraDISMergePlots::Main;
+
+use Moose;
+use Getopt::Long;
+use File::Basename;
+my ( $study, $help );
+
+GetOptions(
+ 'h|help' => \$help,
+);
+
+
+( defined($ARGV[0]) && !$help ) or die <<USAGE;
+Usage: tradis_merge_plots [options]
+Given a study name or ID, group by sample and tag, and generate tab files for input to R.
+
+# run over sequencescape study 1234
+tradis_merge_plots 1234
+
+# Provide a name instead of a study ID
+tradis_merge_plots "My Study"
+
+# This help message
+tradis_merge_plots -h
+
+USAGE
+$study = $ARGV[0];
+
+
+open(my $coverage_plots_fh, '-|', 'tradisfind -t study -i "'.$study.'" -d');
+
+my %coverage_plots;
+while(<$coverage_plots_fh>)
+{
+ my $line = $_;
+ chomp($line);
+ my @full_details = split("\t", $line);
+ my @file_path_details = split('/', $full_details[0]);
+ my @lane_details = split('#',$file_path_details[14]);
+ $full_details[1] =~ s!\.gff!.embl!i;
+
+ # library name, path to annotation, tag number => path
+ if(! defined($coverage_plots{$file_path_details[13]}{$full_details[1]}{$lane_details[1]}) )
+ {
+ my @plots;
+ push(@plots, $full_details[0]);
+ $coverage_plots{$file_path_details[13]}{$full_details[1]}{$lane_details[1]} = \@plots;
+ }
+ else
+ {
+ push(@{$coverage_plots{$file_path_details[13]}{$full_details[1]}{$lane_details[1]}},$full_details[0]);
+ }
+}
+
+for my $library_name (keys %coverage_plots)
+{
+ for my $path_to_annotation (keys %{$coverage_plots{$library_name}})
+ {
+ my $annotation_name = fileparse( $path_to_annotation );
+ for my $tag (keys %{$coverage_plots{$library_name}{$path_to_annotation}})
+ {
+ my $joined_plots = join(' ', @{$coverage_plots{$library_name}{$path_to_annotation}{$tag}});
+
+ my $outputfilename = join("_",($library_name, $tag,$annotation_name));
+ my $cmd = join(" ", ("tradis_gene_insert_sites", '-o', $outputfilename.'.csv', $path_to_annotation, $joined_plots ));
+ `bsub -M1000 -R 'select[mem>1000] rusage[mem=1000]' '$cmd'`;
+ print "Output from bsub will be in: ".$outputfilename.'.csv'."\n";
+ }
+ }
+}
diff --git a/bin/tradis_plot b/bin/tradis_plot
new file mode 100755
index 0000000..ce00c9e
--- /dev/null
+++ b/bin/tradis_plot
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+
+package Bio::Tradis::Bin::TradisPlot;
+
+# ABSTRACT: Generate plots as part of a tradis analysis
+# PODNAME: tradis_plot
+
+=head1 SYNOPSIS
+
+Generate insertion plots for Artemis from a mapped fastq file and
+a reference in GFF format
+
+=cut
+
+BEGIN { unshift( @INC, '../lib' ) }
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '/software/pathogen/internal/prod/lib/' ) }
+
+use Bio::Tradis::CommandLine::PlotTradis;
+
+Bio::Tradis::CommandLine::PlotTradis->new(args => \@ARGV, script_name => $0)->run;
diff --git a/dist.ini b/dist.ini
new file mode 100644
index 0000000..623def7
--- /dev/null
+++ b/dist.ini
@@ -0,0 +1,60 @@
+name = Bio-Tradis
+author = Carla Cummins <path-help at sanger.ac.uk>
+license = GPL_3
+copyright_holder = Wellcome Trust Sanger Institute
+copyright_year = 2013
+version = 1.3.1
+
+[MetaResources]
+homepage = http://www.sanger.ac.uk/
+repository.web = https://github.com/sanger-pathogens/Bio-Tradis
+repository.url = https://github.com/sanger-pathogens/Bio-Tradis.git
+repository.type = git
+
+[RequiresExternal]
+requires = awk
+requires = samtools
+requires = gunzip
+requires = gzip
+requires = smalt
+requires = tabix
+
+[@Git]
+[@Starter]
+[RunExtraTests]
+[AutoPrereqs]
+
+[FileFinder::ByName / BinNotR]
+dir = bin
+skip = .*\.R$
+
+[PodWeaver]
+finder = :InstallModules
+finder = BinNotR
+
+[PkgVersion]
+
+[Encoding]
+filename = t/data/AddTags/expected_tradis.bam
+filename = t/data/AddTags/sample_sm_tr.bam
+filename = t/data/AddTags/sample_sm_no_tr.bam
+filename = t/data/CombinePlots/sample1.sm.plot.gz
+filename = t/data/CombinePlots/sample2.sm.plot.gz
+filename = t/data/DetectTags/sample_sm_tr.bam
+filename = t/data/DetectTags/sample_sm_no_tr.bam
+filename = t/data/FilterTags/sample.fastq.gz
+filename = t/data/InsertSite/small_multi_sequence.bam
+filename = t/data/Parsers/test.bam
+filename = t/data/RunTradis/expected.1mm.plot.gz
+filename = t/data/RunTradis/expected.plot.gz
+filename = t/data/RunTradis/test.tagged.fastq.gz
+filename = t/data/RunTradis/test2.tagged.fastq.gz
+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/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
+filename = t/data/InsertSite/2_reads.bam
+encoding = bytes
diff --git a/install_dependencies.sh b/install_dependencies.sh
new file mode 100755
index 0000000..9a2d133
--- /dev/null
+++ b/install_dependencies.sh
@@ -0,0 +1,110 @@
+#!/bin/bash
+
+set -x
+set -e
+
+start_dir=$(pwd)
+
+SMALT_VERSION="0.7.6"
+TABIX_VERSION="master"
+SAMTOOLS_VERSION="1.3"
+
+SMALT_DOWNLOAD_URL="http://downloads.sourceforge.net/project/smalt/smalt-${SMALT_VERSION}-bin.tar.gz"
+TABIX_DOWNLOAD_URL="https://github.com/samtools/tabix/archive/${TABIX_VERSION}.tar.gz"
+SAMTOOLS_DOWNLOAD_URL="https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2"
+
+# Make an install location
+if [ ! -d 'build' ]; then
+ mkdir build
+fi
+cd build
+build_dir=$(pwd)
+
+# DOWNLOAD ALL THE THINGS
+download () {
+ url=$1
+ download_location=$2
+
+ if [ -e $download_location ]; then
+ echo "Skipping download of $url, $download_location already exists"
+ else
+ echo "Downloading $url to $download_location"
+ wget $url -O $download_location
+ fi
+}
+
+download $SMALT_DOWNLOAD_URL "smalt-${SMALT_VERSION}.tgz"
+download $TABIX_DOWNLOAD_URL "tabix-${TABIX_VERSION}.tgz"
+download $SAMTOOLS_DOWNLOAD_URL "samtools-${SAMTOOLS_VERSION}.tbz"
+
+# Update dependencies
+if [ "$TRAVIS" = 'true' ]; then
+ echo "Using Travis's apt plugin"
+else
+ sudo apt-get update -q
+ sudo apt-get install -y -q zlib1g-dev
+fi
+
+# Build all the things
+## smalt
+cd $build_dir
+smalt_dir=$(pwd)/"smalt-${SMALT_VERSION}-bin"
+if [ ! -d $smalt_dir ]; then
+ tar xzfv smalt-${SMALT_VERSION}.tgz
+fi
+cd $smalt_dir
+if [ ! -e "$smalt_dir/smalt" ]; then
+ ln "$smalt_dir/smalt_x86_64" "$smalt_dir/smalt"
+fi
+
+## tabix
+cd $build_dir
+tabix_dir=$(pwd)/"tabix-$TABIX_VERSION"
+if [ ! -d $tabix_dir ]; then
+ tar xzfv "${build_dir}/tabix-${TABIX_VERSION}.tgz"
+fi
+cd $tabix_dir
+if [ -e ${tabix_dir}/tabix ]; then
+ echo "Already built tabix"
+else
+ echo "Building tabix"
+ make
+fi
+
+## samtools
+cd $build_dir
+samtools_dir=$(pwd)/"samtools-$SAMTOOLS_VERSION"
+if [ ! -d $samtools_dir ]; then
+ tar xjfv "${build_dir}/samtools-${SAMTOOLS_VERSION}.tbz"
+fi
+cd $samtools_dir
+if [ -e ${samtools_dir}/samtools ]; then
+ echo "Already built samtools"
+else
+ echo "Building samtools"
+ sed -i 's/^\(DFLAGS=.\+\)-D_CURSES_LIB=1/\1-D_CURSES_LIB=0/' Makefile
+ sed -i 's/^\(LIBCURSES=\)/#\1/' Makefile
+ make prefix=${samtools_dir} install
+fi
+
+# Setup environment variables
+update_path () {
+ new_dir=$1
+ if [[ ! "$PATH" =~ (^|:)"${new_dir}"(:|$) ]]; then
+ export PATH=${new_dir}:${PATH}
+ fi
+}
+
+update_path ${smalt_dir}
+update_path "${tabix_dir}"
+update_path "${samtools_dir}"
+
+cd $start_dir
+
+# Install perl dependencies
+cpanm Dist::Zilla
+dzil authordeps --missing | cpanm
+dzil listdeps --missing | cpanm
+
+set +x
+set +e
diff --git a/lib/Bio/Tradis.pm b/lib/Bio/Tradis.pm
new file mode 100644
index 0000000..454714e
--- /dev/null
+++ b/lib/Bio/Tradis.pm
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+package Bio::Tradis;
+
+# ABSTRACT: 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
+
+=head1 SYNOPSIS
+
+Bio-Tradis provides functionality to:
+
+=over
+
+=item * detect TraDIS tags in a BAM file - L<Bio::Tradis::DetectTags>
+
+=item * add the tags to the reads - L<Bio::Tradis::AddTagsToSeq>
+
+=item * filter reads in a FastQ file containing a user defined tag - L<Bio::Tradis::FilterTags>
+
+=item * remove tags - L<Bio::Tradis::RemoveTags>
+
+=item * map to a reference genome - L<Bio::Tradis::Map>
+
+=item * create an insertion site plot file - L<Bio::Tradis::TradisPlot>
+
+=back
+
+Most of these functions are available as standalone scripts or as perl modules.
+
+
+=cut
+1;
diff --git a/lib/Bio/Tradis/AddTagsToSeq.pm b/lib/Bio/Tradis/AddTagsToSeq.pm
new file mode 100644
index 0000000..a4a1dd6
--- /dev/null
+++ b/lib/Bio/Tradis/AddTagsToSeq.pm
@@ -0,0 +1,203 @@
+package Bio::Tradis::AddTagsToSeq;
+
+# ABSTRACT: Takes a BAM file and creates a new BAM with tr and tq tags added to the sequence and quality strings.
+
+=head1 NAME
+
+Bio::Tradis::AddTagsToSeq
+
+=head1 SYNOPSIS
+
+Bio::Tradis::AddTagsToSeq parses BAM files, adds given tags to the start of the sequence and creates temporary SAM file,
+which is then converted to BAM
+
+ use Bio::Tradis::AddTagsToSeq;
+
+ my $pipeline = Bio::Tradis::AddTagsToSeq->new(bamfile => 'abc');
+ $pipeline->add_tags_to_seq();
+
+=head1 PARAMETERS
+
+=head2 Required
+
+C<bamfile> - path to/name of file containing reads and tags
+
+=head2 Optional
+
+C<outfile> - name to assign to output BAM. Defaults to C<file.tr.bam> for an input file named C<file.bam>
+
+=head1 METHODS
+
+C<add_tags_to_seq> - add TraDIS tags to reads. For unmapped reads, the tag
+ is added to the start of the read sequence and quality
+ strings. For reads where the flag indicates that it is
+ mapped and reverse complemented, the reverse complemented
+ tags are added to the end of the read strings.
+ This is because many conversion tools (e.g. picard) takes
+ the read orientation into account and will re-reverse the
+ mapped/rev comp reads during conversion, leaving all tags
+ in the correct orientation at the start of the sequences
+ in the resulting FastQ file.
+
+=cut
+
+use Moose;
+use Bio::Seq;
+use Bio::Tradis::Parser::Bam;
+use File::Basename;
+
+no warnings qw(uninitialized);
+
+has 'verbose' => ( is => 'rw', isa => 'Bool', default => 0 );
+has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
+has 'bamfile' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'outfile' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ default => sub {
+ my ($self) = @_;
+ my $o = $self->bamfile;
+ $o =~ s/\.bam/\.tr\.bam/;
+ $o =~ s/\.cram/\.tr\.cram/;
+ return $o;
+ }
+);
+
+has '_file_extension' => ( is => 'rw', isa => 'Str', lazy => 1, builder => '_build__file_extension' );
+has 'extension_to_output_switch' => ( is => 'rw', isa => 'HashRef', default => sub{ {cram => '-C', bam => '-b'} } );
+
+sub _build__file_extension
+{
+ my ($self) = @_;
+ my($filename, $dirs, $suffix) = fileparse($self->bamfile,qr/[^.]*/);
+ return lc($suffix);
+}
+
+sub add_tags_to_seq {
+ my ($self) = @_;
+
+ #set up BAM parser
+ my $filename = $self->bamfile;
+ my $outfile = $self->outfile;
+
+ #open temp file in SAM format and output headers from current BAM to it
+ print STDERR "Reading ".uc($self->_file_extension)." header\n" if($self->verbose);
+ system($self->samtools_exec." view -H $filename > tmp.sam");
+ open( TMPFILE, '>>tmp.sam' );
+
+ #open BAM file
+ print STDERR "Reading ".uc($self->_file_extension)." file\n" if($self->verbose);
+ my $pars = Bio::Tradis::Parser::Bam->new( file => $filename, samtools_exec => $self->samtools_exec );
+ my $read_info = $pars->read_info;
+
+ while ( $pars->next_read ) {
+ my $read_info = $pars->read_info;
+ my $line = ${$read_info}{READ};
+
+ # get tags, seq, qual and cigar str
+ my $trtag = ${$read_info}{tr};
+ my $tqtag = ${$read_info}{tq};
+
+ my $seq_tagged = ${$read_info}{SEQ};
+ my $qual_tagged = ${$read_info}{QUAL};
+ my $cigar_update = ${$read_info}{CIGAR};
+
+ #Check if seq is mapped & rev complement. If so, reformat.
+ my $mapped = $pars->is_mapped;
+ my $rev = $pars->is_reverse;
+ if ( $mapped && $rev ) {
+
+ # The transposon is not reverse complimented but the genomic read is
+
+ # reverse the genomic quality scores.
+ $qual_tagged = reverse($qual_tagged);
+
+ # Add the transposon quality score on the beginning
+ $qual_tagged = $tqtag . $qual_tagged;
+
+ # Reverse the whole quality string.
+ $qual_tagged = reverse($qual_tagged);
+
+ # Reverse the genomic sequence
+ my $genomic_seq_obj =
+ Bio::Seq->new( -seq => $seq_tagged, -alphabet => 'dna' );
+ my $reversed_genomic_seq_obj = $genomic_seq_obj->revcom;
+
+ # Add on the tag sequence
+ $seq_tagged = $trtag . $reversed_genomic_seq_obj->seq;
+
+ # Reverse the tag+genomic sequence to get it back into the correct orentation.
+ my $genomic_and_tag_seq_obj =
+ Bio::Seq->new( -seq => $seq_tagged, -alphabet => 'dna' );
+ $seq_tagged = $genomic_and_tag_seq_obj->revcom->seq;
+
+ }
+ else {
+ #print STDERR "$line\n" if(!defined($tqtag));
+ $seq_tagged = $trtag . $seq_tagged;
+ $qual_tagged = $tqtag . $qual_tagged;
+ }
+
+ if ($mapped) {
+ my $cigar = length($seq_tagged);
+ $cigar_update = $cigar . 'M';
+ }
+ else {
+ $cigar_update = '*';
+ }
+
+ # replace updated fields and print to TMPFILE
+ my @cols = split( " ", $line );
+ $cols[5] = $cigar_update;
+ $cols[9] = $seq_tagged;
+ $cols[10] = $qual_tagged;
+
+ print TMPFILE join( "\t", @cols ) . "\n";
+ }
+ $pars->close_file_handle;
+ close TMPFILE;
+
+ #convert tmp.sam to bam
+ print STDERR "Convert SAM to ".uc($self->_file_extension)."\n" if($self->verbose);
+
+
+ system($self->samtools_exec." view -h -S ".$self->_output_switch." -o $outfile tmp.sam");
+
+ if ( $self->_number_of_lines_in_bam_file($outfile) !=
+ $self->_number_of_lines_in_bam_file($filename) )
+ {
+ die
+"The number of lines in the input and output files don't match, so something's gone wrong\n";
+ }
+
+ #remove tmp file
+ unlink("tmp.sam");
+ return 1;
+}
+
+sub _output_switch
+{
+ my ( $self ) = @_;
+ if(defined($self->extension_to_output_switch->{$self->_file_extension}))
+ {
+ return $self->extension_to_output_switch->{$self->_file_extension};
+ }
+ else
+ {
+ return '';
+ }
+}
+
+sub _number_of_lines_in_bam_file {
+ my ( $self, $filename ) = @_;
+ open( my $fh, '-|', $self->samtools_exec." view $filename | wc -l" )
+ or die "Couldn't open file :" . $filename;
+ my $number_of_lines_in_file = <$fh>;
+ $number_of_lines_in_file =~ s!\W!!gi;
+ return $number_of_lines_in_file;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/Analysis/Exceptions.pm b/lib/Bio/Tradis/Analysis/Exceptions.pm
new file mode 100644
index 0000000..6f1a9a4
--- /dev/null
+++ b/lib/Bio/Tradis/Analysis/Exceptions.pm
@@ -0,0 +1,20 @@
+package Bio::Tradis::Analysis::Exceptions;
+# ABSTRACT: Custom exceptions
+
+=head1 SYNOPSIS
+
+Basic exception catcher
+
+=cut
+
+use Exception::Class (
+ Bio::Tradis::Analysis::Exceptions::FailedToOpenAlignmentSlice => { description => 'Couldnt get reads from alignment slice. Error with Samtools or BAM' },
+ Bio::Tradis::Analysis::Exceptions::FailedToOpenExpressionResultsSpreadsheetForWriting => { description => 'Couldnt write out the results for expression' },
+ Bio::Tradis::Analysis::Exceptions::InvalidInputFiles => { description => 'Invalid inputs, sequence names or lengths are incorrect' },
+ Bio::Tradis::Analysis::Exceptions::FailedToCreateNewBAM => { description => 'Couldnt create a new bam file' },
+ Bio::Tradis::Analysis::Exceptions::FailedToCreateMpileup => { description => 'Couldnt create an mpileup' },
+ Bio::Tradis::Analysis::Exceptions::FailedToOpenFeaturesTabFileForWriting => { description => 'Couldnt write tab file' },
+ Bio::Tradis::Analysis::Exceptions::FileNotFound => { description => 'Couldnt find file' },
+);
+
+1;
diff --git a/lib/Bio/Tradis/Analysis/InsertSite.pm b/lib/Bio/Tradis/Analysis/InsertSite.pm
new file mode 100644
index 0000000..9c4eff1
--- /dev/null
+++ b/lib/Bio/Tradis/Analysis/InsertSite.pm
@@ -0,0 +1,207 @@
+package Bio::Tradis::Analysis::InsertSite;
+# ABSTRACT: Take in a bam file and plot the start position of each read
+
+=head1 NAME
+
+InsertSite.pm - Take in a bam file and plot the start position of each read
+
+=head1 SYNOPSIS
+
+Takes in a mapped BAM file and plot the start position of each read
+
+ use Bio::Tradis::Analysis::InsertSite;
+ my $insertsite_plots_from_bam = Bio::Tradis::Analysis::InsertSite->new(
+ filename => 'my_file.bam',
+ output_base_filename => 'my_output_file'
+ );
+ $insertsite_plots_from_bam->create_plots();
+
+
+=cut
+
+
+use Moose;
+use Bio::Tradis::Parser::Bam;
+use Bio::Tradis::Parser::Cigar;
+
+has 'filename' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'output_base_filename' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'mapping_score' => ( is => 'ro', isa => 'Int', required => 1 );
+has 'samtools_exec' => ( is => 'ro', isa => 'Str', default => 'samtools' );
+has '_output_file_handles' => ( is => 'rw', isa => 'HashRef', lazy_build => 1 );
+has '_sequence_names' => ( is => 'rw', isa => 'ArrayRef', lazy_build => 1 );
+has '_sequence_base_counters' =>
+ ( is => 'rw', isa => 'HashRef', lazy_build => 1 );
+has '_sequence_information' =>
+ ( is => 'rw', isa => 'HashRef', lazy_build => 1 );
+
+has '_frequency_of_read_start' => (
+ is => 'rw',
+ isa => 'HashRef',
+ lazy => 1,
+ builder => '_build__frequency_of_read_start'
+);
+
+sub _build__sequence_information {
+ my ($self) = @_;
+ my %all_sequences_info =
+ Bio::Tradis::Parser::Bam->new( file => $self->filename, samtools_exec => $self->samtools_exec )->seq_info;
+ return \%all_sequences_info;
+}
+
+sub _build__sequence_names {
+ my ($self) = @_;
+ my @sequence_names = keys %{ $self->_sequence_information };
+ return \@sequence_names;
+}
+
+sub _build__sequence_base_counters {
+ my ($self) = @_;
+ my %sequence_base_counters;
+ for my $sequence_name ( @{ $self->_sequence_names } ) {
+ $sequence_base_counters{$sequence_name} = 0;
+ }
+ return \%sequence_base_counters;
+}
+
+sub _build__output_file_handles {
+ my ($self) = @_;
+ my $out = $self->output_base_filename;
+ chomp $out;
+
+ my %output_file_handles;
+ for my $sequence_name ( @{ $self->_sequence_names } ) {
+ my $file_sequence_name = $sequence_name;
+ $file_sequence_name =~ s/[^\w\d\.]/_/g;
+ my $cmd = "gzip > $out.$file_sequence_name.insert_site_plot.gz";
+ open( $output_file_handles{$sequence_name}, '|-', $cmd )
+ || Bio::Tradis::Analysis::Exceptions::FailedToCreateOutputFileHandle
+ ->throw( error =>
+"Couldnt create output file handle for saving insertsite plot results for "
+ . $sequence_name . " in "
+ . $self->filename
+ . " and output base "
+ . $self->output_base_filename );
+ }
+
+ return \%output_file_handles;
+}
+
+sub _number_of_forward_reads {
+ my ( $self, $sequence_name, $read_coord ) = @_;
+ return $self->_number_of_reads( $sequence_name, $read_coord, 1 );
+}
+
+sub _number_of_reverse_reads {
+ my ( $self, $sequence_name, $read_coord ) = @_;
+ return $self->_number_of_reads( $sequence_name, $read_coord, -1 );
+}
+
+sub _number_of_reads {
+ my ( $self, $sequence_name, $read_coord, $direction ) = @_;
+ if (
+ defined(
+ $self->_frequency_of_read_start->{$sequence_name}{$read_coord}
+ )
+ && defined(
+ $self->_frequency_of_read_start->{$sequence_name}{$read_coord}
+ {$direction}
+ )
+ )
+ {
+ return $self->_frequency_of_read_start->{$sequence_name}{$read_coord}
+ {$direction};
+ }
+ return 0;
+}
+
+# work out if padding is needed and return it as a formatted string
+sub _create_padding_string {
+ my ( $self, $previous_counter, $current_counter ) = @_;
+ my $padding_string = "";
+ for ( my $i = $previous_counter + 1 ; $i < $current_counter ; $i++ ) {
+ $padding_string .= "0 0\n";
+ }
+ return $padding_string;
+}
+
+sub _print_padding_at_end_of_sequence {
+ my ($self) = @_;
+ for my $sequence_name ( @{ $self->_sequence_names } ) {
+ my $sequence_length =
+ $self->_sequence_information->{$sequence_name}->{'LN'};
+ next unless ( $sequence_length =~ /^[\d]+$/ );
+ $sequence_length++;
+ my $padding_string =
+ $self->_create_padding_string(
+ $self->_sequence_base_counters->{$sequence_name},
+ $sequence_length );
+ $self->_sequence_base_counters->{$sequence_name} = $sequence_length;
+ print { $self->_output_file_handles->{$sequence_name} } $padding_string;
+ }
+}
+
+sub _close_output_file_handles {
+ my ($self) = @_;
+ for my $output_file_handle ( values %{ $self->_output_file_handles } ) {
+ close($output_file_handle);
+ }
+ return;
+}
+
+sub _build__frequency_of_read_start {
+ my ($self) = @_;
+ my %frequency_of_read_start;
+ my $samtools_command = join(' ', ($self->samtools_exec, 'view', '-F', 4, '-q', $self->mapping_score, $self->filename));
+
+ open(my $samtools_view_fh,"-|" ,$samtools_command);
+ while(<$samtools_view_fh>)
+ {
+ my $sam_line = $_;
+
+ my @read_details = split("\t", $sam_line);
+ my $seqid = $read_details[2];
+ my $cigar_parser = Bio::Tradis::Parser::Cigar->new(cigar => $read_details[5], coordinate => $read_details[3]);
+ my $strand = 1;
+ $strand = -1 if(($read_details[1] & 0x10) == 0x10);
+
+ if ( $strand == 1 ) {
+ $frequency_of_read_start{$seqid}{ $cigar_parser->start }
+ { $strand }++;
+ }
+ else {
+ $frequency_of_read_start{$seqid}{ $cigar_parser->end }
+ { $strand }++;
+ }
+ }
+ return \%frequency_of_read_start;
+}
+
+sub create_plots {
+ my ($self) = @_;
+ my %read_starts = %{ $self->_frequency_of_read_start };
+ for my $sequence_name ( keys %read_starts ) {
+ my %sequence_read_coords = %{ $read_starts{$sequence_name} };
+ for my $read_coord ( sort { $a <=> $b } ( keys %sequence_read_coords ) )
+ {
+ my $padding_string =
+ $self->_create_padding_string(
+ $self->_sequence_base_counters->{$sequence_name}, $read_coord );
+ $self->_sequence_base_counters->{$sequence_name} = $read_coord;
+
+ my $forward_reads =
+ $self->_number_of_forward_reads( $sequence_name, $read_coord );
+ my $reverse_reads =
+ $self->_number_of_reverse_reads( $sequence_name, $read_coord );
+
+ print { $self->_output_file_handles->{$sequence_name} }
+ $padding_string . $forward_reads . " " . $reverse_reads . "\n";
+ }
+ }
+
+ $self->_print_padding_at_end_of_sequence;
+ $self->_close_output_file_handles;
+ return 1;
+}
+
+1;
diff --git a/lib/Bio/Tradis/CombinePlots.pm b/lib/Bio/Tradis/CombinePlots.pm
new file mode 100644
index 0000000..09d2750
--- /dev/null
+++ b/lib/Bio/Tradis/CombinePlots.pm
@@ -0,0 +1,327 @@
+package Bio::Tradis::CombinePlots;
+
+# ABSTRACT: Combine multiple plotfiles and generate updated statistics for the combined files
+
+=head1 SYNOPSIS
+
+Takes a tab-delimited file with an ID as the first column followed by
+a list of plotfiles to combine per row. The ID will be used to name the new
+plotfile and as an identifier in the stats file, so ensure these are unique.
+
+For example, an input file named plots_to_combine.txt:
+
+ tradis1 plot1.1.gz plot1.2.gz plot1.3.gz
+ tradis2 plot2.1.gz plot2.2.gz
+ tradis3 plot3.1.gz plot3.2.gz plot3.3.gz plot3.4.gz
+
+will produce
+=over
+
+=item 1. a directory named combined with 3 files - tradis1.insertion_site_plot.gz,
+tradis2.insertion_site_plot.gz, tradis3.insertion_site_plot.gz
+=item 2. a stats file named plots_to_combine.stats
+
+=back
+
+=head1 USAGE
+
+ use Bio::Tradis::CombinePlots;
+
+ my $pipeline = Bio::Tradis::CombinePlots->new(plotfile => 'abc');
+ $pipeline->combine;
+
+=cut
+
+use Moose;
+use strict;
+use warnings;
+use File::Temp;
+use File::Path qw( remove_tree );
+use Data::Dumper;
+use Cwd;
+use Bio::Tradis::Analysis::Exceptions;
+
+has 'plotfile' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'combined_dir' => ( is => 'rw', isa => 'Str', default => 'combined' );
+has '_plot_handle' => (
+ is => 'ro',
+ isa => 'FileHandle',
+ required => 0,
+ lazy => 1,
+ builder => '_build__plot_handle'
+);
+has '_stats_handle' => (
+ is => 'ro',
+ isa => 'FileHandle',
+ required => 0,
+ lazy => 1,
+ builder => '_build__stats_handle'
+);
+has '_ordered_plot_ids' => (
+ is => 'rw',
+ isa => 'ArrayRef',
+ required => 0,
+ lazy => 1,
+ builder => '_build__ordered_plot_ids'
+);
+has '_destination' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ lazy => 1,
+ builder => '_build__destination'
+);
+
+sub _build__destination {
+ my $tmp_dir = File::Temp->newdir( DIR=> getcwd, CLEANUP => 0 );
+ return $tmp_dir->dirname;
+}
+
+sub _build__stats_handle {
+ my ($self) = @_;
+ my $filelist = $self->plotfile;
+ $filelist =~ s/([^\/]+$)//;
+ my $filename = $1;
+ $filename =~ s/[^\.]+$/stats/;
+ open( my $stats, ">", $filename );
+ return $stats;
+}
+
+sub _build__plot_handle {
+ my ($self) = @_;
+ my $plot = $self->plotfile;
+ open( my $plot_h, "<", $plot );
+ return $plot_h;
+}
+
+sub _build__ordered_plot_ids {
+ my ($self) = @_;
+ my $filelist = $self->plotfile;
+
+ my @id_order = `awk '{print \$1}' $filelist`;
+ foreach my $id (@id_order) {
+ chomp($id);
+ }
+ return \@id_order;
+}
+
+sub combine {
+ my ($self) = @_;
+ my $ordered_keys = $self->_ordered_plot_ids;
+ my $plot_handle = $self->_plot_handle;
+ my $combined_dir = $self->combined_dir;
+
+ $self->_write_stats_header;
+
+
+ system("mkdir $combined_dir") unless ( -d "$combined_dir" );
+ my @tabix_plot;
+
+ while ( my $line = <$plot_handle> ) {
+ #parse line into hash. keys = id, len, files. unzips files if needed.
+ my %plothash = $self->_parse_line($line);
+ my $id = $plothash{'id'};
+
+ #create output plot file
+ my $comb_plot_name = "$combined_dir/$id.insert_site_plot";
+ my $filelen = $plothash{'len'};
+ my ( @currentlines, $this_line );
+
+ my @full_plot;
+ foreach my $i ( 0 .. $filelen ) {
+ @currentlines = ();
+
+ foreach my $curr_fh ( @{ $plothash{'files'} } ) {
+ $this_line = <$curr_fh>;
+ push( @currentlines, $this_line ) if( defined $line && $line ne "");
+ }
+
+ my $comb_line = $self->_combine_lines( \@currentlines );
+
+ my $plot_values_tabix = $comb_line;
+ $plot_values_tabix =~ s/\s/\t/ if(defined $plot_values_tabix && $plot_values_tabix ne "");
+
+ my $tabix_line;
+ if ($id !~ m/^zip_combined/) {
+ my $tabix_line = "$id\t$i\t" . $plot_values_tabix if( defined $plot_values_tabix && $plot_values_tabix ne "");
+ push( @tabix_plot, $tabix_line ) if( $comb_line ne "");
+ }
+
+ push(@full_plot, $comb_line) if ( $comb_line ne '' );
+ }
+
+ open( CPLOT, '>', $comb_plot_name );
+ print CPLOT join("\n", @full_plot);
+ close(CPLOT);
+
+ $self->_write_stats($id, $filelen);
+ system("gzip -f $comb_plot_name");
+ }
+
+
+ if (@tabix_plot) {
+ $self->_prepare_and_create_tabix_for_combined_plots(\@tabix_plot);
+ }
+
+ File::Temp::cleanup();
+ # double check tmp dir is deleted. cleanup not working properly
+ remove_tree($self->_destination);
+ return 1;
+}
+
+sub _prepare_and_create_tabix_for_combined_plots {
+
+ my ($self, $tabix_plot) = @_;
+
+ my $tabix_plot_name = "combined/tabix.insert_site_plot.gz";
+ my $sorted_tabix_plot_name = "combined/tabix_sorted.insert_site_plot.gz";
+
+ open(my $tabix_plot_fh , '|-', " gzip >". $tabix_plot_name) or warn "Couldn't create the initial plot file for tabix";
+ print $tabix_plot_fh join( "\n", @{ $tabix_plot } );
+ close($tabix_plot_fh);
+
+ `cat $tabix_plot_name | gunzip - | sort -k1,1 -k2,2n | bgzip > $sorted_tabix_plot_name && tabix -b 2 -e 2 $sorted_tabix_plot_name`;
+ unlink($tabix_plot_name);
+
+}
+
+
+sub _parse_line {
+ my ( $self, $line ) = @_;
+ chomp $line;
+ my @fields = split( /\s+/, $line );
+ my $id = shift @fields;
+ my @files = @{ $self->_unzip_plots(\@fields) };
+ my $len = $self->_get_file_len( \@files );
+ if ( $len == 0 ){
+ die "\nPlots with ID $id not of equal length.\n";
+ }
+ #build file handles for each file
+ my @file_hs;
+ foreach my $f (@files){
+ open(my $fh, "<", $f);
+ push(@file_hs, $fh);
+ }
+ return ( id => $id, len => $len, files => \@file_hs );
+}
+
+sub _get_file_len {
+ my ( $self, $files ) = @_;
+
+ #check all files are of equal lens and return len if true
+ #wc misses last line - return $l++
+ my @lens;
+ for my $f ( @{$files} ) {
+ my $wc = `wc $f | awk '{print \$1}'`;
+ chomp $wc;
+ push( @lens, $wc );
+ }
+
+ my $l = shift @lens;
+ for my $x (@lens) {
+ return 0 if ( $x != $l );
+ }
+ return $l+1;
+}
+
+sub _combine_lines {
+ my ( $self, $lines ) = @_;
+
+ my @totals = ( 0, 0 );
+ foreach my $l ( @{$lines} ) {
+ if(!defined($l)){
+ return "";
+ next;
+ }
+ my @cols = split( /\s+/, $l );
+ $totals[0] += $cols[0];
+ $totals[1] += $cols[1];
+ }
+ return join( " ", @totals );
+}
+
+sub _write_stats_header {
+ my ($self) = @_;
+ my @fields =
+ ( "ID", "Sequence Length", "Unique Insertion Sites", "Seq Len/UIS" );
+ print { $self->_stats_handle } join( ",", @fields ) . "\n";
+ return 1;
+}
+
+sub _write_stats {
+ my ( $self, $id, $seq_len ) = @_;
+ my $combined_dir = $self->combined_dir;
+ my $comb_plot = "$combined_dir/$id.insert_site_plot";
+
+ #my $seq_len = `wc $comb_plot | awk '{print \$1}'`;
+ #chomp($seq_len);
+ my $uis = `grep -c -v "0 0" $comb_plot`;
+ chomp($uis);
+ my $sl_per_uis = "NaN";
+ $sl_per_uis = $seq_len / $uis if($uis > 0);
+
+ my $stats = "$id,$seq_len,$uis,$sl_per_uis\n";
+ print { $self->_stats_handle } $stats;
+
+ return 1;
+}
+
+sub _abs_path_list {
+ my ( $self, $files ) = @_;
+ my $plot_path = $self->_get_plotfile_path;
+
+ my @pathlist;
+ foreach my $f ( @{$files} ) {
+ if ( $f =~ /^\// ) { push( @pathlist, $f ); }
+ else { push( @pathlist, $plot_path . $f ); }
+ }
+ return \@pathlist;
+}
+
+sub _get_plotfile_path {
+ my ($self) = @_;
+ my $plotfile = $self->plotfile;
+
+ my @dirs = split( '/', $plotfile );
+ pop(@dirs);
+ my $path2plot = join( '/', @dirs );
+ return "$path2plot/";
+}
+
+sub _is_gz {
+ my ( $self, $plotname ) = @_;
+
+ if ( $plotname =~ /\.gz$/ ) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
+sub _unzip_plots {
+ my ( $self, $files ) = @_;
+ my $destination_directory = $self->_destination;
+
+ my @filelist = @{ $self->_abs_path_list($files) };
+ my @unz_plots;
+ foreach my $plotname ( @filelist ) {
+ Bio::Tradis::Analysis::Exceptions::FileNotFound->throw("Cannot find $plotname\n") unless ( -e $plotname );
+ if ( $self->_is_gz($plotname) ) {
+ $plotname =~ /([^\/]+$)/;
+ my $unz = $1;
+ $unz =~ s/\.gz//;
+ my $unzip_cmd = "gunzip -c $plotname > $destination_directory/$unz";
+ system($unzip_cmd);
+ push(@unz_plots, "$destination_directory/$unz");
+ }
+ else {
+ push(@unz_plots, $plotname);
+ }
+ }
+ return \@unz_plots;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/CommandLine/AddTags.pm b/lib/Bio/Tradis/CommandLine/AddTags.pm
new file mode 100644
index 0000000..ac2564c
--- /dev/null
+++ b/lib/Bio/Tradis/CommandLine/AddTags.pm
@@ -0,0 +1,84 @@
+package Bio::Tradis::CommandLine::AddTags;
+
+# ABSTRACT: Add given tags to the start of the sequence
+
+=head1 SYNOPSIS
+
+Adds given tags to the start of the sequence
+
+=cut
+
+use Moose;
+use Getopt::Long qw(GetOptionsFromArray);
+use Cwd 'abs_path';
+use Bio::Tradis::AddTagsToSeq;
+
+has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
+has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'bamfile' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
+has 'outfile' => ( is => 'rw', isa => 'Str', required => 0 );
+
+has 'verbose' => ( is => 'rw', isa => 'Bool', default => 0 );
+has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
+
+sub BUILD {
+ my ($self) = @_;
+
+ my ( $bamfile, $outfile, $help, $verbose, $samtools_exec);
+
+ GetOptionsFromArray(
+ $self->args,
+ 'b|bamfile=s' => \$bamfile,
+ 'o|outfile=s' => \$outfile,
+ 'h|help' => \$help,
+ 'v|verbose' => \$verbose,
+ 'samtools_exec=s' => \$samtools_exec,
+ );
+
+ $self->bamfile( abs_path($bamfile) ) if ( defined($bamfile) );
+ $self->outfile( abs_path($outfile) ) if ( defined($outfile) );
+ $self->help($help) if ( defined($help) );
+ $self->verbose($verbose) if ( defined($verbose) );
+ $self->samtools_exec($samtools_exec) if ( defined($samtools_exec) );
+
+ # print usage text if required parameters are not present
+ ($bamfile) or die $self->usage_text;
+}
+
+sub run {
+ my ($self) = @_;
+
+ if ( defined( $self->help ) ) {
+ #if ( scalar( @{ $self->args } ) == 0 ) {
+ $self->usage_text;
+ }
+
+ my $tagadd = Bio::Tradis::AddTagsToSeq->new(
+ bamfile => $self->bamfile,
+ outfile => $self->outfile,
+ verbose => $self->verbose,
+ samtools_exec => $self->samtools_exec
+ );
+ $tagadd->add_tags_to_seq;
+}
+
+sub usage_text {
+ print <<USAGE;
+Adds transposon sequence and quality tags to the read strings and
+outputs a BAM.
+
+Usage: add_tags -b file.bam [options]
+
+Options:
+-b : bam file with tradis tags
+-o : output BAM name (optional. default: <file>.tr.bam)
+-v : verbose debugging output
+
+USAGE
+ exit;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/CommandLine/CheckTags.pm b/lib/Bio/Tradis/CommandLine/CheckTags.pm
new file mode 100644
index 0000000..46a55cb
--- /dev/null
+++ b/lib/Bio/Tradis/CommandLine/CheckTags.pm
@@ -0,0 +1,70 @@
+package Bio::Tradis::CommandLine::CheckTags;
+
+# ABSTRACT: Check for presence of tr tag in BAM file
+
+=head1 SYNOPSIS
+
+Check for presence of tr tag in BAM file
+
+=cut
+
+use Moose;
+use Getopt::Long qw(GetOptionsFromArray);
+use Cwd 'abs_path';
+use Bio::Tradis::DetectTags;
+
+has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
+has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'bamfile' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
+has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
+
+sub BUILD {
+ my ($self) = @_;
+
+ my (
+ $bamfile, $help, $samtools_exec
+ );
+
+ GetOptionsFromArray(
+ $self->args,
+ 'b|bamfile=s' => \$bamfile,
+ 'h|help' => \$help,
+ 'samtools_exec=s' => \$samtools_exec,
+ );
+
+ $self->bamfile(abs_path($bamfile)) if ( defined($bamfile) );
+ $self->help($help) if ( defined($help) );
+ $self->samtools_exec($samtools_exec) if ( defined($samtools_exec) );
+
+ # print usage text if required parameters are not present
+ ($bamfile) or die $self->usage_text;
+}
+
+sub run {
+ my ($self) = @_;
+
+ if ( defined( $self->help ) ) {
+ $self->usage_text;
+ }
+
+ my $tagcheck = Bio::Tradis::DetectTags->new(bamfile => $self->bamfile, samtools_exec => $self->samtools_exec );
+ print $tagcheck->tags_present . "\n";
+}
+
+sub usage_text {
+ print <<USAGE;
+Check for the existence of tradis tags in a bam
+
+Usage: check_tags -b file.bam
+
+Options:
+-b : bam file with tradis tags
+
+USAGE
+ exit;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
\ No newline at end of file
diff --git a/lib/Bio/Tradis/CommandLine/FilterFastqTags.pm b/lib/Bio/Tradis/CommandLine/FilterFastqTags.pm
new file mode 100644
index 0000000..9908f4d
--- /dev/null
+++ b/lib/Bio/Tradis/CommandLine/FilterFastqTags.pm
@@ -0,0 +1,84 @@
+package Bio::Tradis::CommandLine::FilterFastqTags;
+
+# ABSTRACT: Remove given tags from the start of the sequence
+
+=head1 SYNOPSIS
+
+Removes tags from the sequence and quality strings
+
+=cut
+
+use Moose;
+use Getopt::Long qw(GetOptionsFromArray);
+use Cwd 'abs_path';
+use Bio::Tradis::FilterTags;
+
+has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
+has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'tag' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'mismatch' => ( is => 'rw', isa => 'Int', required => 0, default => 0 );
+has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
+has 'outfile' => ( is => 'rw', isa => 'Str', required => 0 );
+
+sub BUILD {
+ my ($self) = @_;
+
+ my ( $fastqfile, $tag, $mismatch, $outfile, $help );
+
+ GetOptionsFromArray(
+ $self->args,
+ 'f|fastqfile=s' => \$fastqfile,
+ 't|tag=s' => \$tag,
+ 'm|mismatch=i' => \$mismatch,
+ 'o|outfile=s' => \$outfile,
+ 'h|help' => \$help
+ );
+
+ $self->fastqfile( abs_path($fastqfile) ) if ( defined($fastqfile) );
+ $self->tag($tag) if ( defined($tag) );
+ $self->mismatch($mismatch) if ( defined($mismatch) );
+ $self->outfile( abs_path($outfile) ) if ( defined($outfile) );
+ $self->help($help) if ( defined($help) );
+
+ # print usage text if required parameters are not present
+ ($fastqfile && $tag) or die $self->usage_text;
+}
+
+sub run {
+ my ($self) = @_;
+
+ if ( defined( $self->help ) ) {
+
+ #if ( scalar( @{ $self->args } ) == 0 ) {
+ $self->usage_text;
+ }
+
+ my $tag_filter = Bio::Tradis::FilterTags->new(
+ fastqfile => $self->fastqfile,
+ tag => $self->tag,
+ mismatch => $self->mismatch,
+ outfile => $self->outfile
+ );
+ $tag_filter->filter_tags;
+}
+
+sub usage_text {
+ print <<USAGE;
+Filters a BAM file and outputs reads with tag matching -t option
+
+Usage: filter_tags -b file.bam -t tag [options]
+
+Options:
+-f : fastq file with tradis tags attached
+-t : tag to search for
+-m : number of mismatches to allow when matching tag (optional. default = 0)
+-o : output file name (optional. default: <file>.tag.fastq)
+
+USAGE
+ exit;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/CommandLine/PlotCombine.pm b/lib/Bio/Tradis/CommandLine/PlotCombine.pm
new file mode 100644
index 0000000..8cd4d3d
--- /dev/null
+++ b/lib/Bio/Tradis/CommandLine/PlotCombine.pm
@@ -0,0 +1,101 @@
+package Bio::Tradis::CommandLine::PlotCombine;
+
+# ABSTRACT: Combine multiple plotfiles and generate updated statistics for the combined files
+
+=head1 SYNOPSIS
+
+Takes a tab-delimited file with an ID as the first column followed by
+a list of plotfiles to combine per row. The ID will be used to name the new
+plotfile and as an identifier in the stats file, so ensure these are unique.
+
+For example, an input file named plots_to_combine.txt:
+
+ tradis1 plot1.1.gz plot1.2.gz plot1.3.gz
+ tradis2 plot2.1.gz plot2.2.gz
+ tradis3 plot3.1.gz plot3.2.gz plot3.3.gz plot3.4.gz
+
+will produce:
+
+=over
+
+=item 1. a directory named combined with 3 files - tradis1.insertion_site_plot.gz,
+tradis2.insertion_site_plot.gz, tradis3.insertion_site_plot.gz
+
+=item 2. a stats file named plots_to_combine.stats
+
+=back
+
+=cut
+
+use Moose;
+use Getopt::Long qw(GetOptionsFromArray);
+use Cwd 'abs_path';
+use Bio::Tradis::CombinePlots;
+
+has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
+has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'plotfile' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'output_dir' => ( is => 'rw', isa => 'Str', default => 'combined' );
+has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
+
+sub BUILD {
+ my ($self) = @_;
+
+ my ( $plotfile, $output_dir, $help );
+
+ GetOptionsFromArray(
+ $self->args,
+ 'p|plotfile=s' => \$plotfile,
+ 'o|output_dir' => \$output_dir,
+ 'h|help' => \$help
+ );
+
+ $self->plotfile( abs_path($plotfile) ) if ( defined($plotfile) );
+ $self->help($help) if ( defined($help) );
+
+ # print usage text if required parameters are not present
+ ($plotfile) or die $self->usage_text;
+}
+
+sub run {
+ my ($self) = @_;
+
+ $self->usage_text if ( defined( $self->help ) );
+
+ Bio::Tradis::CombinePlots->new(
+ plotfile => $self->plotfile,
+ combined_dir => $self->output_dir,
+ )->combine;
+}
+
+sub usage_text {
+ print <<USAGE;
+Combine multiple plotfiles and generate updated statistics for the combined
+files. Takes a tab-delimited file with an ID as the first column followed by
+a list of plotfiles to combine per row. The ID will be used to name the new
+plotfile and as an identifier in the stats file, so ensure these are unique.
+
+For example, an input file named plots_to_combine.txt:
+
+tradis1 plot1.1.gz plot1.2.gz plot1.3.gz
+tradis2 plot2.1.gz plot2.2.gz
+tradis3 plot3.1.gz plot3.2.gz plot3.3.gz plot3.4.gz
+
+will produce
+1. a directory named combined with 3 files - tradis1.insertion_site_plot.gz,
+tradis2.insertion_site_plot.gz, tradis3.insertion_site_plot.gz
+2. a stats file named plots_to_combine.stats
+
+Usage: combine_tradis_plots -p plots.txt
+
+Options:
+-p|plotfile : file with plots to be combined
+-o|output_dir : name of directory for output (default: combined)
+
+USAGE
+ exit;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/CommandLine/PlotTradis.pm b/lib/Bio/Tradis/CommandLine/PlotTradis.pm
new file mode 100644
index 0000000..1bc5cd9
--- /dev/null
+++ b/lib/Bio/Tradis/CommandLine/PlotTradis.pm
@@ -0,0 +1,79 @@
+package Bio::Tradis::CommandLine::PlotTradis;
+
+# ABSTRACT: Generate plots as part of a tradis analysis
+
+=head1 SYNOPSIS
+
+Generate insertion plots for Artemis from a mapped fastq file and
+a reference in GFF format
+
+=cut
+
+use Moose;
+use Getopt::Long qw(GetOptionsFromArray);
+use Cwd 'abs_path';
+use Bio::Tradis::TradisPlot;
+
+has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
+has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'mappedfile' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'mapping_score' => ( is => 'rw', isa => 'Int', required => 0, default => 30);
+has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
+has 'outfile' => ( is => 'rw', isa => 'Str', required => 0, default => 'tradis.plot' );
+
+sub BUILD {
+ my ($self) = @_;
+
+ my ( $mappedfile, $outfile, $mapping_score, $help );
+
+ GetOptionsFromArray(
+ $self->args,
+ 'f|mappedfile=s' => \$mappedfile,
+ 'o|outfile=s' => \$outfile,
+ 'm|mapping_score=i' => \$mapping_score,
+ 'h|help' => \$help
+ );
+
+ $self->mappedfile( abs_path($mappedfile) ) if ( defined($mappedfile) );
+ $self->outfile( abs_path($outfile) ) if ( defined($outfile) );
+ $self->mapping_score($mapping_score) if ( defined($mapping_score) );
+ $self->help($help) if ( defined($help) );
+
+ # print usage text if required parameters are not present
+ ($mappedfile) or die $self->usage_text;
+}
+
+sub run {
+ my ($self) = @_;
+
+ if ( defined( $self->help ) ) {
+ #if ( scalar( @{ $self->args } ) == 0 ) {
+ $self->usage_text;
+ }
+
+ my $plot = Bio::Tradis::TradisPlot->new(
+ mappedfile => $self->mappedfile,
+ outfile => $self->outfile,
+ mapping_score => $self->mapping_score
+ );
+ $plot->plot;
+}
+
+sub usage_text {
+ print <<USAGE;
+Create insertion site plot for Artemis
+
+Usage: tradis_plot -f file.bam [options]
+
+Options:
+-f : mapped, sorted bam file
+-m : mapping quality must be greater than X (optional. default: 30)
+-o : output base name for plot (optional. default: tradis.plot)
+
+USAGE
+ exit;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/CommandLine/RemoveFastqTags.pm b/lib/Bio/Tradis/CommandLine/RemoveFastqTags.pm
new file mode 100644
index 0000000..b3c35b7
--- /dev/null
+++ b/lib/Bio/Tradis/CommandLine/RemoveFastqTags.pm
@@ -0,0 +1,84 @@
+package Bio::Tradis::CommandLine::RemoveFastqTags;
+
+# ABSTRACT: Remove given tags from the start of the sequence
+
+=head1 SYNOPSIS
+
+Removes tags from the sequence and quality strings
+
+=cut
+
+use Moose;
+use Getopt::Long qw(GetOptionsFromArray);
+use Cwd 'abs_path';
+use Bio::Tradis::RemoveTags;
+
+has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
+has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'tag' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'mismatch' => ( is => 'rw', isa => 'Int', required => 0, default => 0 );
+has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
+has 'outfile' => ( is => 'rw', isa => 'Str', required => 0 );
+
+sub BUILD {
+ my ($self) = @_;
+
+ my ( $fastqfile, $tag, $mismatch, $outfile, $help );
+
+ GetOptionsFromArray(
+ $self->args,
+ 'f|fastqfile=s' => \$fastqfile,
+ 't|tag=s' => \$tag,
+ 'm|mismatch=i' => \$mismatch,
+ 'o|outfile=s' => \$outfile,
+ 'h|help' => \$help
+ );
+
+ $self->fastqfile( abs_path($fastqfile) ) if ( defined($fastqfile) );
+ $self->tag($tag) if ( defined($tag) );
+ $self->mismatch($mismatch) if ( defined($mismatch) );
+ $self->outfile( abs_path($outfile) ) if ( defined($outfile) );
+ $self->help($help) if ( defined($help) );
+
+ # print usage text if required parameters are not present
+ ($fastqfile && $tag) or die $self->usage_text;
+}
+
+sub run {
+ my ($self) = @_;
+
+ if ( defined( $self->help ) ) {
+
+ #if ( scalar( @{ $self->args } ) == 0 ) {
+ $self->usage_text;
+ }
+
+ my $tag_rm = Bio::Tradis::RemoveTags->new(
+ fastqfile => $self->fastqfile,
+ tag => $self->tag,
+ mismatch => $self->mismatch,
+ outfile => $self->outfile
+ );
+ $tag_rm->remove_tags;
+}
+
+sub usage_text {
+ print <<USAGE;
+Removes transposon sequence and quality tags from the read strings
+
+Usage: remove_tags -f file.fastq [options]
+
+Options:
+-f : fastq file with tradis tags
+-t : tag to remove
+-m : number of mismatches to allow when matching tag (optional. default = 0)
+-o : output file name (optional. default: <file>.rmtag.fastq)
+
+USAGE
+ exit;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/CommandLine/RunMapping.pm b/lib/Bio/Tradis/CommandLine/RunMapping.pm
new file mode 100644
index 0000000..df15cc7
--- /dev/null
+++ b/lib/Bio/Tradis/CommandLine/RunMapping.pm
@@ -0,0 +1,118 @@
+package Bio::Tradis::CommandLine::RunMapping;
+
+# ABSTRACT: Perform mapping
+
+=head1 SYNOPSIS
+
+Takes a reference genome and indexes it.
+Maps given fastq files to ref.
+
+=cut
+
+use Moose;
+use Getopt::Long qw(GetOptionsFromArray);
+use Cwd 'abs_path';
+use Bio::Tradis::Map;
+
+has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
+has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'reference' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
+has 'refname' =>
+ ( is => 'rw', isa => 'Str', required => 0, default => 'ref.index' );
+has 'outfile' =>
+ ( is => 'rw', isa => 'Str', required => 0, default => 'mapped.sam' );
+has 'smalt_k' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
+has 'smalt_s' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
+has 'smalt_y' => ( is => 'rw', isa => 'Maybe[Num]', required => 0, default => 0.96 );
+has 'smalt_r' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => -1 );
+has 'smalt_n' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => 1 );
+
+sub BUILD {
+ my ($self) = @_;
+
+ my ( $fastqfile, $ref, $refname, $outfile, $smalt_k, $smalt_s, $smalt_y, $smalt_r,$smalt_n, $help );
+
+ GetOptionsFromArray(
+ $self->args,
+ 'f|fastqfile=s' => \$fastqfile,
+ 'r|reference=s' => \$ref,
+ 'rn|refname=s' => \$refname,
+ 'o|outfile=s' => \$outfile,
+ 'sk|smalt_k=i' => \$smalt_k,
+ 'ss|smalt_s=i' => \$smalt_s,
+ 'sy|smalt_y=f' => \$smalt_y,
+ 'sr|smalt_r=i' => \$smalt_r,
+ 'n|smalt_n=i' => \$smalt_n,
+ 'h|help' => \$help
+ );
+
+ $self->fastqfile( abs_path($fastqfile) ) if ( defined($fastqfile) );
+ $self->reference( abs_path($ref) ) if ( defined($ref) );
+ $self->refname($refname) if ( defined($refname) );
+ $self->outfile( abs_path($outfile) ) if ( defined($outfile) );
+ $self->smalt_k( $smalt_k ) if ( defined($smalt_k) );
+ $self->smalt_s( $smalt_s ) if ( defined($smalt_s) );
+ $self->smalt_y( $smalt_y ) if ( defined($smalt_y) );
+ $self->smalt_r( $smalt_r ) if ( defined($smalt_r) );
+ $self->smalt_n( $smalt_n ) if ( defined($smalt_n) );
+ $self->help($help) if ( defined($help) );
+
+ # print usage text if required parameters are not present
+ ($fastqfile && $ref) or die $self->usage_text;
+}
+
+sub run {
+ my ($self) = @_;
+
+ if ( defined( $self->help ) ) {
+ #if ( scalar( @{ $self->args } ) == 0 ) {
+ $self->usage_text;
+ }
+
+ my $mapping = Bio::Tradis::Map->new(
+ fastqfile => $self->fastqfile,
+ reference => $self->reference,
+ refname => $self->refname,
+ outfile => $self->outfile,
+ smalt_k => $self->smalt_k,
+ smalt_s => $self->smalt_s,
+ smalt_y => $self->smalt_y,
+ smalt_r => $self->smalt_r
+ );
+ $mapping->index_ref;
+ $mapping->do_mapping;
+}
+
+sub usage_text {
+ print <<USAGE;
+Indexes the reference genome and maps the given fastq file.
+-k and -s options for indexing are calculated for the length of
+the read as follows unless otherwise specified ( --smalt_k &
+--smalt_s options )
+Read length | k | s
+---------------+----+-----
+<70 | 13 | 4
+>70 & <100 | 13 | 6
+>100 | 20 | 13
+
+Usage: run_mapping -f file.fastq -r ref.fa [options]
+
+Options:
+-f : fastq file to map
+-r : reference in fasta format
+-rn : reference index name (optional. default: ref.index)
+-o : mapped SAM output name (optional. default: mapped.sam)
+--smalt_k : custom k-mer value for SMALT mapping
+--smalt_s : custom step size for SMALT mapping
+--smalt_r : custom r value for SMALT mapping
+-n : number of threads to use for SMALT and samtools sort (optional. default = 1)
+
+USAGE
+ exit;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/CommandLine/TradisAnalysis.pm b/lib/Bio/Tradis/CommandLine/TradisAnalysis.pm
new file mode 100644
index 0000000..12449b4
--- /dev/null
+++ b/lib/Bio/Tradis/CommandLine/TradisAnalysis.pm
@@ -0,0 +1,271 @@
+package Bio::Tradis::CommandLine::TradisAnalysis;
+
+# ABSTRACT: Perform full tradis analysis
+
+=head1 SYNOPSIS
+
+Takes a fastq, reference and a tag and generates insertion
+site plots for use in Artemis
+
+=cut
+
+use Moose;
+use Getopt::Long qw(GetOptionsFromArray);
+use Cwd qw(abs_path cwd);
+use Bio::Tradis::RunTradis;
+use TryCatch;
+
+has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
+has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'tag' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'mismatch' => ( is => 'rw', isa => 'Int', required => 0, default => 0 );
+has 'tagdirection' =>
+ ( is => 'rw', isa => 'Str', required => 0, default => '3' );
+has 'reference' => ( is => 'rw', isa => 'Str', required => 0 );
+has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
+has 'mapping_score' =>
+ ( is => 'rw', isa => 'Int', required => 0, default => 30 );
+has 'smalt_k' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
+has 'smalt_s' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
+has 'smalt_y' => ( is => 'rw', isa => 'Maybe[Num]', required => 0, default => 0.96 );
+has 'smalt_r' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => -1 );
+has 'smalt_n' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => 1 );
+has 'essentiality' => ( is => 'rw', isa => 'Bool', required => 0, default => 0);
+
+has 'verbose' => ( is => 'rw', isa => 'Bool', default => 0 );
+has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
+
+has '_output_directory' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ lazy => 1,
+ builder => '_build__output_directory'
+);
+
+has '_stats_handle' => (
+ is => 'ro',
+ isa => 'FileHandle',
+ required => 0,
+ lazy => 1,
+ builder => '_build__stats_handle'
+);
+
+sub BUILD {
+ my ($self) = @_;
+
+ my (
+ $fastqfile, $tag, $td, $mismatch, $ref,$smalt_n, $essentiality,
+ $map_score, $smalt_k, $smalt_s, $smalt_y, $smalt_r, $help, $verbose,$samtools_exec
+ );
+
+ GetOptionsFromArray(
+ $self->args,
+ 'f|fastqfile=s' => \$fastqfile,
+ 't|tag=s' => \$tag,
+ 'td|tagdirection=i' => \$td,
+ 'mm|mismatch=i' => \$mismatch,
+ 'r|reference=s' => \$ref,
+ 'm|mapping_score=i' => \$map_score,
+ 'sk|smalt_k=i' => \$smalt_k,
+ 'ss|smalt_s=i' => \$smalt_s,
+ 'sy|smalt_y=f' => \$smalt_y,
+ 'n|smalt_n=i' => \$smalt_n,
+ 'sr|smalt_r=i' => \$smalt_r,
+ 'v|verbose' => \$verbose,
+ 'samtools_exec=s' => \$samtools_exec,
+ 'e|essentiality' => \$essentiality,
+ 'h|help' => \$help
+ );
+
+ #Essentiality analysis requires different defaults.
+ if(!defined($smalt_r) && !defined($map_score) && defined($essentiality))
+ {
+ $self->essentiality($essentiality) if ( defined($essentiality));
+ $smalt_r = 0;
+ $map_score = 0;
+ }
+
+ $self->fastqfile( abs_path($fastqfile) ) if ( defined($fastqfile) );
+ $self->tag( uc($tag) ) if ( defined($tag) );
+ $self->tagdirection($td) if ( defined($td) );
+ $self->mismatch($mismatch) if ( defined($mismatch) );
+ $self->reference( abs_path($ref) ) if ( defined($ref) );
+ $self->mapping_score($map_score) if ( defined($map_score) );
+ $self->smalt_k($smalt_k) if ( defined($smalt_k) );
+ $self->smalt_s($smalt_s) if ( defined($smalt_s) );
+ $self->smalt_y($smalt_y) if ( defined($smalt_y) );
+ $self->smalt_r($smalt_r) if ( defined($smalt_r) );
+ $self->smalt_n($smalt_n) if ( defined($smalt_n) );
+ $self->help($help) if ( defined($help) );
+ $self->verbose($verbose) if ( defined($verbose));
+ $self->samtools_exec($samtools_exec) if ( defined($samtools_exec) );
+
+ # print usage text if required parameters are not present
+ ( $fastqfile && $tag && $ref ) or die $self->usage_text;
+}
+
+sub run {
+ my ($self) = @_;
+
+ if ( defined( $self->help ) ) {
+
+ #if ( scalar( @{ $self->args } ) == 0 ) {
+ $self->usage_text;
+ }
+
+ #parse list of files and run pipeline for each one if they all exist
+ my $fq = $self->fastqfile;
+ open( FILES, "<", $fq ) or die "Cannot find $fq";
+ my @filelist = <FILES>;
+ my $file_dir = $self->get_file_dir;
+
+ #check files exist before running
+ my $line_no = 0;
+ my $full_path;
+ foreach my $f1 (@filelist) {
+ chomp($f1);
+ $line_no++;
+ if ( $f1 =~ /^\// ) { $full_path = $f1; }
+ else { $full_path = "$file_dir/$f1"; }
+ unless ( -e $full_path ) {
+ die "File $full_path does not exist ($fq, line $line_no)\n";
+ }
+ }
+
+ #if all files exist, continue with analysis
+ my $at_least_one_good_fastq = 0;
+ foreach my $f2 (@filelist) {
+ chomp($f2);
+ if ( $f2 =~ /^\// ) { $full_path = $f2; }
+ else { $full_path = "$file_dir/$f2"; }
+ my $analysis = Bio::Tradis::RunTradis->new(
+ fastqfile => $full_path,
+ tag => $self->tag,
+ tagdirection => $self->tagdirection,
+ mismatch => $self->mismatch,
+ reference => $self->reference,
+ mapping_score => $self->mapping_score,
+ output_directory => $self->_output_directory,
+ _stats_handle => $self->_stats_handle,
+ smalt_k => $self->smalt_k,
+ smalt_s => $self->smalt_s,
+ smalt_y => $self->smalt_y,
+ smalt_r => $self->smalt_r,
+ smalt_n => $self->smalt_n,
+ verbose => $self->verbose,
+ samtools_exec => $self->samtools_exec
+ );
+ try {
+ $analysis->run_tradis;
+ $at_least_one_good_fastq = 1;
+ }
+ catch (Bio::Tradis::Exception::TagFilterError $e) {
+ 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" );
+ }
+
+ $self->_tidy_stats;
+ close(FILES);
+
+ #$self->_combine_plots;
+}
+
+sub _build__output_directory {
+ return cwd();
+}
+
+sub _stats_filename {
+ my ($self) = @_;
+ my $dir = $self->get_file_dir;
+ my $output_directory = $self->_output_directory;
+ my $stats_filename = $self->fastqfile;
+ $stats_filename =~ s/$dir\///;
+ $stats_filename =~ s/[^\.]+$/stats/;
+ return "$output_directory/$stats_filename";
+}
+
+sub _build__stats_handle {
+ my ($self) = @_;
+ my $stats_filename = $self->_stats_filename();
+ open( my $stats, ">", $stats_filename );
+ return $stats;
+}
+
+sub _tidy_stats {
+ my ($self) = @_;
+ my $output_directory = $self->_output_directory;
+ my $stats_filename = $self->_stats_filename();
+ open( STATS, '<', $stats_filename );
+ open( TMP, '>', "$output_directory/tmp.stats" );
+
+ my $header = 0;
+ while ( my $line = <STATS> ) {
+ if ( $line =~ /^File/ ) {
+ if ( $header == 0 ) {
+ print TMP "$line";
+ $header = 1;
+ }
+ }
+ else {
+ print TMP "$line";
+ }
+ }
+ close(TMP);
+ close(STATS);
+ system("mv $output_directory/tmp.stats $stats_filename");
+}
+
+sub _combine_plots {
+ my ($self) = @_;
+ my $filelist = $self->fastqfile;
+
+ return 1;
+}
+
+sub get_file_dir {
+ my ($self) = @_;
+ my $fq = $self->fastqfile;
+
+ my @dirs = split( '/', $fq );
+ pop(@dirs);
+ return join( '/', @dirs );
+}
+
+sub usage_text {
+ print <<USAGE;
+Run a TraDIS analysis. This involves:
+1: filtering the data with tags matching that passed via -t option
+2: removing the tags from the sequences
+3: mapping
+4: creating an insertion site plot
+5: creating a stats summary
+
+Usage: bacteria_tradis [options]
+
+Options:
+-f : text file listing fastq files with tradis tags attached
+-t : tag to search for
+-r : reference genome in fasta format (.fa)
+-td : tag direction - 3 or 5 (optional. default = 3)
+-mm : number of mismatches allowed when matching tag (optional. default = 0)
+-m : mapping quality cutoff score (optional. default = 30)
+--smalt_k : custom k-mer value for SMALT mapping (optional)
+--smalt_s : custom step size for SMALT mapping (optional)
+--smalt_y : custom y parameter for SMALT (optional. default = 0.96)
+--smalt_r : custom r parameter for SMALT (optional. default = -1)
+-n : number of threads to use for SMALT and samtools sort (optional. default = 1)
+-e : set defaults for essentiality experiment (smalt_r = 0, -m = 0)
+-v : verbose debugging output
+USAGE
+ exit;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/CommandLine/TradisBam.pm b/lib/Bio/Tradis/CommandLine/TradisBam.pm
new file mode 100644
index 0000000..2c80835
--- /dev/null
+++ b/lib/Bio/Tradis/CommandLine/TradisBam.pm
@@ -0,0 +1,99 @@
+package Bio::Tradis::CommandLine::TradisBam;
+
+# ABSTRACT: Adds tags to sequences if tags are present
+
+=head1 SYNOPSIS
+
+Checks for tradis tags in the BAM and outputs processed TraDIS BAM file
+with tags attached
+
+=cut
+
+use Moose;
+use Getopt::Long qw(GetOptionsFromArray);
+use Cwd 'abs_path';
+use Bio::Tradis::DetectTags;
+use Bio::Tradis::AddTagsToSeq;
+
+has 'args' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
+has 'script_name' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'bamfile' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'outfile' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ default => sub {
+ my $o = $self->bamfile;
+ $o =~ s/\.bam/\.tr\.bam/;
+ return $o;
+ }
+);
+has 'help' => ( is => 'rw', isa => 'Bool', required => 0 );
+has 'verbose' => ( is => 'rw', isa => 'Bool', default => 0 );
+has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
+
+sub BUILD {
+ my ($self) = @_;
+
+ my ( $bamfile, $help, $outfile, $verbose, $samtools_exec );
+
+ GetOptionsFromArray(
+ $self->args,
+ 'b|bamfile=s' => \$bamfile,
+ 'o|outfile=s' => \$outfile,
+ 'h|help' => \$help,
+ 'v|verbose' => \$verbose,
+ 'samtools_exec=s' => \$samtools_exec,
+ );
+
+ $self->bamfile( abs_path($bamfile) ) if ( defined($bamfile) );
+ $self->outfile( abs_path($outfile) ) if ( defined($outfile) );
+ $self->help($help) if ( defined($help) );
+ $self->verbose($verbose) if ( defined($verbose) );
+ $self->samtools_exec($samtools_exec) if ( defined($samtools_exec) );
+
+ # print usage text if required parameters are not present
+ ($bamfile) or die $self->usage_text;
+}
+
+sub run {
+ my ($self) = @_;
+
+ if ( defined( $self->help ) ) {
+ $self->usage_text;
+ }
+
+ my $is_tradis =
+ Bio::Tradis::DetectTags->new(
+ bamfile => $self->bamfile,
+ samtools_exec => $self->samtools_exec
+ )->tags_present;
+ if ( defined($is_tradis) && $is_tradis == 1 ) {
+ my $add_tag_obj = Bio::Tradis::AddTagsToSeq->new(
+ bamfile => $self->bamfile,
+ outfile => $self->outfile,
+ verbose => $self->verbose,
+ samtools_exec => $self->samtools_exec
+ );
+ $add_tag_obj->add_tags_to_seq;
+ }
+}
+
+sub usage_text {
+ print <<USAGE;
+Checks for tradis tags in the BAM and outputs processed TraDIS BAM file
+with tags attached
+
+Usage: bam_to_tradis_bam -b file.bam [options]
+
+Options:
+-b : bam file
+-o : output BAM name (optional. default: <file>.tr.bam)
+-v : verbose debugging output
+USAGE
+ exit;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/DetectTags.pm b/lib/Bio/Tradis/DetectTags.pm
new file mode 100644
index 0000000..fc24b5e
--- /dev/null
+++ b/lib/Bio/Tradis/DetectTags.pm
@@ -0,0 +1,54 @@
+package Bio::Tradis::DetectTags;
+
+# ABSTRACT: Detect tr tags in BAM file
+
+=head1 NAME
+
+Bio::Tradis::DetectTags
+
+=head1 SYNOPSIS
+
+Detects presence of tr/tq tags in BAM files from Tradis analyses
+ use Bio::Tradis::DetectTags;
+
+ my $pipeline = Bio::Tradis::DetectTags->new(bamfile => 'abc');
+ $pipeline->tags_present();
+
+=head1 PARAMETERS
+
+=head2 Required
+
+C<bamfile> - path to/name of file to check
+
+=head1 METHODS
+
+C<tags_present> - returns true if TraDIS tags are detected in C<bamfile>
+
+=cut
+
+use Moose;
+use Bio::Tradis::Parser::Bam
+
+has 'bamfile' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
+
+sub tags_present {
+ my ($self) = @_;
+ my $pars = Bio::Tradis::Parser::Bam->new( file => $self->bamfile, samtools_exec => $self->samtools_exec );
+ my $read_info = $pars->read_info;
+ $pars->next_read;
+ $read_info = $pars->read_info;
+ if(defined(${$read_info}{tr}))
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/Exception.pm b/lib/Bio/Tradis/Exception.pm
new file mode 100644
index 0000000..3f18620
--- /dev/null
+++ b/lib/Bio/Tradis/Exception.pm
@@ -0,0 +1,16 @@
+package Bio::Tradis::Exception;
+# ABSTRACT: Exceptions for input data
+
+=head1 SYNOPSIS
+
+Exceptions for input data
+
+=cut
+
+
+use Exception::Class (
+ Bio::Tradis::Exception::RefNotFound => { description => 'Cannot find the reference file' },
+ Bio::Tradis::Exception::TagFilterError => { description => 'Problem filtering the Fastq by tag' }
+);
+
+1;
diff --git a/lib/Bio/Tradis/FilterTags.pm b/lib/Bio/Tradis/FilterTags.pm
new file mode 100644
index 0000000..9566f8a
--- /dev/null
+++ b/lib/Bio/Tradis/FilterTags.pm
@@ -0,0 +1,162 @@
+package Bio::Tradis::FilterTags;
+
+# ABSTRACT: Filter tags in a fastq file
+
+=head1 SYNOPSIS
+
+Reads in a fastq file with tradis tags already attached to the start of the sequence
+Filters reads that contain the provided tag
+Outputs a file *.tag.fastq unless an alternative outfile name is specified
+
+ use Bio::Tradis::FilterTags;
+
+ my $pipeline = Bio::Tradis::FilterTags->new(fastqfile => 'abc', tag => 'abc');
+ $pipeline->filter_tags();
+
+=head1 PARAMETERS
+
+=head2 Required
+
+=over
+
+=item * C<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.
+
+=item * C<tag> - TraDIS tag to match
+
+=back
+
+=head2 Optional
+
+=over
+
+=item * C<mismatch> - number of mismatches to allow when matching the tag. Default = 0
+
+=item * C<outfile> - output file name. Defaults to C<file.tag.fastq> for an input file named C<file.fastq>
+
+=back
+
+=head1 METHODS
+
+C<filter_tags> - outputs all reads containing the provided tag to C<outfile>
+
+=cut
+
+use Moose;
+use Bio::Tradis::Parser::Fastq;
+
+has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 1 );
+has '_unzipped_fastq' =>
+ ( is => 'rw', isa => 'Str', lazy => 1, builder => '_build__unzipped_fastq' );
+has 'tag' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'mismatch' => ( is => 'rw', isa => 'Int', required => 0 );
+has 'outfile' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ default => sub {
+ my ($self) = @_;
+ my $o = $self->fastqfile;
+ $o =~ s/\.fastq/\.tag\.fastq/;
+ return $o;
+ }
+);
+has '_currentread' => (
+ is => 'rw',
+ isa => 'ArrayRef',
+ required => 0,
+ writer => '_set_currentread'
+);
+
+sub _is_gz {
+ my ($self) = @_;
+ my $fq = $self->fastqfile;
+
+ if ( $fq =~ /\.gz/ ) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
+sub _build__unzipped_fastq {
+ my ($self) = @_;
+ my $fq = $self->fastqfile;
+
+ if ( $self->_is_gz ) {
+ $fq =~ /([^\/]+)$/;
+ my $newfq = $1;
+ $newfq =~ s/\.gz//;
+ if ( !-e $newfq ) {
+ `gunzip -c $fq > $newfq`;
+ }
+ return $newfq;
+ }
+ else {
+ return $fq;
+ }
+}
+
+sub filter_tags {
+ my ($self) = @_;
+ my $tag = uc( $self->tag );
+ my $outfile = $self->outfile;
+
+ #set up fastq parser
+ my $filename = $self->_unzipped_fastq;
+ my $pars = Bio::Tradis::Parser::Fastq->new( file => $filename );
+
+ open( OUTFILE, ">$outfile" );
+
+ while ( $pars->next_read ) {
+ my @read = $pars->read_info;
+ $self->_set_currentread( \@read );
+ my $id = $read[0];
+ my $seq_string = $read[1];
+ my $qual_string = $read[2];
+
+ my $print_out = 0;
+ if ( $self->mismatch == 0 ) {
+ if ( $seq_string =~ /^$tag/ ) {
+ $print_out = 1;
+ }
+ }
+ else {
+ my $mm = $self->_tag_mismatch($seq_string);
+ if ( $mm <= $self->mismatch ) {
+ $print_out = 1;
+ }
+ }
+
+ if ($print_out) {
+ print OUTFILE "\@$id\n";
+ print OUTFILE $seq_string . "\n+\n";
+ print OUTFILE $qual_string . "\n";
+ }
+ }
+ if ( $self->_is_gz ) {
+ unlink( $self->_unzipped_fastq );
+ }
+ close OUTFILE;
+ return 1;
+}
+
+sub _tag_mismatch {
+ my ($self) = @_;
+ my $tag_len = length( $self->tag );
+ my $seq_string = ${ $self->_currentread }[1];
+
+ my @tag = split( "", $self->tag );
+ my @seq = split( "", substr( $seq_string, 0, $tag_len ) );
+ my $mismatches = 0;
+ foreach my $i ( 0 .. ( $tag_len - 1 ) ) {
+ if ( $tag[$i] ne $seq[$i] ) {
+ $mismatches++;
+ }
+ }
+ return $mismatches;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/Map.pm b/lib/Bio/Tradis/Map.pm
new file mode 100644
index 0000000..726f882
--- /dev/null
+++ b/lib/Bio/Tradis/Map.pm
@@ -0,0 +1,143 @@
+package Bio::Tradis::Map;
+
+# ABSTRACT: Perform mapping
+
+=head1 SYNOPSIS
+
+Takes a reference genome and indexes it.
+Maps given fastq files to ref.
+
+ use Bio::Tradis::Map;
+
+ my $pipeline = Bio::Tradis::Map->new(fastqfile => 'abc', reference => 'abc');
+ $pipeline->index_ref();
+ $pipeline->do_mapping();
+
+=head1 PARAMETERS
+
+=head2 Required
+
+=over
+
+=item * C<fastqfile> - path to/name of file containing reads to map to the reference
+
+=item * C<reference> - path to/name of reference genome in fasta format (.fa)
+
+=back
+
+=head2 Optional
+
+=over
+
+=item * C<refname> - name to assign to the reference index files. Default = ref.index
+
+=item * C<outfile> - name to assign to the mapped SAM file. Default = mapped.sam
+
+=back
+
+=head1 METHODS
+
+=over
+
+=item * C<index_ref> - create index files of the reference genome. These are required
+ for the mapping step. Only skip this step if index files already
+ exist. -k and -s options for referencing are calculated based
+ on the length of the reads being mapped as per table:
+
+=begin html
+
+<table>
+<tr><th>Read length</th><th>k</th><th>s</th></tr>
+<tr><td><70</td><td>13</td><td>4<td></tr>
+<tr><td>>70 and <100</td><td>13</td><td>6<td></tr>
+<tr><td>>100</td><td>20</td><td>6<td></tr>
+</table>
+
+=end html
+
+=item * C<do_mapping> - map C<fastqfile> to C<reference>. Options used for mapping are: C<-r -1 -x -y 0.96>
+
+=back
+
+For more information on the mapping and indexing options discussed here, see the L<SMALT manual|ftp://ftp.sanger.ac.uk/pub4/resources/software/smalt/smalt-manual-0.7.4.pdf>
+
+=cut
+
+use Moose;
+use Bio::Tradis::Parser::Fastq;
+
+has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'reference' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'refname' =>
+ ( is => 'rw', isa => 'Str', required => 0, default => 'ref.index' );
+has 'outfile' =>
+ ( is => 'rw', isa => 'Str', required => 0, default => 'mapped.sam' );
+has 'smalt_k' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
+has 'smalt_s' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
+has 'smalt_y' => ( is => 'rw', isa => 'Maybe[Num]', required => 0, default => 0.96 );
+has 'smalt_r' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => -1 );
+has 'smalt_n' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => 1 );
+
+sub index_ref {
+ my ($self) = @_;
+ my $ref = $self->reference;
+ my $refname = $self->refname;
+
+ # Calculate index parameters
+ my $pars = Bio::Tradis::Parser::Fastq->new( file => $self->fastqfile );
+ $pars->next_read;
+ my @read = $pars->read_info;
+ my $read_len = length($read[1]);
+ my ( $k, $s ) = $self->_calculate_index_parameters($read_len);
+
+ my $cmd = "smalt index -k $k -s $s $refname $ref > /dev/null 2>&1";
+ system($cmd);
+ return $cmd;
+}
+
+sub _calculate_index_parameters {
+ my ($self, $read_len) = @_;
+ my ( $k, $s );
+
+ if( defined $self->smalt_k ){ $k = $self->smalt_k; }
+ else{ $k = $self->_smalt_k_default($read_len); }
+
+ if( defined $self->smalt_s ){ $s = $self->smalt_s; }
+ else{ $s = $self->_smalt_s_default($read_len); }
+
+ return ( $k, $s );
+}
+
+sub _smalt_k_default {
+ my ($self, $read_len) = @_;
+ if($read_len < 100){ return 13; }
+ else{ return 20; }
+}
+
+sub _smalt_s_default {
+ my ( $self, $read_len ) = @_;
+ if( $read_len < 70 ){ return 4; }
+ elsif( $read_len > 100 ){ return 13; }
+ else{ return 6; }
+}
+
+sub do_mapping {
+ my ($self) = @_;
+ my $fqfile = $self->fastqfile;
+ my $refname = $self->refname;
+ my $outfile = $self->outfile;
+ my $y = $self->smalt_y;
+ my $r = $self->smalt_r;
+ my $n = $self->smalt_n;
+
+ my $smalt = "smalt map -n $n -x -r $r -y $y $refname $fqfile 1> $outfile 2> smalt.stderr";
+
+ system($smalt);
+ unlink('smalt.stderr');
+
+ return $smalt;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/Parser/Bam.pm b/lib/Bio/Tradis/Parser/Bam.pm
new file mode 100644
index 0000000..05aa6c4
--- /dev/null
+++ b/lib/Bio/Tradis/Parser/Bam.pm
@@ -0,0 +1,192 @@
+package Bio::Tradis::Parser::Bam;
+
+# ABSTRACT: Very basic BAM parser. Limited functionality.
+
+=head1 SYNOPSIS
+
+Parses BAM files and gives access to basic info in them.
+
+ use Bio::Tradis::Parser::Bam;
+
+ my $pipeline = Bio::Tradis::Parser::Bam->new(file => 'abc');
+ $pipeline->read_info;
+ $pipeline->next_read;
+ $pipeline->seq_info;
+ $pipeline->is_mapped;
+ $pipeline->is_reverse;
+
+=cut
+
+use Moose;
+
+has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
+has 'file' => ( is => 'rw', isa => 'Str', required => 1 );
+has '_bam_handle' => (
+ is => 'ro',
+ isa => 'FileHandle',
+ required => 0,
+ lazy => 1,
+ builder => '_build__bam_handle'
+);
+has '_currentread' => (
+ is => 'rw',
+ isa => 'HashRef',
+ required => 0,
+ writer => '_set_currentread'
+);
+
+### Private methods ###
+
+sub _build__bam_handle {
+ my ($self) = @_;
+ my $bamfile = $self->file;
+
+ open( my $bamh, "-|", $self->samtools_exec." view $bamfile" )
+ or die "Cannot open $bamfile";
+ return $bamh;
+}
+
+sub _binary_flag {
+ my ( $self, $flag ) = @_;
+ my $bin_flag = sprintf( "%b", int($flag) );
+ return $bin_flag;
+}
+
+sub _parse_read {
+ my ( $self, $line ) = @_;
+ chomp($line);
+
+ # Parse and return as a hash ref
+ my @fields = qw(QNAME FLAG RNAME POS MAPQ CIGAR RNEXT PNEXT TLEN SEQ QUAL);
+ my @cols = split( '\t', $line );
+ my %read;
+ $read{'READ'} = $line;
+ foreach my $i ( 0 .. ( scalar(@cols) - 1 ) ) {
+ if ( $i < scalar(@fields) ) {
+ $read{ $fields[$i] } = $cols[$i];
+ if ( $fields[$i] eq 'FLAG' ) {
+ $read{'BINARY_FLAG'} = $self->_binary_flag( int( $cols[$i] ) );
+ }
+ }
+ else {
+ $cols[$i] =~ /^([^:]+):[AifZHB]:(.+)/;
+ #my @tagged = split( ':', $cols[$i] );
+ #my $tag_key = shift @tagged;
+ #shift @tagged;
+ #$read{ $tag_key } = join(':', @tagged);
+ $read{ $1 } = $2;
+ }
+ }
+ return \%read;
+}
+
+### Public methods ###
+
+=seq_info
+Reads BAM header and returns a hash (keys are sequence ids, values are hash
+refs with keys as tags (like LN and M5))
+=cut
+
+sub seq_info {
+ my ($self) = @_;
+ my $bamfile = $self->file;
+
+ my ( %all_seq_info, $seq_name, %this_seq_info );
+ open( SINFO, "-|", $self->samtools_exec." view -H $bamfile | grep ^\@SQ | cut -f 2-" );
+ while ( my $line = <SINFO> ) {
+ chomp($line);
+ my @fields = split( '\t', $line );
+ $seq_name = shift(@fields);
+ $seq_name =~ s/SN://;
+ foreach my $item (@fields) {
+ my @parts = split( ':', $item );
+ my $tag = shift(@parts);
+ $this_seq_info{$tag} = join( ':', @parts );
+ foreach my $k (keys %this_seq_info){
+ $all_seq_info{$seq_name}->{$k} = $this_seq_info{$k};
+ }
+ }
+
+ }
+ return %all_seq_info;
+}
+
+=next_read
+Moves _currentread to the next entry in the BAM. Returns 0 if EOF.
+=cut
+
+sub next_read {
+ my ($self) = @_;
+ my $bh = $self->_bam_handle;
+ my $line = <$bh>;
+ if ( defined($line) ) {
+ chomp($line);
+ my $read = $self->_parse_read($line);
+ $self->_set_currentread($read);
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
+sub close_file_handle{
+ my ($self) = @_;
+ close $self->_bam_handle;
+}
+
+=read_info
+Returns info from _currentread = hash reference with field name as key.
+Standard fields are named as per the SAM format specification:
+1 : QNAME
+2 : FLAG
+3 : RNAME
+4 : POS
+5 : MAPQ
+6 : CIGAR
+7 : RNEXT
+8 : PNEXT
+9 : TLEN
+10 : SEQ
+11 : QUAL
+Additional fields will use their tag names.
+Complete line is returned with key READ
+=cut
+
+sub read_info {
+ my ($self) = @_;
+ return $self->_currentread;
+}
+
+=is_mapped
+Parses the flag for the current read and determines if mapped.
+Returns 0 or 1.
+=cut
+
+sub is_mapped {
+ my ($self) = @_;
+ my $flag = ${ $self->_currentread }{BINARY_FLAG};
+ my @flag_array = split( '', $flag );
+ my $resl;
+ if ( $flag_array[-3] ) { $resl = 0; }
+ else { $resl = 1; }
+ return $resl;
+}
+
+=is_reverse
+Parses the flag for the current read and determines if reverse
+complemented. Returns 0 or 1.
+=cut
+
+sub is_reverse {
+ my ($self) = @_;
+ my $flag = ${ $self->_currentread }{BINARY_FLAG};
+ my @flag_array = split( '', $flag );
+
+ #print @flag_array;
+ return $flag_array[-5];
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/Parser/Cigar.pm b/lib/Bio/Tradis/Parser/Cigar.pm
new file mode 100644
index 0000000..beae275
--- /dev/null
+++ b/lib/Bio/Tradis/Parser/Cigar.pm
@@ -0,0 +1,71 @@
+package Bio::Tradis::Parser::Cigar;
+
+# ABSTRACT: Take in a cigar string and output start and end relative to the reference sequence
+
+=head1 SYNOPSIS
+
+Take in a cigar string and output start and end relative to the reference sequence
+
+ use Bio::Tradis::Parser::Cigar;
+
+ my $cigar = Bio::Tradis::Parser::Cigar->new(coordinate => 123, cigar => '10S90M');
+ $cigar->start;
+ $cigar->end;
+
+=cut
+
+use Moose;
+
+has 'cigar' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'coordinate' => ( is => 'ro', isa => 'Num', required => 1 );
+
+has '_results' => (is => 'ro', isa => 'HashRef', lazy => 1, builder => '_build__results');
+
+sub _build__results
+{
+ my($self) = @_;
+ my %results = ( start => 0, end => 0);
+ my $current_coordinate = $self->coordinate;
+
+ my @cigar_parts = $self->cigar =~ /(\d+[MIDNSHP=X])/g;
+ for my $cigar_item (@cigar_parts)
+ {
+ if( $cigar_item =~ /(\d+)([MIDNSHP=X])/)
+ {
+ my $number = $1;
+ my $action = $2;
+
+ if($action eq 'M' || $action eq 'X' || $action eq '=' )
+ {
+ $results{start} = $current_coordinate if($results{start} == 0);
+ $current_coordinate += $number;
+ $results{end} = $current_coordinate -1 if($results{end} < $current_coordinate);
+ }
+ elsif($action eq 'S' || $action eq 'D' || $action eq 'N')
+ {
+ $current_coordinate += $number;
+ }
+ elsif($action eq 'I' )
+ {
+ # do nothing
+ }
+ }
+ }
+
+ return \%results;
+}
+
+sub start
+{
+ my($self) = @_;
+ return $self->_results->{start};
+}
+
+sub end
+{
+ my($self) = @_;
+ return $self->_results->{end};
+}
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/Parser/Fastq.pm b/lib/Bio/Tradis/Parser/Fastq.pm
new file mode 100644
index 0000000..88b9e68
--- /dev/null
+++ b/lib/Bio/Tradis/Parser/Fastq.pm
@@ -0,0 +1,101 @@
+package Bio::Tradis::Parser::Fastq;
+
+# ABSTRACT: Basic FastQ parser.
+
+=head1 SYNOPSIS
+
+Parses fastq files.
+
+ use Bio::Tradis::Parser::Fastq;
+
+ my $pipeline = Bio::Tradis::Parser::Fastq->new(file => 'abc');
+ $pipeline->next_read;
+ $pipeline->read_info;
+
+=cut
+
+use Moose;
+
+has 'file' => ( is => 'rw', isa => 'Str', required => 1 );
+has '_fastq_handle' => (
+ is => 'ro',
+ isa => 'FileHandle',
+ required => 0,
+ lazy => 1,
+ builder => '_build__fastq_handle'
+);
+has '_currentread' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ writer => '_set_currentread'
+);
+### Private methods ###
+
+sub _build__fastq_handle {
+ my ($self) = @_;
+ my $fastqfile = $self->file;
+
+ open( my $fqh, "<", $fastqfile ) or die "Cannot open $fastqfile";
+ return $fqh;
+}
+
+### Public methods ###
+
+=next_read
+Moves to the next read. Returns 1 if read exists, returns 0
+if EOF
+=cut
+
+sub next_read {
+ my ($self) = @_;
+ my $fqh = $self->_fastq_handle;
+
+ my $read = <$fqh>;
+ if ( defined($read) ) {
+ $self->_set_currentread($read);
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
+=read_info
+Returns an array of info for the read in an array.
+0 = id
+1 = sequence
+2 = quality string
+=cut
+sub read_info {
+ my ($self) = @_;
+ my $fqh = $self->_fastq_handle;
+
+ my @fastq_read;
+
+ # get id
+ my $id = $self->_currentread;
+ chomp($id);
+ $id =~ s/^\@//;
+ push( @fastq_read, $id );
+
+ # get sequence
+ my $seq = <$fqh>;
+ chomp($seq);
+ push( @fastq_read, $seq );
+
+ # skip + line
+ my $skip = <$fqh>;
+
+ # get quality
+ my $qual = <$fqh>;
+ chomp($qual);
+ push( @fastq_read, $qual );
+
+ return @fastq_read;
+
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/RemoveTags.pm b/lib/Bio/Tradis/RemoveTags.pm
new file mode 100644
index 0000000..7e00789
--- /dev/null
+++ b/lib/Bio/Tradis/RemoveTags.pm
@@ -0,0 +1,122 @@
+package Bio::Tradis::RemoveTags;
+
+# ABSTRACT: Remove tags from seqs a fastq file
+
+=head1 SYNOPSIS
+
+Reads in a fastq file with tradis tags already attached to the start of the sequence
+Removes tags from the sequence and quality strings
+Outputs a file *.rmtag.fastq unless an out file is specified
+
+ use Bio::Tradis::RemoveTags;
+
+ my $pipeline = Bio::Tradis::RemoveTags->new(fastqfile => 'abc', tag => 'abc');
+ $pipeline->remove_tags();
+
+=head1 PARAMETERS
+
+=head2 Required
+
+=over
+
+=item * C<fastqfile> - path to/name of file to filter
+
+=item * C<tag> - TraDIS tag to remove
+
+=back
+
+=head2 Optional
+
+=over
+
+=item * C<mismatch> - number of mismatches to allow when removing the tag. Default = 0
+
+=item * C<outfile> - defaults to C<file.rmtag.fastq> for and input file named C<file.fastq>
+
+=back
+
+=head1 METHODS
+
+C<remove_tags> - output all reads with the tags removed to C<outfile>
+
+=cut
+
+use Moose;
+use Bio::Tradis::Parser::Fastq;
+
+has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'tag' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'mismatch' => ( is => 'rw', isa => 'Int', required => 0 );
+has 'outfile' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ default => sub {
+ my ($self) = @_;
+ my $o = $self->bamfile;
+ $o =~ s/\.fastq/\.rmtag\.fastq/;
+ return $o;
+ }
+);
+
+sub remove_tags {
+ my ($self) = @_;
+ my $tag = uc( $self->tag );
+ my $outfile = $self->outfile;
+
+ #set up fastq parser
+ my $filename = $self->fastqfile;
+ my $pars = Bio::Tradis::Parser::Fastq->new( file => $filename );
+
+ # create file handle for output
+ open( OUTFILE, ">$outfile" );
+
+ # loop through fastq
+ while ( $pars->next_read ) {
+ my @read = $pars->read_info;
+ my $id = $read[0];
+ my $seq_string = $read[1];
+ my $qual_string = $read[2];
+
+ # remove the tag
+ my $rm = 0;
+ if ( $self->mismatch == 0 ) {
+ if ( $seq_string =~ m/^$tag/ ) { $rm = 1; }
+ }
+ else {
+ my $mm = $self->_tag_mismatch($seq_string);
+ if ( $mm <= $self->mismatch ) { $rm = 1; }
+ }
+
+ if ($rm) {
+ my $l = length($tag);
+ $seq_string = substr( $seq_string, $l );
+ $qual_string = substr( $qual_string, $l );
+ }
+
+ print OUTFILE "\@$id\n";
+ print OUTFILE $seq_string . "\n+\n";
+ print OUTFILE $qual_string . "\n";
+ }
+ close OUTFILE;
+ return 1;
+}
+
+sub _tag_mismatch {
+ my ( $self, $seq_string ) = @_;
+ my $tag_len = length( $self->tag );
+
+ my @tag = split( "", $self->tag );
+ my @seq = split( "", substr( $seq_string, 0, $tag_len ) );
+ my $mismatches = 0;
+ foreach my $i ( 0 .. ( $tag_len - 1 ) ) {
+ if ( $tag[$i] ne $seq[$i] ) {
+ $mismatches++;
+ }
+ }
+ return $mismatches;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/RunTradis.pm b/lib/Bio/Tradis/RunTradis.pm
new file mode 100644
index 0000000..e1fc6b8
--- /dev/null
+++ b/lib/Bio/Tradis/RunTradis.pm
@@ -0,0 +1,511 @@
+package Bio::Tradis::RunTradis;
+
+# ABSTRACT: Perform all steps required for a tradis analysis
+
+=head1 SYNOPSIS
+
+Takes a fastq file with tags already attached, filters the tags matching user input,
+removes the tags, maps to a reference (.fa) and generates insertion site plots for use in
+Artemis (or other genome browsers), mapped BAM files for each lane and a statistical summary of the analysis.
+
+ use Bio::Tradis::RunTradis;
+
+ my $pipeline = Bio::Tradis::RunTradis->new(
+ fastqfile => 'abc',
+ reference => 'abc',
+ tag => 'abc',
+ tagdirection => '5'|'3'
+ );
+ $pipeline->run_tradis();
+
+=head1 PARAMETERS
+
+=head2 Required
+
+=over
+
+=item * C<fastqfile> - file containing a list of fastqs (gzipped or raw) to run the
+ complete analysis on. This includes all (including
+ intermediary format conversion and sorting) steps starting from
+ filtering.
+
+=item * C<tag> - TraDIS tag to filter and then remove
+
+=item * C<reference> - path to/name of reference genome in fasta format (.fa)
+
+=back
+
+=head2 Optional
+
+=over
+
+=item * C<mismatch> - number of mismatches to allow when filtering/removing the tag. Default = 0
+
+=item * C<tagdirection> - direction of the tag, 5' or 3'. Default = 3
+
+=item * C<mapping_score> - cutoff value for mapping score when creating insertion site plots. Default = 30
+
+=back
+
+=head1 METHODS
+
+C<run_tradis> - run complete analysis with given parameters
+
+=cut
+
+use Cwd;
+use Moose;
+use File::Temp;
+use File::Path 'rmtree';
+use Bio::Tradis::FilterTags;
+use Bio::Tradis::RemoveTags;
+use Bio::Tradis::Map;
+use Bio::Tradis::TradisPlot;
+use Bio::Tradis::Exception;
+use Bio::Tradis::Samtools;
+
+has 'verbose' => ( is => 'rw', isa => 'Bool', default => 0 );
+has 'fastqfile' => ( is => 'rw', isa => 'Str', required => 1 );
+has '_unzipped_fastq' =>
+ ( is => 'rw', isa => 'Str', lazy => 1, builder => '_build__unzipped_fastq' );
+has 'tag' => ( is => 'ro', isa => 'Str', required => 1 );
+has 'tagdirection' =>
+ ( is => 'ro', isa => 'Str', required => 1, default => '3' );
+has 'mismatch' => ( is => 'rw', isa => 'Int', required => 1, default => 0 );
+has 'mapping_score' =>
+ ( is => 'ro', isa => 'Int', required => 1, default => 30 );
+has 'reference' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'outfile' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ default => sub {
+ my ($self) = @_;
+ my @dirs = split( '/', $self->fastqfile );
+ my $o = pop(@dirs);
+ $o =~ s/fastq/out/;
+ return $o;
+ }
+);
+has 'smalt_k' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
+has 'smalt_s' => ( is => 'rw', isa => 'Maybe[Int]', required => 0 );
+has 'smalt_y' => ( is => 'rw', isa => 'Maybe[Num]', required => 0, default => 0.96 );
+has 'smalt_r' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => -1);
+has 'smalt_n' => ( is => 'rw', isa => 'Maybe[Int]', required => 0, default => 1);
+has 'samtools_exec' => ( is => 'rw', isa => 'Str', default => 'samtools' );
+
+has '_temp_directory' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ lazy => 1,
+ builder => '_build__temp_directory'
+);
+has 'output_directory' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ lazy => 1,
+ builder => '_build_output_directory'
+);
+has '_stats_handle' => ( is => 'ro', isa => 'FileHandle', required => 1 );
+has '_sequence_info' => (
+ is => 'rw',
+ isa => 'HashRef',
+ required => 0,
+ lazy => 1,
+ builder => '_build__sequence_info'
+);
+has '_current_directory' => (
+ is => 'rw',
+ isa => 'Str',
+ required => 0,
+ lazy => 1,
+ builder => '_build__current_directory'
+);
+
+sub _is_gz {
+ my ($self) = @_;
+ my $fq = $self->fastqfile;
+
+ if ( $fq =~ /\.gz/ ) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
+sub _build__unzipped_fastq {
+ my ($self) = @_;
+ my $fq = $self->fastqfile;
+ my $temporary_directory = $self->_temp_directory;
+
+ if ( $self->_is_gz ) {
+ $fq =~ /([^\/]+)$/;
+ my $newfq = $1;
+ $newfq =~ s/\.gz//;
+ if ( !-e "$temporary_directory/$newfq" ) {
+ `gunzip -c $fq > $temporary_directory/$newfq`;
+ }
+ return "$temporary_directory/$newfq";
+ }
+ else {
+ return $fq;
+ }
+}
+
+sub _build__stats_handle {
+ my ($self) = @_;
+ my $outfile = $self->outfile;
+
+ open( my $stats, ">", "$outfile.stats" );
+ return $stats;
+}
+
+sub _build__sequence_info {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+ open( GREP,
+ "grep \@SQ $temporary_directory/mapped.sam | awk '{print \$2, \$3}' |"
+ );
+ my %sns = ();
+ while ( my $sn = <GREP> ) {
+ chomp($sn);
+ $sn =~ /SN:(\S+)\s+LN:(\d+)/;
+ $sns{$1} = $2;
+ }
+ return \%sns;
+}
+
+sub _build__temp_directory {
+ my ($self) = @_;
+ my $tmp_dir = File::Temp->newdir( 'tmp_run_tradis_XXXXX',
+ CLEANUP => 0,
+ DIR => $self->output_directory );
+ return $tmp_dir->dirname;
+}
+
+sub _build_output_directory {
+ return cwd();
+}
+
+sub _build__current_directory {
+ my ($self) = @_;
+ my $fq = $self->fastqfile;
+
+ my @dirs = split( '/', $fq );
+ pop(@dirs);
+ return join( '/', @dirs );
+}
+
+sub run_tradis {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+ my $fq = $self->fastqfile;
+
+ my $ref = $self->reference;
+ Bio::Tradis::Exception::RefNotFound->throw( error => "$ref not found\n" ) unless( -e $ref );
+
+ print STDERR "::::::::::::::::::\n$fq\n::::::::::::::::::\n\n" if($self->verbose);
+
+ # Step 1: Filter tags that match user input tag
+ print STDERR "..........Step 1: Filter tags that match user input tag\n" if($self->verbose);
+ $self->_filter;
+
+ print STDERR "..........Step 1.1: Check that at least one read started with the tag\n" if($self->verbose);
+ $self->_check_filter;
+
+ # Step 2: Remove the tag from the sequence and quality strings
+ print STDERR
+"..........Step 2: Remove the tag from the sequence and quality strings\n" if($self->verbose);
+ $self->_remove;
+
+ # Step 3: Map file to reference
+ print STDERR "..........Step 3: Map file to reference\n" if($self->verbose);
+ $self->_map;
+
+ # Step 4: Convert output from SAM to BAM, sort and index
+ print STDERR
+ "..........Step 3.5: Convert output from SAM to BAM and sort\n" if($self->verbose);
+ $self->_sam2bam;
+ $self->_sort_bam;
+ $self->_bamcheck;
+
+ # Step 5: Generate plot
+ print STDERR "..........Step 4: Generate plot\n" if($self->verbose);
+ $self->_make_plot;
+
+ # Step 6: Generate statistics
+ print STDERR "..........Step 5: Generate statistics\n" if($self->verbose);
+ $self->_stats;
+
+ # Step 7: Move files to current directory
+ print STDERR "..........Step 6: Move files to current directory\n" if($self->verbose);
+ my $outfile = $self->outfile;
+ my $output_directory = $self->output_directory;
+ system("mv $temporary_directory/$outfile* $output_directory");
+ system("mv $temporary_directory/mapped.sort.bam $output_directory/$outfile.mapped.bam");
+ system("mv $temporary_directory/mapped.sort.bam.bai $output_directory/$outfile.mapped.bam.bai");
+ system("mv $temporary_directory/mapped.bamcheck $output_directory/$outfile.mapped.bamcheck");
+
+ # Clean up
+ print STDERR "..........Clean up\n" if($self->verbose);
+
+ rmtree($temporary_directory);
+
+ return 1;
+}
+
+sub _filter {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+ my $fqfile = $self->_unzipped_fastq;
+ my $tag = $self->tag;
+ my $mm = $self->mismatch;
+
+ my $filter = Bio::Tradis::FilterTags->new(
+ fastqfile => $fqfile,
+ tag => $tag,
+ mismatch => $mm,
+ outfile => "$temporary_directory/filter.fastq"
+ )->filter_tags;
+}
+
+sub _check_filter {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+ my $filtered_file_filename = "$temporary_directory/filter.fastq";
+ open my $filtered_file, '<', $filtered_file_filename or
+ Bio::Tradis::Exception::TagFilterError->throw( error => "There was a problem filtering reads by the specified tag. Please check all input files are Fastq formatted and that at least one read in each starts with the specified tag\n" );
+ my @first_read_data;
+ while( my $line = <$filtered_file> ) {
+ last if $. > 4;
+ chomp($line);
+ push @first_read_data, $line;
+ }
+ my $number_of_read_lines = scalar @first_read_data;
+ if ( $number_of_read_lines ne 4) {
+ # There wasn't enough data for a complete read
+ Bio::Tradis::Exception::TagFilterError->throw( error => "There was a problem filtering reads by the specified tag. Please check all input files are Fastq formatted and that at least one read in each starts with the specified tag\n" );
+ }
+ my $read_plus_sign = $first_read_data[2];
+ if ( $read_plus_sign ne '+' ) {
+ # The first 'read' didn't have a '+' on the third line, suspicious
+ Bio::Tradis::Exception::TagFilterError->throw( error => "There was a problem filtering reads by the specified tag. Please check all input files are Fastq formatted and that at least one read in each starts with the specified tag\n" );
+ }
+ # I'm not proposing further (more detailed) validation here
+ close $filtered_file;
+}
+
+sub _remove {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+ my $tag = $self->tag;
+ my $mm = $self->mismatch;
+
+ my $rm_tags = Bio::Tradis::RemoveTags->new(
+ fastqfile => "$temporary_directory/filter.fastq",
+ tag => $tag,
+ mismatch => $mm,
+ outfile => "$temporary_directory/tags_removed.fastq"
+ )->remove_tags;
+}
+
+sub _map {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+
+ my $ref = $self->reference;
+
+ my $mapping = Bio::Tradis::Map->new(
+ fastqfile => "$temporary_directory/tags_removed.fastq",
+ reference => "$ref",
+ refname => "$temporary_directory/ref.index",
+ outfile => "$temporary_directory/mapped.sam",
+ smalt_k => $self->smalt_k,
+ smalt_s => $self->smalt_s,
+ smalt_y => $self->smalt_y,
+ smalt_r => $self->smalt_r,
+ smalt_n => $self->smalt_n
+ );
+ $mapping->index_ref;
+ $mapping->do_mapping;
+}
+
+sub _sam2bam {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+
+ system(
+$self->samtools_exec." view -b -o $temporary_directory/mapped.bam -S $temporary_directory/mapped.sam"
+ );
+ return 1;
+}
+
+sub _sort_bam {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+
+ my $samtools_obj = Bio::Tradis::Samtools->new(exec => $self->samtools_exec, threads => $self->smalt_n);
+ $samtools_obj->run_sort("$temporary_directory/mapped.bam","$temporary_directory/mapped.sort.bam");
+ $samtools_obj->run_index("$temporary_directory/mapped.sort.bam");
+ return 1;
+}
+
+sub _bamcheck {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+
+ system(
+$self->samtools_exec." stats $temporary_directory/mapped.sort.bam > $temporary_directory/mapped.bamcheck"
+ );
+ return 1;
+}
+
+sub _make_plot {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+ my $ref = $self->reference;
+ my $outfile = $self->outfile;
+ my $tr_d = $self->tagdirection;
+
+ my $plot = Bio::Tradis::TradisPlot->new(
+ mappedfile => "$temporary_directory/mapped.sort.bam",
+ mapping_score => $self->mapping_score,
+ outfile => "$temporary_directory/$outfile"
+ )->plot;
+
+ # if tag direction is 5, reverse plot columns
+ if ( $self->tagdirection eq '5' ) {
+ print STDERR "Tag direction = 5. Reversing plot..\n" if($self->verbose);
+ $self->_reverse_plots;
+ }
+ return 1;
+}
+
+sub _reverse_plots {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+ my $outfile = $self->outfile;
+ my @seqnames = keys %{ $self->_sequence_info };
+
+ my @current_plots =
+ glob("$temporary_directory/$outfile.*.insert_site_plot.gz");
+
+ foreach my $plotname (@current_plots) {
+ print STDERR "Reversing $plotname\n" if($self->verbose);
+
+ #my $plotname = $self->_plotname($sn);
+ system("gunzip -c $plotname > $temporary_directory/tmp.plot");
+ system(
+"awk '{ t = \$1; \$1 = \$2; \$2 = t; print; }' $temporary_directory/tmp.plot > rv_plot"
+ );
+ system("gzip -c rv_plot > $plotname");
+ }
+ unlink("$temporary_directory/tmp.plot");
+ unlink("rv_plot");
+}
+
+sub _stats {
+ my ($self) = @_;
+ my $outfile = $self->outfile;
+ my $temporary_directory = $self->_temp_directory;
+ my $fq = $self->_unzipped_fastq;
+ my $seq_info = $self->_sequence_info;
+
+ #write header to stats file
+ $self->_write_stats_header;
+
+ # Add file name and number of reads in it
+ my @fql = split( "/", $fq );
+ my $stats = "$fql[-1],";
+ my $total_reads = `wc $fq | awk '{print \$1/4}'`;
+ chomp($total_reads);
+ $stats .= "$total_reads,";
+
+ # Matching reads
+ my $matching =
+ `wc $temporary_directory/filter.fastq | awk '{print \$1/4}'`;
+ chomp($matching);
+ $stats .= "$matching,";
+ $stats .= ( $matching / $total_reads ) * 100 . ",";
+
+ # Mapped reads
+ my $mapped = $self->_number_of_mapped_reads;
+ $stats .= "$mapped,";
+ $stats .= ( $mapped / $matching ) * 100 . ",";
+
+ # Unique insertion sites
+ my ( $total_uis, $total_seq_len );
+ foreach my $si ( keys %{$seq_info} ) {
+ my $plotname = $self->_plotname($si);
+ system(
+"gunzip -c $temporary_directory/$plotname > $temporary_directory/tmp.plot"
+ );
+ my $uis = `grep -c -v "0 0" $temporary_directory/tmp.plot`;
+ chomp($uis);
+ $total_uis += $uis;
+ $stats .= "$uis,";
+ my $seqlen = ${$seq_info}{$si};
+ $total_seq_len += $seqlen;
+ my $uis_per_seqlen = "NaN";
+ $uis_per_seqlen = $seqlen / $uis if ( $uis > 0 );
+ chomp($uis_per_seqlen);
+ $stats .= "$uis_per_seqlen,";
+ }
+ $stats .= "$total_uis,";
+ my $t_uis_p_l = "NaN";
+ $t_uis_p_l = $total_seq_len / $total_uis if ( $total_uis > 0 );
+ $stats .= "$t_uis_p_l\n";
+ print { $self->_stats_handle } $stats;
+}
+
+sub _write_stats_header {
+ my ($self) = @_;
+ my @seqnames = keys %{ $self->_sequence_info };
+ my @fields = (
+ "File",
+ "Total Reads",
+ "Reads Matched",
+ "\% Matched",
+ "Reads Mapped",
+ "\% Mapped"
+ );
+ print { $self->_stats_handle } join( ",", @fields ) . ",";
+ foreach my $sn (@seqnames) {
+ print { $self->_stats_handle } "Unique Insertion Sites : $sn,";
+ print { $self->_stats_handle } "Seq Len/UIS : $sn,";
+ }
+ print { $self->_stats_handle } "Total Unique Insertion Sites,";
+ print { $self->_stats_handle } "Total Seq Len/Total UIS\n";
+}
+
+sub _plotname {
+ my ( $self, $seq_name ) = @_;
+ my $outfile = $self->outfile;
+
+ $seq_name =~ s/[^\w\d\.]/_/g;
+ my $plotfile_name = "$outfile.$seq_name.insert_site_plot.gz";
+ return $plotfile_name;
+}
+
+sub _number_of_mapped_reads {
+ my ($self) = @_;
+ my $temporary_directory = $self->_temp_directory;
+
+ my $pars =
+ Bio::Tradis::Parser::Bam->new(
+ file => "$temporary_directory/mapped.bam" );
+ my $c = 0;
+ while ( $pars->next_read ) {
+ if ( $pars->is_mapped ) {
+ $c++;
+ }
+ }
+ return $c;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/lib/Bio/Tradis/Samtools.pm b/lib/Bio/Tradis/Samtools.pm
new file mode 100644
index 0000000..c15d626
--- /dev/null
+++ b/lib/Bio/Tradis/Samtools.pm
@@ -0,0 +1,102 @@
+package Bio::Tradis::Samtools;
+
+# ABSTRACT: Change samtools syntax depending on version found
+
+=head1 SYNOPSIS
+
+Change samtools syntax depending on version found
+ use Bio::Tradis::Samtools;
+
+ my $obj = Bio::Tradis::Samtools->new(
+ exec => 'samtools'
+ );
+
+ $obj->run_sort();
+
+=cut
+
+use Moose;
+use File::Spec;
+
+has 'exec' => ( is => 'ro', isa => 'Str', default => 'samtools' );
+has 'threads' => ( is => 'ro', isa => 'Int', default => 1 );
+has 'exec_version' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build_exec_version' );
+
+sub _build_exec_version {
+ my ($self) = @_;
+
+ my $fp = $self->find_exe($self->exec);
+ if(!$fp)
+ {
+ exit("ERROR: Can't find required ".$self->exec." in your \$PATH");
+ }
+ my $cmd_version = $self->exec." 2>&1 | grep Version";
+ my ($version_string) = qx($cmd_version);
+
+ if(defined($version_string))
+ {
+ #Version: 0.1.19-44428cd
+ #Version: 1.2 (using htslib 1.2)
+ # we dont use 3rd number in version so just look for 0.1, 1.2
+ if($version_string =~ /Version:[\t\s]+(\d+)\.(\d+)/)
+ {
+ return $1.'.'.$2;
+ }
+ else
+ {
+ print STDERR "ERROR: Couldn't identify samtools version";
+ }
+ }
+ else
+ {
+ print STDERR "ERROR: Couldn't identify samtools version";
+ }
+ # reasonable fallback
+ return '0.1';
+}
+
+sub find_exe {
+ my ( $self, $bin ) = @_;
+ for my $dir ( File::Spec->path ) {
+ my $exe = File::Spec->catfile( $dir, $bin );
+ return $exe if -x $exe;
+ }
+ return;
+}
+
+sub _is_version_less_than_1 {
+ my ($self) = @_;
+ if($self->exec_version < 1.0)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+sub run_sort {
+ my ( $self, $input_file, $output_file ) = @_;
+
+ my $cmd;
+ if ( $self->_is_version_less_than_1 ) {
+ $output_file =~ s/\.bam//i;
+ $cmd = join( ' ', ( $self->exec, 'sort', $input_file, $output_file) );
+ }
+ else {
+ $cmd = join( ' ', ( $self->exec, 'sort', '-@', $self->threads, '-O', 'bam', '-T', $input_file.'.tmp', '-o', $output_file, $input_file ) );
+ }
+ system($cmd);
+}
+
+sub run_index {
+ my ( $self, $input_file ) = @_;
+ system( $self->exec . " index $input_file" );
+}
+
+no Moose;
+__PACKAGE__->meta->make_immutable;
+
+1;
+
diff --git a/lib/Bio/Tradis/TradisPlot.pm b/lib/Bio/Tradis/TradisPlot.pm
new file mode 100644
index 0000000..a95ec0a
--- /dev/null
+++ b/lib/Bio/Tradis/TradisPlot.pm
@@ -0,0 +1,60 @@
+package Bio::Tradis::TradisPlot;
+
+# ABSTRACT: Generate plots as part of a tradis analysis
+
+=head1 SYNOPSIS
+
+Generate insertion plots for Artemis from a mapped fastq file and a reference
+in GFF format
+
+ use Bio::Tradis::TradisPlot;
+
+ my $pipeline = Bio::Tradis::TradisPlot->new(mappedfile => 'abc');
+ $pipeline->plot();
+
+=head1 PARAMETERS
+
+=head2 Required
+
+C<mappedfile> - mapped and sorted BAM file
+
+=head2 Optional
+
+=over
+
+=item * C<outfile> - base name to assign to the resulting insertion site plot. Default = tradis.plot
+
+=item * C<mapping_score> - cutoff value for mapping score. Default = 30
+
+=back
+
+=head1 METHODS
+
+C<plot> - create insertion site plots for reads in `mappedfile`. This file will be readable by the L<Artemis genome browser|http://www.sanger.ac.uk/resources/software/artemis/>
+
+=cut
+
+use Moose;
+use Bio::Tradis::Analysis::InsertSite;
+
+has 'mappedfile' => ( is => 'rw', isa => 'Str', required => 1 );
+has 'outfile' =>
+ ( is => 'rw', isa => 'Str', required => 1, default => 'tradis.plot' );
+has 'mapping_score' =>
+ ( is => 'rw', isa => 'Int', required => 1, default => 30 );
+
+sub plot {
+ my ($self) = @_;
+
+ Bio::Tradis::Analysis::InsertSite->new(
+ filename => $self->mappedfile,
+ output_base_filename => $self->outfile,
+ mapping_score => $self->mapping_score
+ )->create_plots;
+
+ return 1;
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
diff --git a/recipes/Tradis_SR_RR_12dark_42r1_rehyb12_index8.xml b/recipes/Tradis_SR_RR_12dark_42r1_rehyb12_index8.xml
new file mode 100644
index 0000000..bd4b9b4
--- /dev/null
+++ b/recipes/Tradis_SR_RR_12dark_42r1_rehyb12_index8.xml
@@ -0,0 +1,461 @@
+<?xml version="1.0"?>
+<RecipeFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <Protocol>
+ <ChemistryRef Description="Cluster Generation SR" ChemistryName="ClusterGenerationSR" />
+ <ChemistryRef Description="Skip Base 1" ChemistryName="FirstBase"/>
+ <ChemistryRef Description="Skip Base 2" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="Skip Base 3" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="Skip Base 4" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="Skip Base 5" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="Skip Base 6" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="Skip Base 7" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="Skip Base 8" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="Skip Base 9" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="Skip Base 10" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="Skip Base 11" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="Skip Base 12" ChemistryName="CompleteCycle_Low"/>
+ <ChemistryRef Description="End Deblock" ChemistryName="EndDeblock" />
+ <ReadRef Description="Read #1" ReadName="Read1" />
+ <ChemistryRef Description="Rehyb Read1 Primer" ChemistryName="RehybRead1Primer"/>
+ <ReadRef Description="Read initial 12" ReadName="ReadInitial" />
+ <ChemistryRef Description="Index Preparation i7" ChemistryName="IndexPreparation-i7" />
+ <ReadRef Description="IndexRead i7" ReadName="IndexRead-i7" />
+ <ChemistryRef Description="End Deblock" ChemistryName="EndDeblock" />
+ <ChemistryRef Description="Post Run Step" ChemistryName="PostRunForOnBoardClustering" />
+ </Protocol>
+ <ChemistryDefinitions>
+ <ChemistryDefinition Name="CompleteCycle">
+ <ChemistryStep Description="Deblock" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="60" Duration="0" />
+ <PumpToFlowcell Solution="0" ReagentName="CRM" AspirationRate="1000" DispenseRate="2500" Volume="110" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="10000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1000" DispenseRate="2500" Volume="24" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="5000" ToPosition="0" />
+ </ChemistryStep>
+ <ChemistryStep Description="Buffer Wash" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="250" Duration="0" ToPosition="0" />
+ </ChemistryStep>
+ <ChemistryStep Description="Incorporation" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="IMM" AspirationRate="1000" DispenseRate="2500" Volume="110" Duration="0" ToPosition="0" />
+ <Temp Temperature="65" Duration="0" />
+ <Wait Duration="25000" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1000" DispenseRate="2500" Volume="24" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="15000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="15000" />
+ <PumpToFlowcell Solution="0" ReagentName="SRM" AspirationRate="750" DispenseRate="2500" Volume="75" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="10000" ToPosition="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="FirstBase">
+ <ChemistryStep Description="Incorporation" Repeat="1">
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="1" ToPosition="0" />
+ <Temp Temperature="60" Duration="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="IMM" AspirationRate="1000" DispenseRate="2500" Volume="110" Duration="0" ToPosition="0" />
+ <Temp Temperature="65" Duration="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="20000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1000" DispenseRate="2500" Volume="24" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="15000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="15000" />
+ <PumpToFlowcell Solution="0" ReagentName="SRM" AspirationRate="750" DispenseRate="2500" Volume="75" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="10000" ToPosition="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="EndDeblock">
+ <ChemistryStep Description="Deblock" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="60" Duration="0" />
+ <PumpToFlowcell Solution="0" ReagentName="CRM" AspirationRate="1000" DispenseRate="2500" Volume="110" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="40000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1000" DispenseRate="2500" Volume="24" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="35000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="CompleteCycle_Low">
+ <ChemistryStep Description="Deblock" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="60" Duration="0" />
+ <PumpToFlowcell Solution="0" ReagentName="CRM" AspirationRate="1000" DispenseRate="2500" Volume="110" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="10000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1000" DispenseRate="2500" Volume="24" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="5000" ToPosition="0" />
+ </ChemistryStep>
+ <ChemistryStep Description="Buffer Wash" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="250" Duration="0" ToPosition="0" />
+ </ChemistryStep>
+ <ChemistryStep Description="Incorporation" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="IMM" AspirationRate="1000" DispenseRate="2500" Volume="110" Duration="0" ToPosition="0" />
+ <Temp Temperature="65" Duration="0" />
+ <Wait Duration="25000" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1000" DispenseRate="2500" Volume="24" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="15000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="15000" />
+ <PumpToFlowcell Solution="0" ReagentName="SRM" AspirationRate="1500" DispenseRate="2500" Volume="75" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="10000" ToPosition="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="FirstBase_Low">
+ <ChemistryStep Description="Incorporation" Repeat="1">
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="1" ToPosition="0" />
+ <Temp Temperature="60" Duration="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="IMM" AspirationRate="1000" DispenseRate="2500" Volume="110" Duration="0" ToPosition="0" />
+ <Temp Temperature="65" Duration="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="20000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1000" DispenseRate="2500" Volume="24" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="15000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="15000" />
+ <PumpToFlowcell Solution="0" ReagentName="SRM" AspirationRate="1500" DispenseRate="2500" Volume="75" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="10000" ToPosition="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="EndDeblock_Low">
+ <ChemistryStep Description="Deblock" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="60" Duration="0" />
+ <PumpToFlowcell Solution="0" ReagentName="CRM" AspirationRate="1000" DispenseRate="2500" Volume="110" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="40000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1000" DispenseRate="2500" Volume="24" Duration="0" ToPosition="0" />
+ <Wait Duration="5000" />
+ <DispenseAndWait Solution="0" AspirationRate="0" DispenseRate="0" Volume="0" Duration="35000" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="ResumeChemistry">
+ <ChemistryStep Description="Prepare for scanning" Repeat="1">
+ <Temp Temperature="20" Duration="0" />
+ <PumpToFlowcell Solution="0" ReagentName="SRM" AspirationRate="750" DispenseRate="2500" Volume="75" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="PauseChemistry">
+ <ChemistryStep Description="Pause flowcell" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="100" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="PostRun">
+ <ChemistryStep Description="Post-Run Flush" Repeat="1">
+ <Temp Temperature="20" Duration="0" />
+ <PumpToFlowcell Solution="2" ReagentName="PW1" AspirationRate="1500" DispenseRate="2500" Volume="2250" Duration="0" ToPosition="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="PostRunForOnBoardClustering">
+ <ChemistryStep Description="Post-Run Flush" Repeat="1">
+ <Temp Temperature="20" Duration="0" />
+ <PumpToFlowcell Solution="2" ReagentName="PW1" AspirationRate="1000" DispenseRate="2500" Volume="2250" Duration="0" ToPosition="0" />
+ <PumpToValvePosition Solution="2" ReagentName="PW1" AspirationRate="1000" DispenseRate="250" Volume="250" Duration="0" ToPosition="20" />
+ <PumpToFlowcell Solution="0" ReagentName="TMP" AspirationRate="1000" DispenseRate="2500" Volume="250" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="2" ReagentName="PW1" AspirationRate="1000" DispenseRate="2500" Volume="1000" Duration="0" ToPosition="0" />
+ <PumpToValvePosition Solution="2" ReagentName="PW1" AspirationRate="1000" DispenseRate="250" Volume="250" Duration="0" ToPosition="20" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="IndexPreparation-i7">
+ <ChemistryStep Description="IndexPreparation-i7" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="FDR" AspirationRate="240" DispenseRate="2500" Volume="100" Duration="0" ToPosition="0" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="HP12" AspirationRate="1500" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="HP12" AspirationRate="60" DispenseRate="2500" Volume="75" Duration="0" ToPosition="0" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell Solution="0" ReagentName="HP12" AspirationRate="60" DispenseRate="2500" Volume="25" Duration="0" ToPosition="0" />
+ <Wait Duration="300000" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="IndexPreparation-i5-SR">
+ <ChemistryStep Description="IndexPreparation-i5-SR" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="FDR" AspirationRate="240" DispenseRate="2500" Volume="100" Duration="0" ToPosition="0" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="HP9" AspirationRate="1500" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="HP9" AspirationRate="60" DispenseRate="2500" Volume="75" Duration="0" ToPosition="0" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell Solution="0" ReagentName="HP9" AspirationRate="60" DispenseRate="2500" Volume="25" Duration="0" ToPosition="0" />
+ <Wait Duration="300000" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="ClusterGenerationSR">
+ <ChemistryStep Description="Prime" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="FDR" AspirationRate="1000" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <Temp Temperature="40" Duration="30000" />
+ <PumpToFlowcell Solution="0" ReagentName="FPM" AspirationRate="1000" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="AMS" AspirationRate="1000" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="5" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="6" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="TMP" AspirationRate="1000" DispenseRate="2500" Volume="100" Duration="0" ToPosition="0" />
+ </ChemistryStep>
+ <ChemistryStep Description="TemplateHyb" Repeat="15">
+ <PumpToFlowcell Solution="0" ReagentName="TMP" AspirationRate="250" DispenseRate="2500" Volume="5" Duration="0" ToPosition="0" />
+ <Wait Duration="3000" />
+ </ChemistryStep>
+ <ChemistryStep Description="TemplateTemp" Repeat="1">
+ <Temp Temperature="85" Duration="60000" />
+ <Wait Duration="30000" />
+ <Temp Temperature="40" Duration="60000" />
+ </ChemistryStep>
+ <ChemistryStep Description="TemplateWash" Repeat="15">
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="250" DispenseRate="2500" Volume="5" Duration="0" ToPosition="0" />
+ <Wait Duration="18000" />
+ </ChemistryStep>
+ <ChemistryStep Description="FE" Repeat="15">
+ <PumpToFlowcell Solution="0" ReagentName="AMS" AspirationRate="250" DispenseRate="2500" Volume="5" Duration="0" ToPosition="0" />
+ <Wait Duration="3000" />
+ </ChemistryStep>
+ <ChemistryStep Description="FEWait" Repeat="1">
+ <Wait Duration="90000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Amp-TempRamp" Repeat="1">
+ <Temp Temperature="55" Duration="0" />
+ </ChemistryStep>
+ <ChemistryStep Description="Amplification1" Repeat="28">
+ <PumpToFlowcell Solution="0" ReagentName="FDR" AspirationRate="120" DispenseRate="2500" Volume="28" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="FPM" AspirationRate="120" DispenseRate="2500" Volume="28" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="AMS" AspirationRate="120" DispenseRate="2500" Volume="72" Duration="0" ToPosition="0" />
+ </ChemistryStep>
+ <ChemistryStep Description="Postamplificationwash" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="0" />
+ </ChemistryStep>
+ <ChemistryStep Description="LinearizationSR" Repeat="1">
+ <Temp Temperature="20" Duration="0" />
+ <PumpToFlowcell Solution="0" ReagentName="FLS" AspirationRate="1500" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="FLS" AspirationRate="15" DispenseRate="2500" Volume="125" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ </ChemistryStep>
+ <ChemistryStep Description="SBS Prime" Repeat="1">
+ <Temp Temperature="20" Duration="0" />
+ <PumpToFlowcell Solution="0" ReagentName="IMM" AspirationRate="1500" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="SRM" AspirationRate="1500" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="CRM" AspirationRate="1500" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ </ChemistryStep>
+ <ChemistryStep Description="Denaturation-Hybridization" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="FDR" AspirationRate="240" DispenseRate="2500" Volume="100" Duration="0" ToPosition="0" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="HP10" AspirationRate="1500" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="HP10" AspirationRate="60" DispenseRate="2500" Volume="75" Duration="0" ToPosition="0" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell Solution="0" ReagentName="HP10" AspirationRate="60" DispenseRate="2500" Volume="25" Duration="0" ToPosition="0" />
+ <Wait Duration="300000" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="RehybRead1Primer">
+ <ChemistryStep Description="Denaturation-Hybridization" Repeat="1">
+ <PumpToFlowcell Solution="0" ReagentName="FDR" AspirationRate="240" DispenseRate="2500" Volume="100" Duration="0" ToPosition="0" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="HP10" AspirationRate="1500" DispenseRate="2500" Volume="500" Duration="0" ToPosition="0" />
+ <PumpToFlowcell Solution="0" ReagentName="HP10" AspirationRate="60" DispenseRate="2500" Volume="75" Duration="0" ToPosition="0" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell Solution="0" ReagentName="HP10" AspirationRate="60" DispenseRate="2500" Volume="25" Duration="0" ToPosition="0" />
+ <Wait Duration="300000" />
+ <PumpToFlowcell Solution="0" ReagentName="USB" AspirationRate="1500" DispenseRate="2500" Volume="120" Duration="0" ToPosition="0" />
+ <Temp Temperature="20" Duration="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+
+ </ChemistryDefinitions>
+ <PumpDefinitions>
+ <PumpDefinition Name="Default">
+ <BeforeImagingEachLane Enabled="false">
+ <Lane Solution="3" AspirationRate="120" DispenseRate="2500" Volume="12" Duration="0" ToPosition="0" Num="1" Surface="Bottom" />
+ <Lane Solution="3" AspirationRate="120" DispenseRate="2500" Volume="12" Duration="0" ToPosition="0" Num="5" />
+ </BeforeImagingEachLane>
+ </PumpDefinition>
+ </PumpDefinitions>
+ <ReadDefinitions>
+ <ReadDefinition Name="Read1" IsIndex="false" ForTemplateOnly="false">
+ <Imaging ChemistryName="FirstBase" VariabilityName="Read1" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" VariabilityName="Read1" Cycles="41" />
+ <Chemistry ChemistryName="End" />
+ </ReadDefinition>
+
+ <ReadDefinition Name="ReadInitial" IsIndex="true" ForTemplateOnly="false">
+ <Imaging ChemistryName="FirstBase" VariabilityName="Read1" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" VariabilityName="Read1" Cycles="11" />
+ <Chemistry ChemistryName="End" />
+ </ReadDefinition>
+
+ <ReadDefinition Name="IndexRead-i7" IsIndex="true" ForTemplateOnly="false">
+ <Imaging ChemistryName="FirstBase" VariabilityName="IndexRead" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" VariabilityName="IndexRead" Cycles="7" />
+ <Chemistry ChemistryName="End" />
+ </ReadDefinition>
+ <ReadDefinition Name="IndexRead-i5" IsIndex="true" ForTemplateOnly="false">
+ <Imaging ChemistryName="FirstBase" VariabilityName="IndexRead" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" VariabilityName="IndexRead" Cycles="7" />
+ <Chemistry ChemistryName="End" />
+ </ReadDefinition>
+ </ReadDefinitions>
+ <PrimeDefinitions />
+ <ReagentDefinitions>
+ <ReagentDefinition Name="SbsReagents" IsPairedEnd="false">
+ <Reagent Name="IMM" Description="Incorporation Mix Reagent" ViciPosition="1">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="PW1" Description="25mL bottle with laboratory grade water" ViciPosition="2">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="SRM" Description="Scanning Mix Reagent" ViciPosition="3">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="PW1" Description="10mL bottle with laboratory grade water" ViciPosition="4">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="USB" Description="Incorporation Buffer" ViciPosition="5">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="USB" Description="Incorporation Buffer" ViciPosition="6">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="CRM" Description="Cleavage Buffer" ViciPosition="7">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="PW1" Description="10mL bottle with laboratory grade water" ViciPosition="8">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="PW1" Description="10mL bottle with laboratory grade water" ViciPosition="10">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="PW1" Description="10mL bottle with laboratory grade water" ViciPosition="11">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="PW1" Description="10mL bottle with laboratory grade water" ViciPosition="12">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="AMS" Description="Amplification Mix" ViciPosition="13">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="FPM" Description="PreMix" ViciPosition="14">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="FDR" Description="Formamide" ViciPosition="15">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="HP9" Description="Sequencing Primer Mix 2" ViciPosition="16">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="HP12" Description="Index Primer" ViciPosition="17">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="HP10" Description="Sequencing Primer Mix 1" ViciPosition="18">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="FLS" Description="Linearization Mix 1" ViciPosition="19">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="TMP" Description="Template" ViciPosition="20">
+ <Sample>true</Sample>
+ </Reagent>
+ </ReagentDefinition>
+ <ReagentDefinition Name="SbsReagents" IsPairedEnd="true">
+ <Reagent Name="IMM" Description="Incorporation Mix Reagent" ViciPosition="1">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="PW1" Description="25mL bottle with laboratory grade water" ViciPosition="2">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="SRM" Description="Scanning Mix Reagent" ViciPosition="3">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="PW1" Description="10mL bottle with laboratory grade water" ViciPosition="4">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="USB" Description="Incorporation Buffer" ViciPosition="5">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="USB" Description="Incorporation Buffer" ViciPosition="6">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="CRM" Description="Cleavage Buffer" ViciPosition="7">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="PW1" Description="10mL bottle with laboratory grade water" ViciPosition="8">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="FRM" Description="Resynthesis Mix" ViciPosition="10">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="FLM2" Description="Linearization Mix 2" ViciPosition="11">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="FLM1" Description="Linearization Mix 1" ViciPosition="12">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="AMS" Description="Amplification Mix" ViciPosition="13">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="FPM" Description="PreMix" ViciPosition="14">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="FDR" Description="Formamide" ViciPosition="15">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="HP11" Description="Sequencing Primer Mix 2" ViciPosition="16">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="HP12" Description="Index Primer" ViciPosition="17">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="HP10" Description="Sequencing Primer Mix 1" ViciPosition="18">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="PW1" Description="10mL bottle with laboratory grade water" ViciPosition="19">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="TMP" Description="Template" ViciPosition="20">
+ <Sample>false</Sample>
+ </Reagent>
+ </ReagentDefinition>
+ <ReagentDefinition Name="IndexingReagents-SR" IsPairedEnd="false">
+ <Reagent Name="USB" Description="Incorporation Buffer" ViciPosition="5">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="USB" Description="Incorporation Buffer" ViciPosition="6">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="FDR" Description="Formamide" ViciPosition="15">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="HP12" Description="Indexing Sequencing Primer i7" ViciPosition="17">
+ <Sample>false</Sample>
+ </Reagent>
+ <Reagent Name="HP9" Description="Indexing Sequencing Primer i5" ViciPosition="16">
+ <Sample>false</Sample>
+ </Reagent>
+ </ReagentDefinition>
+ </ReagentDefinitions>
+ <CycleWaitDefinitions />
+</RecipeFile>
\ No newline at end of file
diff --git a/recipes/Tradis_adapter_primers.xlsx b/recipes/Tradis_adapter_primers.xlsx
new file mode 100644
index 0000000..9f3f10f
Binary files /dev/null and b/recipes/Tradis_adapter_primers.xlsx differ
diff --git a/recipes/Transposon10/Chemistry/Chemistry.xml b/recipes/Transposon10/Chemistry/Chemistry.xml
new file mode 100755
index 0000000..96dfceb
--- /dev/null
+++ b/recipes/Transposon10/Chemistry/Chemistry.xml
@@ -0,0 +1,413 @@
+<?xml version="1.0"?>
+<ChemistryDefinitions Version="Calvados + AutoWashv4">
+
+ <ChemistryDefinition Name="CompleteCycle">
+ <ChemistryStep Description="Deblock" Repeat="1">
+ <Temp Duration="0" Temperature="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="CMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="22" />
+ <Wait Duration="10000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Buffer Wash" Repeat="1">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="Incorporation" Repeat="1" IsIncorporation="true">
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="45" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Temp Duration="0" Temperature="65" />
+ <Wait Duration="20000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <DispenseAndWait Duration="20000" />
+ <Temp Duration="0" Temperature="22" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <DispenseAndWait DispenseRate="7500" Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="FirstBase">
+ <ChemistryStep Description="Incorporation" Repeat="1" IsIncorporation="true">
+ <Temp Duration="0" Temperature="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="45" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Temp Duration="0" Temperature="65" />
+ <Wait Duration="20000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <DispenseAndWait Duration="20000" />
+ <Temp Duration="0" Temperature="22" />
+ <Wait Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <DispenseAndWait DispenseRate="7500" Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="EndRead">
+ <ChemistryStep Description="Safe State" Repeat="1">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="End">
+ <ChemistryStep Description="Safe State" Repeat="1">
+ <PumpToFlowcell ReagentName="PW1" AspirationRate="2000" DispenseRate="7500" Volume="750" />
+ <PumpToFlowcell ReagentName="PW2" AspirationRate="2000" DispenseRate="7500" Volume="750" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="EndDeblock">
+ <ChemistryStep Description="Deblock" Repeat="1">
+ <Temp Duration="0" Temperature="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="CMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Wait Duration="40000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <Wait Duration="35000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="250" />
+ <TempOff />
+ </ChemistryStep>
+ <ChemistryStep Description="Buffer Wash" Repeat="1">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="TemplateRinse">
+ <ChemistryStep Description="EmptyTemplate">
+ <PumpToFlowcell ReagentName="TMP" AspirationRate="2000" DispenseRate="7500" Volume="500" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="750" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPR2TemplateFirst InitialPrime">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="500" />
+ <Dispense DispenseRate="2500" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPR2TemplateFirst DispenseToTemplate" Repeat="9">
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="TMP" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPR2TemplateFirst EmptyTube">
+ <PumpToFlowcell ReagentName="TMP" AspirationRate="2000" DispenseRate="7500" Volume="2000" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPWTemplate InitialPrime">
+ <PumpToFlowcell ReagentName="PW1" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell ReagentName="PW2" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="2500" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPW1Template DispenseToTemplate" Repeat="4">
+ <Aspirate ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="TMP" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPW2Template DispenseToTemplate" Repeat="4">
+ <Aspirate ReagentName="PW2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="TMP" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPWTemplate EmptyTube">
+ <PumpToFlowcell ReagentName="TMP" AspirationRate="2000" DispenseRate="7500" Volume="2000" />
+ </ChemistryStep>
+ <ChemistryStep Description="PR2 InitialPrime">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="2500" Volume="2000" />
+ <Dispense DispenseRate="2500" />
+ </ChemistryStep>
+ <ChemistryStep Description="PR2 Reverse Flush">
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="IMS" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LMX2" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="SRE" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="RMF" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="CMS" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="HP10" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="AMS1" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="HP12" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="AMS2" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="HP11" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LPM" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="TMP" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LDR" DispenseRate="500" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="C1" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LMX1" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="C2" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="C3" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="PW3 InitialPrime">
+ <PumpToFlowcell ReagentName="PW3" AspirationRate="2000" DispenseRate="2500" Volume="500" />
+ <Dispense DispenseRate="2500" />
+ </ChemistryStep>
+ <ChemistryStep Description="PW3 Reverse Flush">
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="IMS" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="RMF" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="SRE" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="HP10" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="PR2" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="HP12" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="CMS" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="HP11" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="AMS1" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="TMP" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="AMS2" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="C1" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LPM" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="C2" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="LDR" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="C3" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="LMX1" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="PR2" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LMX2" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="SRE" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="CMS" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ </ChemistryStep>
+ <ChemistryStep Description="ValveMotions" Repeat="8">
+ <PumpToFlowcell ReagentName="HP12" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ <PumpToFlowcell ReagentName="HP12" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ <PumpToFlowcell ReagentName="AMS2" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ <PumpToFlowcell ReagentName="C1" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ <PumpToFlowcell ReagentName="AMS2" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="ResumeChemistry">
+ <ChemistryStep Description="Prepare for scanning" Repeat="1">
+ <Temp Duration="0" Temperature="22" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Wait Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="PauseChemistry">
+ <ChemistryStep Description="Pause flowcell" Repeat="1">
+ <Temp Duration="0" Temperature="22" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="OnBoardClusterGeneration">
+ <ChemistryStep Description="Flow Check" Repeat="1">
+ <PumpToFlowcell ReagentName="PW1" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="PW2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="750" />
+ </ChemistryStep>
+ <ChemistryStep Description="Prime PR2 Bypass" Repeat="3">
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="Initial Prime" Repeat="1">
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" Solution="0" DispenseRate="7500" Volume="300" />
+ <Temp Duration="30000" Temperature="40" />
+ <PumpToFlowcell ReagentName="AMS1" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="AMS2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="LPM" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="TMP" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <Temp Duration="30000" Temperature="75" />
+ </ChemistryStep>
+ <ChemistryStep Description="TMP RampDown" Repeat="1">
+ <Wait Duration="300000" />
+ <Temp Duration="150000" Temperature="40" />
+ </ChemistryStep>
+ <ChemistryStep Description="TMP Buffer Wash" Repeat="15">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="250" Solution="0" DispenseRate="7500" Volume="5" />
+ <Wait Duration="18000" />
+
+ </ChemistryStep>
+ <ChemistryStep Description="First Extension" Repeat="15">
+
+ <PumpToFlowcell ReagentName="AMS1" AspirationRate="250" Solution="0" DispenseRate="7500" Volume="5" />
+ <Wait Duration="3000" />
+
+ </ChemistryStep>
+
+
+ <ChemistryStep Description="FE Wait Amp-TempRamp" Repeat="1">
+ <Wait Duration="90000" />
+ <Temp Duration="0" Temperature="50" />
+ </ChemistryStep>
+ <ChemistryStep Description="Amplification 1" Repeat="26">
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="28" />
+ <PumpToFlowcell ReagentName="LPM" AspirationRate="250" DispenseRate="7500" Volume="28" />
+ <PumpToFlowcell ReagentName="AMS1" AspirationRate="250" DispenseRate="7500" Volume="72" />
+ <Wait Duration="15000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Amplification-Wash">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <Temp Temperature="20" />
+ </ChemistryStep>
+ <ChemistryStep Description="Linearisation">
+ <PumpToFlowcell ReagentName="LMX1" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="LMX1" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="46" />
+ <Wait Duration="300000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ </ChemistryStep>
+ <ChemistryStep Description="SBS Prime">
+ <Temp Temperature="20" />
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="CMS" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="PairedEndTurnaround">
+ <ChemistryStep Description="Pre-resynthesis_tempramp">
+ <Temp Temperature="50" />
+ </ChemistryStep>
+ <ChemistryStep Description="Resynthesis" Repeat="8" >
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="28" />
+ <PumpToFlowcell ReagentName="LPM" AspirationRate="250" DispenseRate="7500" Volume="28" />
+ <PumpToFlowcell ReagentName="AMS2" AspirationRate="250" DispenseRate="7500" Volume="72" />
+ <Wait Duration="15000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Post-resynthesis_wash">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <Temp Temperature="20" Duration="45000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Linearisation 2">
+ <PumpToFlowcell ReagentName="LMX2" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="LMX2" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="38" />
+ <Wait Duration="300000"/>
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="FirstReadPreparation">
+ <ChemistryStep Description="FirstReadPreparation">
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell ReagentName="C1" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="C1" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="SecondReadPreparation">
+ <ChemistryStep Description="SecondReadPreparation">
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell ReagentName="C3" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="C3" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Index1Preparation">
+ <ChemistryStep Description="Index1Preparation">
+ <Temp Temperature="20" Duration="25000" />
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell ReagentName="C1" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="C1" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Deprotection">
+ <ChemistryStep Description="Deprotection">
+ <Temp Temperature="20" />
+ <Wait Duration="120000" />
+ <PumpToFlowcell ReagentName="RMF" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="RMF" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="38" />
+ <Wait Duration="300000"/>
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ </ChemistryStep>
+ <ChemistryStep Description="Denaturation">
+ <Temp Temperature="20" Duration="25000" />
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+
+ <ChemistryDefinition Name="Index2Preparation">
+ <ChemistryStep Description="Index2Preparation">
+ <Temp Temperature="20" Duration="25000" />
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="2500" Volume="75" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell ReagentName="C2" AspirationRate="2000" DispenseRate="2500" Volume="300" />
+ <PumpToFlowcell ReagentName="C2" AspirationRate="250" DispenseRate="2500" Volume="75" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="2500" Volume="120" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+
+ <ChemistryDefinition Name="Index2FirstBaseDark">
+ <ChemistryStep Description="Incorporation" Repeat="1">
+ <Temp Temperature="60" Duration="0" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Temp Temperature="65" Duration="0" />
+ <Wait Duration="45000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <DispenseAndWait Duration="40000" />
+ <Temp Temperature="22" Duration="0" />
+ <Wait Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <DispenseAndWait Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Index2CompleteCycleDark2">
+ <ChemistryStep Description="Deblock" Repeat="1">
+ <Temp Temperature="60" Duration="0" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="CMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Wait Duration="35000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <DispenseAndWait DispenseRate="7500" Duration="30000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Buffer Wash" Repeat="1">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="Incorporation" Repeat="1">
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Temp Temperature="65" Duration="0" />
+ <Wait Duration="45000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <DispenseAndWait Duration="40000" />
+ <Temp Temperature="22" Duration="0" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <DispenseAndWait DispenseRate="7500" Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
\ No newline at end of file
diff --git a/recipes/Transposon10/Exposures/Sony.xml b/recipes/Transposon10/Exposures/Sony.xml
new file mode 100755
index 0000000..ed9e88d
--- /dev/null
+++ b/recipes/Transposon10/Exposures/Sony.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Exposures>
+ <Exposure Name="A" Start="1037" Ramp="0" />
+ <Exposure Name="T" Start="500" Ramp="0" />
+ <Exposure Name="C" Start="1037" Ramp="0" />
+ <Exposure Name="G" Start="500" Ramp="0" />
+</Exposures>
diff --git a/recipes/Transposon10/Exposures/SonyV2.xml b/recipes/Transposon10/Exposures/SonyV2.xml
new file mode 100755
index 0000000..b1f60d9
--- /dev/null
+++ b/recipes/Transposon10/Exposures/SonyV2.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Exposures>
+ <Exposure Name="A" Start="260" IsIndexed="false" Ramp="5.2" />
+ <Exposure Name="A" Start="1037" IsIndexed="true" Ramp="0" />
+ <Exposure Name="T" Start="125" IsIndexed="false" Ramp="2.5" />
+ <Exposure Name="T" Start="500" IsIndexed="true" Ramp="0" />
+ <Exposure Name="C" Start="260" IsIndexed="false" Ramp="5.2" />
+ <Exposure Name="C" Start="1037" IsIndexed="true" Ramp="0" />
+ <Exposure Name="G" Start="125" IsIndexed="false" Ramp="2.5" />
+ <Exposure Name="G" Start="500" IsIndexed="true" Ramp="0" />
+</Exposures>
diff --git a/recipes/Transposon10/Protocol/1Read1Index.xml b/recipes/Transposon10/Protocol/1Read1Index.xml
new file mode 100755
index 0000000..d10932c
--- /dev/null
+++ b/recipes/Transposon10/Protocol/1Read1Index.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<Protocol Version="Fraise 0.7.1 Amplicon v1.1">
+ <ChemistryRef ChemistryName="OnBoardClusterGeneration" />
+ <ChemistryRef ChemistryName="FirstReadPreparation" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ReadRef ReadName="FirstRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index1Preparation" />
+ <ReadRef ReadName="IndexRead1" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="TemplateRinse" />
+ <ChemistryRef ChemistryName="End" />
+
+</Protocol>
\ No newline at end of file
diff --git a/recipes/Transposon10/Protocol/1Read2Index.xml b/recipes/Transposon10/Protocol/1Read2Index.xml
new file mode 100755
index 0000000..28dac13
--- /dev/null
+++ b/recipes/Transposon10/Protocol/1Read2Index.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<Protocol Version="Fraise 0.7.1 Amplicon v1.1">
+ <ChemistryRef ChemistryName="OnBoardClusterGeneration" />
+ <ChemistryRef ChemistryName="FirstReadPreparation" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ReadRef ReadName="FirstRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index1Preparation" />
+ <ReadRef ReadName="IndexRead1" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index2Preparation" />
+ <ReadRef ReadName="IndexRead2" />
+ <ChemistryRef ChemistryName="TemplateRinse" />
+ <ChemistryRef ChemistryName="End" />
+ </Protocol>
\ No newline at end of file
diff --git a/recipes/Transposon10/Protocol/2Read1Index.xml b/recipes/Transposon10/Protocol/2Read1Index.xml
new file mode 100755
index 0000000..693c8e9
--- /dev/null
+++ b/recipes/Transposon10/Protocol/2Read1Index.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<Protocol Version="Fraise 0.7.1 Amplicon v1.1">
+ <ChemistryRef ChemistryName="OnBoardClusterGeneration" />
+ <ChemistryRef ChemistryName="FirstReadPreparation" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ReadRef ReadName="FirstRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index1Preparation" />
+ <ReadRef ReadName="IndexRead1" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Deprotection" />
+ <ChemistryRef ChemistryName="PairedEndTurnaround" />
+ <ChemistryRef ChemistryName="SecondReadPreparation" />
+ <ReadRef ReadName="SecondRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="TemplateRinse" />
+ <ChemistryRef ChemistryName="End" />
+ </Protocol>
\ No newline at end of file
diff --git a/recipes/Transposon10/Protocol/2Read2Index.xml b/recipes/Transposon10/Protocol/2Read2Index.xml
new file mode 100755
index 0000000..07e3c69
--- /dev/null
+++ b/recipes/Transposon10/Protocol/2Read2Index.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<Protocol Version="Fraise 0.7.1 Amplicon v1.1">
+ <ChemistryRef ChemistryName="OnBoardClusterGeneration" />
+ <ChemistryRef ChemistryName="FirstReadPreparation" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ReadRef ReadName="FirstRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index1Preparation" />
+ <ReadRef ReadName="IndexRead1" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index2Preparation" />
+ <ReadRef ReadName="IndexRead2" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Deprotection" />
+ <ChemistryRef ChemistryName="PairedEndTurnaround" />
+ <ChemistryRef ChemistryName="SecondReadPreparation" />
+ <ReadRef ReadName="SecondRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="TemplateRinse" />
+ <ChemistryRef ChemistryName="End" />
+ </Protocol>
\ No newline at end of file
diff --git a/recipes/Transposon10/Reads/Reads.xml b/recipes/Transposon10/Reads/Reads.xml
new file mode 100755
index 0000000..3ced231
--- /dev/null
+++ b/recipes/Transposon10/Reads/Reads.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<ReadDefinitions Version="Fraise 0.7.1 Amplicon v1.1">
+ <ReadDefinition Name="FirstRead">
+ <FirstBase ChemistryName="FirstBase" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" Cycles="NumCycles - 1" />
+ <End ChemistryName="EndRead" />
+ </ReadDefinition>
+ <ReadDefinition Name="IndexRead1" IsIndexed="True" >
+ <FirstBase ChemistryName="FirstBase" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" Cycles="NumCycles - 1" />
+ <End ChemistryName="EndRead" />
+ </ReadDefinition>
+ <ReadDefinition Name="SecondRead" IsIndexed="false">
+ <FirstBase ChemistryName="FirstBase" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" Cycles="NumCycles - 1" />
+ <End ChemistryName="EndRead" />
+ </ReadDefinition>
+ <ReadDefinition Name="IndexRead2" IsIndexed="true">
+ <FirstBase ChemistryName="FirstBase" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" Cycles="NumCycles - 1" />
+ <End ChemistryName="EndRead" />
+ </ReadDefinition>
+ </ReadDefinitions>
\ No newline at end of file
diff --git a/recipes/Transposon10/Reagents/MaintenanceWash.xml b/recipes/Transposon10/Reagents/MaintenanceWash.xml
new file mode 100755
index 0000000..f6d14da
--- /dev/null
+++ b/recipes/Transposon10/Reagents/MaintenanceWash.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Reagents Name="Bolt Avocado Reagents" Version="Selector Valve Positions v2.2">
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="1" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="2" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="3" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="4" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="5" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="6" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="7" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="8" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="9" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="10" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="11" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="12" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="13" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="14" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="15" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="16" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="17" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="18" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="19" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="20" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="21" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="22" />
+</Reagents>
diff --git a/recipes/Transposon10/Reagents/PostRunWash.xml b/recipes/Transposon10/Reagents/PostRunWash.xml
new file mode 100755
index 0000000..f6d14da
--- /dev/null
+++ b/recipes/Transposon10/Reagents/PostRunWash.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Reagents Name="Bolt Avocado Reagents" Version="Selector Valve Positions v2.2">
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="1" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="2" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="3" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="4" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="5" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="6" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="7" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="8" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="9" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="10" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="11" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="12" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="13" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="14" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="15" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="16" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="17" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="18" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="19" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="20" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="21" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="22" />
+</Reagents>
diff --git a/recipes/Transposon10/Reagents/Sequencing.xml b/recipes/Transposon10/Reagents/Sequencing.xml
new file mode 100755
index 0000000..87cac01
--- /dev/null
+++ b/recipes/Transposon10/Reagents/Sequencing.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Reagents Name="Shock Reagents" Version="Selector Valve Positions v2.2">
+ <Reagent Name="IMS" Description="Incorporation Mix" SelectorValvePosition="1" />
+ <Reagent Name="SRE" Description="Scan Mix" SelectorValvePosition="2" />
+ <Reagent Name="PR2" Description="Incorporation Buffer" SelectorValvePosition="3" />
+ <Reagent Name="CMS" Description="Cleavage Mix" SelectorValvePosition="4" />
+ <Reagent Name="AMS1" Description="Amplification Mix 1" SelectorValvePosition="5" />
+ <Reagent Name="AMS2" Description="Amplification Mix 2" SelectorValvePosition="6" />
+ <Reagent Name="LPM" Description="Lin Pre Mix" SelectorValvePosition="7" />
+ <Reagent Name="LDR" Description="Formamide" SelectorValvePosition="8" />
+ <Reagent Name="LMX1" Description="Linearization Mix" SelectorValvePosition="9" />
+ <Reagent Name="LMX2" Description="R2 Lin Mix" SelectorValvePosition="10" />
+ <Reagent Name="RMF" Description="Resynthesis Mix" SelectorValvePosition="11" />
+ <Reagent Name="HP10" Description="R1 Primer Mix" SelectorValvePosition="12" />
+ <Reagent Name="HP12" Description="Index Primer Mix" SelectorValvePosition="13" />
+ <Reagent Name="HP11" Description="R2 Primer Mix" SelectorValvePosition="14" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="15" />
+ <Reagent Name="PW2" Description="Water" SelectorValvePosition="16" />
+ <Reagent Name="TMP" Description="Template" SelectorValvePosition="17" />
+ <Reagent Name="C1" Description="Custom 1 Primer Mix" SelectorValvePosition="18" />
+ <Reagent Name="C2" Description="Custom 2 Primer Mix" SelectorValvePosition="19" />
+ <Reagent Name="C3" Description="Custom 3 Primer Mix" SelectorValvePosition="20" />
+ <Reagent Name="PW3" Description="Water" SelectorValvePosition="21" />
+</Reagents>
\ No newline at end of file
diff --git a/recipes/Transposon10/Wash/LineWash.xml b/recipes/Transposon10/Wash/LineWash.xml
new file mode 100755
index 0000000..ebfa1af
--- /dev/null
+++ b/recipes/Transposon10/Wash/LineWash.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<Recipe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="LineWash_v0.3">
+
+ <Protocol Version="LineWash">
+ <ChemistryRef ChemistryName="LineWash" Repeat="1" />
+ </Protocol>
+
+ <ChemistryDefinitions Version="LineWash_v0.3">
+ <ChemistryDefinition Name="CleanSyringe">
+ <ChemistryStep Description="CleanSyringe" Repeat="1"> <!--run water through syringe to reduce carryover since about to backflush-->
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" DispenseRate="2500" Volume="1000" />
+ <Wait Duration="10000" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="500" DispenseRate="1000" Volume="500" />
+ <Wait Duration="10000" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" DispenseRate="2500" Volume="500" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Oscillate">
+ <ChemistryStep Description="Oscillate" Repeat="1">
+ <!--add airbubble, fill syringe, and slowly pump back and forth increasing pressure-->
+ <PumpToFlowcell Solution="23" AspirationRate="1000" DispenseRate="2500" Volume="15" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="OscillateSubStep" Repeat="49">
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="5"/>
+ <Wait Duration="1000" />
+ <Aspirate ReagentName="PW1" AspirationRate="2000" Volume="5" />
+ <Wait Duration="1000" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="10"/>
+ <Wait Duration="1000" />
+ <Aspirate ReagentName="PW1" AspirationRate="2000" Volume="5" />
+ <Wait Duration="6000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Reprime">
+ <ChemistryStep Description="Reprime" Repeat="1"> <!--prime line with 500uL-->
+ <PumpToFlowcell ReagentName="PW1" AspirationRate="2000" DispenseRate="2500" Volume="500" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Flush">
+ <ChemistryStep Description="Flush" Repeat="1"> <!--empty tube and refill from bypass-->
+ <PumpToFlowcell ReagentName="PW1" AspirationRate="5000" DispenseRate="5000" Volume="3000" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Wait180000">
+ <ChemistryStep Description="Wait180000" Repeat="1">
+ <Wait Duration="180000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
+
+ - <Reagents Name="ClogWashReagents" Version="Selector Valve Positions v2.2">
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="1" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="2" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="3" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="4" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="5" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="6" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="7" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="8" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="9" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="10" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="11" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="12" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="13" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="14" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="15" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="16" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="17" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="18" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="19" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="20" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="21" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="22" />
+ </Reagents>
+
+ <Name>LineWash_v0.3</Name>
+</Recipe>
diff --git a/recipes/Transposon10/Wash/MaintenanceWash.xml b/recipes/Transposon10/Wash/MaintenanceWash.xml
new file mode 100755
index 0000000..52d8301
--- /dev/null
+++ b/recipes/Transposon10/Wash/MaintenanceWash.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" ?>
+<Recipe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="Maintenance Wash Recipe">
+ <Protocol>
+ <ChemistryRef Description="PostRun Wash" ChemistryName="Wash" />
+ </Protocol>
+ <ChemistryDefinitions>
+ <ChemistryDefinition Name="Wash">
+ <ChemistryStep Description="Wash">
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="1000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
+ <Reagents>
+ <Reagent Name="PW1" Description="Water" ViciPosition="1" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="2" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="3" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="4" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="5" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="6" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="7" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="8" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="9" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="10" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="11" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="12" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="13" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="14" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="15" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="16" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="17" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="18" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="19" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="20" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="21" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="22" />
+
+ </Reagents>
+ <Name>PostRunWash_v1.0.1</Name>
+</Recipe>
\ No newline at end of file
diff --git a/recipes/Transposon10/Wash/PostRunWash.xml b/recipes/Transposon10/Wash/PostRunWash.xml
new file mode 100755
index 0000000..43bc4d8
--- /dev/null
+++ b/recipes/Transposon10/Wash/PostRunWash.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0"?>
+<Recipe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="PostRunWash_v1.0.0">
+ <Protocol>
+ <ChemistryRef Description="PostRun Wash" ChemistryName="Wash" />
+ </Protocol>
+
+ <ChemistryDefinitions>
+ <ChemistryDefinition Name="Wash">
+ <ChemistryStep Description="TemplateNaOClAspirate">
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="1000" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="1250" />
+ </ChemistryStep>
+ <ChemistryStep Description="Prime">
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="1000" />
+ <Dispense DispenseRate="7500" />
+ </ChemistryStep>
+ <ChemistryStep Description="Wash1" Repeat="8">
+ <Aspirate Solution="3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell Solution="17" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="EmptyTube">
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="2000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Prime">
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="1000" />
+ <Dispense DispenseRate="7500" />
+ </ChemistryStep>
+ <ChemistryStep Description="Wash2" Repeat="8">
+ <Aspirate Solution="3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell Solution="17" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="EmptyTube">
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="2000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Prime">
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="1000" />
+ <Dispense DispenseRate="7500" />
+ </ChemistryStep>
+ <ChemistryStep Description="Wash3" Repeat="8">
+ <Aspirate Solution="3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell Solution="17" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="Wash">
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="1000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
+ <Reagents>
+ <Reagent Name="PW1" Description="Water" ViciPosition="1" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="2" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="3" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="4" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="5" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="6" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="7" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="8" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="9" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="10" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="11" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="12" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="13" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="14" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="15" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="16" />
+ <Reagent Name="PW1" Description="DiluteNaOCl" ViciPosition="17" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="18" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="19" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="20" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="21" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="22" />
+
+ </Reagents>
+ <Name>PostRunWash_v1.0.1</Name>
+</Recipe>
\ No newline at end of file
diff --git a/recipes/Transposon10/Wash/PostRunWashOriginal.xml b/recipes/Transposon10/Wash/PostRunWashOriginal.xml
new file mode 100755
index 0000000..fc50905
--- /dev/null
+++ b/recipes/Transposon10/Wash/PostRunWashOriginal.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0"?>
+<Recipe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="PostRunWash_v1.0.0">
+ <Protocol>
+ <ChemistryRef Description="PostRun Wash" ChemistryName="Wash" />
+ </Protocol>
+ <ChemistryDefinitions>
+ <ChemistryDefinition Name="Wash">
+ <ChemistryStep Description="Wash">
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="1000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
+ <Reagents>
+ <Reagent Name="PW1" Description="Water" ViciPosition="1" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="2" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="3" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="4" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="5" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="6" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="7" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="8" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="9" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="10" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="11" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="12" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="13" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="14" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="15" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="16" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="17" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="18" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="19" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="20" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="21" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="22" />
+
+ </Reagents>
+ <Name>PostRunWash_v1.0.1</Name>
+</Recipe>
\ No newline at end of file
diff --git a/recipes/Transposon10/Wash/StandbyWash.xml b/recipes/Transposon10/Wash/StandbyWash.xml
new file mode 100755
index 0000000..ce83571
--- /dev/null
+++ b/recipes/Transposon10/Wash/StandbyWash.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<Recipe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="StandbyWash_v1.0.0">
+ <Protocol>
+ <ChemistryRef Description="Standby Wash 1 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 2 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 3 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 4 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 5 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 6 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 7 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 8 of 8" ChemistryName="Wash" />
+ </Protocol>
+ <ChemistryDefinitions>
+ <ChemistryDefinition Name="Wash">
+ <ChemistryStep Description="Wash">
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
+ <Reagents>
+ <Reagent Name="PW1" Description="Water" ViciPosition="1" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="2" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="3" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="4" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="5" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="6" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="7" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="8" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="9" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="10" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="11" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="12" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="13" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="14" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="15" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="16" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="17" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="18" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="19" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="20" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="21" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="22" />
+
+ </Reagents>
+ <Name>StandbyWash_v1.0.0</Name>
+</Recipe>
\ No newline at end of file
diff --git a/recipes/Transposon12/Chemistry/Chemistry.xml b/recipes/Transposon12/Chemistry/Chemistry.xml
new file mode 100644
index 0000000..96dfceb
--- /dev/null
+++ b/recipes/Transposon12/Chemistry/Chemistry.xml
@@ -0,0 +1,413 @@
+<?xml version="1.0"?>
+<ChemistryDefinitions Version="Calvados + AutoWashv4">
+
+ <ChemistryDefinition Name="CompleteCycle">
+ <ChemistryStep Description="Deblock" Repeat="1">
+ <Temp Duration="0" Temperature="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="CMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="22" />
+ <Wait Duration="10000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Buffer Wash" Repeat="1">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="Incorporation" Repeat="1" IsIncorporation="true">
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="45" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Temp Duration="0" Temperature="65" />
+ <Wait Duration="20000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <DispenseAndWait Duration="20000" />
+ <Temp Duration="0" Temperature="22" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <DispenseAndWait DispenseRate="7500" Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="FirstBase">
+ <ChemistryStep Description="Incorporation" Repeat="1" IsIncorporation="true">
+ <Temp Duration="0" Temperature="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="45" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Temp Duration="0" Temperature="65" />
+ <Wait Duration="20000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <DispenseAndWait Duration="20000" />
+ <Temp Duration="0" Temperature="22" />
+ <Wait Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <DispenseAndWait DispenseRate="7500" Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="EndRead">
+ <ChemistryStep Description="Safe State" Repeat="1">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="End">
+ <ChemistryStep Description="Safe State" Repeat="1">
+ <PumpToFlowcell ReagentName="PW1" AspirationRate="2000" DispenseRate="7500" Volume="750" />
+ <PumpToFlowcell ReagentName="PW2" AspirationRate="2000" DispenseRate="7500" Volume="750" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="EndDeblock">
+ <ChemistryStep Description="Deblock" Repeat="1">
+ <Temp Duration="0" Temperature="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="CMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Wait Duration="40000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <Wait Duration="35000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="250" />
+ <TempOff />
+ </ChemistryStep>
+ <ChemistryStep Description="Buffer Wash" Repeat="1">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="TemplateRinse">
+ <ChemistryStep Description="EmptyTemplate">
+ <PumpToFlowcell ReagentName="TMP" AspirationRate="2000" DispenseRate="7500" Volume="500" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="750" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPR2TemplateFirst InitialPrime">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="500" />
+ <Dispense DispenseRate="2500" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPR2TemplateFirst DispenseToTemplate" Repeat="9">
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="TMP" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPR2TemplateFirst EmptyTube">
+ <PumpToFlowcell ReagentName="TMP" AspirationRate="2000" DispenseRate="7500" Volume="2000" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPWTemplate InitialPrime">
+ <PumpToFlowcell ReagentName="PW1" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell ReagentName="PW2" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="2500" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPW1Template DispenseToTemplate" Repeat="4">
+ <Aspirate ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="TMP" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPW2Template DispenseToTemplate" Repeat="4">
+ <Aspirate ReagentName="PW2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="TMP" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="STRPWTemplate EmptyTube">
+ <PumpToFlowcell ReagentName="TMP" AspirationRate="2000" DispenseRate="7500" Volume="2000" />
+ </ChemistryStep>
+ <ChemistryStep Description="PR2 InitialPrime">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="2500" Volume="2000" />
+ <Dispense DispenseRate="2500" />
+ </ChemistryStep>
+ <ChemistryStep Description="PR2 Reverse Flush">
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="IMS" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LMX2" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="SRE" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="RMF" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="CMS" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="HP10" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="AMS1" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="HP12" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="AMS2" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="HP11" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LPM" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="TMP" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LDR" DispenseRate="500" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="C1" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LMX1" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="C2" DispenseRate="2000" Volume="250" />
+ <Aspirate ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="C3" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="PW3 InitialPrime">
+ <PumpToFlowcell ReagentName="PW3" AspirationRate="2000" DispenseRate="2500" Volume="500" />
+ <Dispense DispenseRate="2500" />
+ </ChemistryStep>
+ <ChemistryStep Description="PW3 Reverse Flush">
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="IMS" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="RMF" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="SRE" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="HP10" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="PR2" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="HP12" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="CMS" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="HP11" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="AMS1" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="TMP" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="AMS2" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="C1" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LPM" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="C2" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="LDR" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="C3" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="LMX1" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="PR2" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ <Aspirate ReagentName="PW3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="LMX2" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="SRE" DispenseRate="2000" Volume="80" />
+ <DispenseToFlowcell ReagentName="CMS" DispenseRate="2000" Volume="80" />
+ <Dispense DispenseRate="2000" Volume="10"/>
+ </ChemistryStep>
+ <ChemistryStep Description="ValveMotions" Repeat="8">
+ <PumpToFlowcell ReagentName="HP12" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ <PumpToFlowcell ReagentName="HP12" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ <PumpToFlowcell ReagentName="AMS2" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ <PumpToFlowcell ReagentName="C1" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ <PumpToFlowcell ReagentName="AMS2" AspirationRate="2000" DispenseRate="2500" Volume="0" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="ResumeChemistry">
+ <ChemistryStep Description="Prepare for scanning" Repeat="1">
+ <Temp Duration="0" Temperature="22" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Wait Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="PauseChemistry">
+ <ChemistryStep Description="Pause flowcell" Repeat="1">
+ <Temp Duration="0" Temperature="22" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="OnBoardClusterGeneration">
+ <ChemistryStep Description="Flow Check" Repeat="1">
+ <PumpToFlowcell ReagentName="PW1" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="PW2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="750" />
+ </ChemistryStep>
+ <ChemistryStep Description="Prime PR2 Bypass" Repeat="3">
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="Initial Prime" Repeat="1">
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" Solution="0" DispenseRate="7500" Volume="300" />
+ <Temp Duration="30000" Temperature="40" />
+ <PumpToFlowcell ReagentName="AMS1" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="AMS2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="LPM" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="TMP" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="300" />
+ <Temp Duration="30000" Temperature="75" />
+ </ChemistryStep>
+ <ChemistryStep Description="TMP RampDown" Repeat="1">
+ <Wait Duration="300000" />
+ <Temp Duration="150000" Temperature="40" />
+ </ChemistryStep>
+ <ChemistryStep Description="TMP Buffer Wash" Repeat="15">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="250" Solution="0" DispenseRate="7500" Volume="5" />
+ <Wait Duration="18000" />
+
+ </ChemistryStep>
+ <ChemistryStep Description="First Extension" Repeat="15">
+
+ <PumpToFlowcell ReagentName="AMS1" AspirationRate="250" Solution="0" DispenseRate="7500" Volume="5" />
+ <Wait Duration="3000" />
+
+ </ChemistryStep>
+
+
+ <ChemistryStep Description="FE Wait Amp-TempRamp" Repeat="1">
+ <Wait Duration="90000" />
+ <Temp Duration="0" Temperature="50" />
+ </ChemistryStep>
+ <ChemistryStep Description="Amplification 1" Repeat="26">
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="28" />
+ <PumpToFlowcell ReagentName="LPM" AspirationRate="250" DispenseRate="7500" Volume="28" />
+ <PumpToFlowcell ReagentName="AMS1" AspirationRate="250" DispenseRate="7500" Volume="72" />
+ <Wait Duration="15000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Amplification-Wash">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <Temp Temperature="20" />
+ </ChemistryStep>
+ <ChemistryStep Description="Linearisation">
+ <PumpToFlowcell ReagentName="LMX1" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="LMX1" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="46" />
+ <Wait Duration="300000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ </ChemistryStep>
+ <ChemistryStep Description="SBS Prime">
+ <Temp Temperature="20" />
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="CMS" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="PairedEndTurnaround">
+ <ChemistryStep Description="Pre-resynthesis_tempramp">
+ <Temp Temperature="50" />
+ </ChemistryStep>
+ <ChemistryStep Description="Resynthesis" Repeat="8" >
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="28" />
+ <PumpToFlowcell ReagentName="LPM" AspirationRate="250" DispenseRate="7500" Volume="28" />
+ <PumpToFlowcell ReagentName="AMS2" AspirationRate="250" DispenseRate="7500" Volume="72" />
+ <Wait Duration="15000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Post-resynthesis_wash">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <Temp Temperature="20" Duration="45000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Linearisation 2">
+ <PumpToFlowcell ReagentName="LMX2" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="LMX2" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="38" />
+ <Wait Duration="300000"/>
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="FirstReadPreparation">
+ <ChemistryStep Description="FirstReadPreparation">
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell ReagentName="C1" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="C1" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="SecondReadPreparation">
+ <ChemistryStep Description="SecondReadPreparation">
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell ReagentName="C3" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="C3" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Index1Preparation">
+ <ChemistryStep Description="Index1Preparation">
+ <Temp Temperature="20" Duration="25000" />
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell ReagentName="C1" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="C1" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Deprotection">
+ <ChemistryStep Description="Deprotection">
+ <Temp Temperature="20" />
+ <Wait Duration="120000" />
+ <PumpToFlowcell ReagentName="RMF" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="RMF" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="38" />
+ <Wait Duration="300000"/>
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ </ChemistryStep>
+ <ChemistryStep Description="Denaturation">
+ <Temp Temperature="20" Duration="25000" />
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="300" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="250" DispenseRate="7500" Volume="75" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="7500" Volume="120" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+
+ <ChemistryDefinition Name="Index2Preparation">
+ <ChemistryStep Description="Index2Preparation">
+ <Temp Temperature="20" Duration="25000" />
+ <PumpToFlowcell ReagentName="LDR" AspirationRate="250" DispenseRate="2500" Volume="75" />
+ <Temp Temperature="65" Duration="60000" />
+ <PumpToFlowcell ReagentName="C2" AspirationRate="2000" DispenseRate="2500" Volume="300" />
+ <PumpToFlowcell ReagentName="C2" AspirationRate="250" DispenseRate="2500" Volume="75" />
+ <Temp Temperature="40" Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" DispenseRate="2500" Volume="120" />
+ <TempOff />
+ </ChemistryStep>
+ </ChemistryDefinition>
+
+ <ChemistryDefinition Name="Index2FirstBaseDark">
+ <ChemistryStep Description="Incorporation" Repeat="1">
+ <Temp Temperature="60" Duration="0" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Temp Temperature="65" Duration="0" />
+ <Wait Duration="45000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <DispenseAndWait Duration="40000" />
+ <Temp Temperature="22" Duration="0" />
+ <Wait Duration="60000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <DispenseAndWait Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Index2CompleteCycleDark2">
+ <ChemistryStep Description="Deblock" Repeat="1">
+ <Temp Temperature="60" Duration="0" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="CMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Wait Duration="35000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <DispenseAndWait DispenseRate="7500" Duration="30000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Buffer Wash" Repeat="1">
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="Incorporation" Repeat="1">
+ <PumpToFlowcell ReagentName="IMS" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <Temp Temperature="65" Duration="0" />
+ <Wait Duration="45000" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="5" />
+ <DispenseAndWait Duration="40000" />
+ <Temp Temperature="22" Duration="0" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="120" />
+ <PumpToFlowcell ReagentName="SRE" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="60" />
+ <PumpToFlowcell ReagentName="PR2" AspirationRate="2000" Solution="0" DispenseRate="7500" Volume="20" />
+ <DispenseAndWait DispenseRate="7500" Duration="15000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
\ No newline at end of file
diff --git a/recipes/Transposon12/Exposures/Sony.xml b/recipes/Transposon12/Exposures/Sony.xml
new file mode 100644
index 0000000..ed9e88d
--- /dev/null
+++ b/recipes/Transposon12/Exposures/Sony.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Exposures>
+ <Exposure Name="A" Start="1037" Ramp="0" />
+ <Exposure Name="T" Start="500" Ramp="0" />
+ <Exposure Name="C" Start="1037" Ramp="0" />
+ <Exposure Name="G" Start="500" Ramp="0" />
+</Exposures>
diff --git a/recipes/Transposon12/Exposures/SonyV2.xml b/recipes/Transposon12/Exposures/SonyV2.xml
new file mode 100644
index 0000000..b1f60d9
--- /dev/null
+++ b/recipes/Transposon12/Exposures/SonyV2.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Exposures>
+ <Exposure Name="A" Start="260" IsIndexed="false" Ramp="5.2" />
+ <Exposure Name="A" Start="1037" IsIndexed="true" Ramp="0" />
+ <Exposure Name="T" Start="125" IsIndexed="false" Ramp="2.5" />
+ <Exposure Name="T" Start="500" IsIndexed="true" Ramp="0" />
+ <Exposure Name="C" Start="260" IsIndexed="false" Ramp="5.2" />
+ <Exposure Name="C" Start="1037" IsIndexed="true" Ramp="0" />
+ <Exposure Name="G" Start="125" IsIndexed="false" Ramp="2.5" />
+ <Exposure Name="G" Start="500" IsIndexed="true" Ramp="0" />
+</Exposures>
diff --git a/recipes/Transposon12/Protocol/1Read1Index.xml b/recipes/Transposon12/Protocol/1Read1Index.xml
new file mode 100644
index 0000000..7690874
--- /dev/null
+++ b/recipes/Transposon12/Protocol/1Read1Index.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<Protocol Version="Fraise 0.7.1 Amplicon v1.1">
+ <ChemistryRef ChemistryName="OnBoardClusterGeneration" />
+ <ChemistryRef ChemistryName="FirstReadPreparation" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ReadRef ReadName="FirstRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index1Preparation" />
+ <ReadRef ReadName="IndexRead1" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="TemplateRinse" />
+ <ChemistryRef ChemistryName="End" />
+
+</Protocol>
\ No newline at end of file
diff --git a/recipes/Transposon12/Protocol/1Read2Index.xml b/recipes/Transposon12/Protocol/1Read2Index.xml
new file mode 100644
index 0000000..adacc5d
--- /dev/null
+++ b/recipes/Transposon12/Protocol/1Read2Index.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<Protocol Version="Fraise 0.7.1 Amplicon v1.1">
+ <ChemistryRef ChemistryName="OnBoardClusterGeneration" />
+ <ChemistryRef ChemistryName="FirstReadPreparation" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ReadRef ReadName="FirstRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index1Preparation" />
+ <ReadRef ReadName="IndexRead1" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index2Preparation" />
+ <ReadRef ReadName="IndexRead2" />
+ <ChemistryRef ChemistryName="TemplateRinse" />
+ <ChemistryRef ChemistryName="End" />
+ </Protocol>
\ No newline at end of file
diff --git a/recipes/Transposon12/Protocol/2Read1Index.xml b/recipes/Transposon12/Protocol/2Read1Index.xml
new file mode 100644
index 0000000..23c8bbc
--- /dev/null
+++ b/recipes/Transposon12/Protocol/2Read1Index.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<Protocol Version="Fraise 0.7.1 Amplicon v1.1">
+ <ChemistryRef ChemistryName="OnBoardClusterGeneration" />
+ <ChemistryRef ChemistryName="FirstReadPreparation" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ReadRef ReadName="FirstRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index1Preparation" />
+ <ReadRef ReadName="IndexRead1" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Deprotection" />
+ <ChemistryRef ChemistryName="PairedEndTurnaround" />
+ <ChemistryRef ChemistryName="SecondReadPreparation" />
+ <ReadRef ReadName="SecondRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="TemplateRinse" />
+ <ChemistryRef ChemistryName="End" />
+ </Protocol>
\ No newline at end of file
diff --git a/recipes/Transposon12/Protocol/2Read2Index.xml b/recipes/Transposon12/Protocol/2Read2Index.xml
new file mode 100644
index 0000000..b38a97f
--- /dev/null
+++ b/recipes/Transposon12/Protocol/2Read2Index.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<Protocol Version="Fraise 0.7.1 Amplicon v1.1">
+ <ChemistryRef ChemistryName="OnBoardClusterGeneration" />
+ <ChemistryRef ChemistryName="FirstReadPreparation" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="Index2CompleteCycleDark2" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ReadRef ReadName="FirstRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index1Preparation" />
+ <ReadRef ReadName="IndexRead1" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Index2Preparation" />
+ <ReadRef ReadName="IndexRead2" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="Deprotection" />
+ <ChemistryRef ChemistryName="PairedEndTurnaround" />
+ <ChemistryRef ChemistryName="SecondReadPreparation" />
+ <ReadRef ReadName="SecondRead" />
+ <ChemistryRef ChemistryName="EndDeblock" />
+ <ChemistryRef ChemistryName="TemplateRinse" />
+ <ChemistryRef ChemistryName="End" />
+ </Protocol>
\ No newline at end of file
diff --git a/recipes/Transposon12/Reads/Reads.xml b/recipes/Transposon12/Reads/Reads.xml
new file mode 100644
index 0000000..3ced231
--- /dev/null
+++ b/recipes/Transposon12/Reads/Reads.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<ReadDefinitions Version="Fraise 0.7.1 Amplicon v1.1">
+ <ReadDefinition Name="FirstRead">
+ <FirstBase ChemistryName="FirstBase" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" Cycles="NumCycles - 1" />
+ <End ChemistryName="EndRead" />
+ </ReadDefinition>
+ <ReadDefinition Name="IndexRead1" IsIndexed="True" >
+ <FirstBase ChemistryName="FirstBase" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" Cycles="NumCycles - 1" />
+ <End ChemistryName="EndRead" />
+ </ReadDefinition>
+ <ReadDefinition Name="SecondRead" IsIndexed="false">
+ <FirstBase ChemistryName="FirstBase" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" Cycles="NumCycles - 1" />
+ <End ChemistryName="EndRead" />
+ </ReadDefinition>
+ <ReadDefinition Name="IndexRead2" IsIndexed="true">
+ <FirstBase ChemistryName="FirstBase" Cycles="1" />
+ <Imaging ChemistryName="CompleteCycle" Cycles="NumCycles - 1" />
+ <End ChemistryName="EndRead" />
+ </ReadDefinition>
+ </ReadDefinitions>
\ No newline at end of file
diff --git a/recipes/Transposon12/Reagents/MaintenanceWash.xml b/recipes/Transposon12/Reagents/MaintenanceWash.xml
new file mode 100644
index 0000000..f6d14da
--- /dev/null
+++ b/recipes/Transposon12/Reagents/MaintenanceWash.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Reagents Name="Bolt Avocado Reagents" Version="Selector Valve Positions v2.2">
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="1" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="2" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="3" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="4" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="5" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="6" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="7" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="8" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="9" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="10" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="11" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="12" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="13" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="14" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="15" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="16" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="17" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="18" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="19" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="20" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="21" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="22" />
+</Reagents>
diff --git a/recipes/Transposon12/Reagents/PostRunWash.xml b/recipes/Transposon12/Reagents/PostRunWash.xml
new file mode 100644
index 0000000..f6d14da
--- /dev/null
+++ b/recipes/Transposon12/Reagents/PostRunWash.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Reagents Name="Bolt Avocado Reagents" Version="Selector Valve Positions v2.2">
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="1" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="2" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="3" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="4" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="5" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="6" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="7" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="8" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="9" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="10" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="11" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="12" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="13" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="14" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="15" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="16" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="17" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="18" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="19" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="20" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="21" />
+ <Reagent Name="PW1" Description="PW1" SelectorValvePosition="22" />
+</Reagents>
diff --git a/recipes/Transposon12/Reagents/Sequencing.xml b/recipes/Transposon12/Reagents/Sequencing.xml
new file mode 100644
index 0000000..87cac01
--- /dev/null
+++ b/recipes/Transposon12/Reagents/Sequencing.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Reagents Name="Shock Reagents" Version="Selector Valve Positions v2.2">
+ <Reagent Name="IMS" Description="Incorporation Mix" SelectorValvePosition="1" />
+ <Reagent Name="SRE" Description="Scan Mix" SelectorValvePosition="2" />
+ <Reagent Name="PR2" Description="Incorporation Buffer" SelectorValvePosition="3" />
+ <Reagent Name="CMS" Description="Cleavage Mix" SelectorValvePosition="4" />
+ <Reagent Name="AMS1" Description="Amplification Mix 1" SelectorValvePosition="5" />
+ <Reagent Name="AMS2" Description="Amplification Mix 2" SelectorValvePosition="6" />
+ <Reagent Name="LPM" Description="Lin Pre Mix" SelectorValvePosition="7" />
+ <Reagent Name="LDR" Description="Formamide" SelectorValvePosition="8" />
+ <Reagent Name="LMX1" Description="Linearization Mix" SelectorValvePosition="9" />
+ <Reagent Name="LMX2" Description="R2 Lin Mix" SelectorValvePosition="10" />
+ <Reagent Name="RMF" Description="Resynthesis Mix" SelectorValvePosition="11" />
+ <Reagent Name="HP10" Description="R1 Primer Mix" SelectorValvePosition="12" />
+ <Reagent Name="HP12" Description="Index Primer Mix" SelectorValvePosition="13" />
+ <Reagent Name="HP11" Description="R2 Primer Mix" SelectorValvePosition="14" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="15" />
+ <Reagent Name="PW2" Description="Water" SelectorValvePosition="16" />
+ <Reagent Name="TMP" Description="Template" SelectorValvePosition="17" />
+ <Reagent Name="C1" Description="Custom 1 Primer Mix" SelectorValvePosition="18" />
+ <Reagent Name="C2" Description="Custom 2 Primer Mix" SelectorValvePosition="19" />
+ <Reagent Name="C3" Description="Custom 3 Primer Mix" SelectorValvePosition="20" />
+ <Reagent Name="PW3" Description="Water" SelectorValvePosition="21" />
+</Reagents>
\ No newline at end of file
diff --git a/recipes/Transposon12/Wash/130702_ImplementingCarryoverDecontamWash_v3.docx b/recipes/Transposon12/Wash/130702_ImplementingCarryoverDecontamWash_v3.docx
new file mode 100644
index 0000000..ea4524b
Binary files /dev/null and b/recipes/Transposon12/Wash/130702_ImplementingCarryoverDecontamWash_v3.docx differ
diff --git a/recipes/Transposon12/Wash/LineWash.xml b/recipes/Transposon12/Wash/LineWash.xml
new file mode 100644
index 0000000..ebfa1af
--- /dev/null
+++ b/recipes/Transposon12/Wash/LineWash.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<Recipe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="LineWash_v0.3">
+
+ <Protocol Version="LineWash">
+ <ChemistryRef ChemistryName="LineWash" Repeat="1" />
+ </Protocol>
+
+ <ChemistryDefinitions Version="LineWash_v0.3">
+ <ChemistryDefinition Name="CleanSyringe">
+ <ChemistryStep Description="CleanSyringe" Repeat="1"> <!--run water through syringe to reduce carryover since about to backflush-->
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" DispenseRate="2500" Volume="1000" />
+ <Wait Duration="10000" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="500" DispenseRate="1000" Volume="500" />
+ <Wait Duration="10000" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" DispenseRate="2500" Volume="500" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Oscillate">
+ <ChemistryStep Description="Oscillate" Repeat="1">
+ <!--add airbubble, fill syringe, and slowly pump back and forth increasing pressure-->
+ <PumpToFlowcell Solution="23" AspirationRate="1000" DispenseRate="2500" Volume="15" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="OscillateSubStep" Repeat="49">
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="5"/>
+ <Wait Duration="1000" />
+ <Aspirate ReagentName="PW1" AspirationRate="2000" Volume="5" />
+ <Wait Duration="1000" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="10"/>
+ <Wait Duration="1000" />
+ <Aspirate ReagentName="PW1" AspirationRate="2000" Volume="5" />
+ <Wait Duration="6000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Reprime">
+ <ChemistryStep Description="Reprime" Repeat="1"> <!--prime line with 500uL-->
+ <PumpToFlowcell ReagentName="PW1" AspirationRate="2000" DispenseRate="2500" Volume="500" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Flush">
+ <ChemistryStep Description="Flush" Repeat="1"> <!--empty tube and refill from bypass-->
+ <PumpToFlowcell ReagentName="PW1" AspirationRate="5000" DispenseRate="5000" Volume="3000" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ <AspirateFromBypass ReagentName="PW1" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell ReagentName="PW1" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ <ChemistryDefinition Name="Wait180000">
+ <ChemistryStep Description="Wait180000" Repeat="1">
+ <Wait Duration="180000" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
+
+ - <Reagents Name="ClogWashReagents" Version="Selector Valve Positions v2.2">
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="1" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="2" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="3" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="4" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="5" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="6" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="7" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="8" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="9" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="10" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="11" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="12" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="13" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="14" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="15" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="16" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="17" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="18" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="19" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="20" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="21" />
+ <Reagent Name="PW1" Description="Water" SelectorValvePosition="22" />
+ </Reagents>
+
+ <Name>LineWash_v0.3</Name>
+</Recipe>
diff --git a/recipes/Transposon12/Wash/MaintenanceWash.xml b/recipes/Transposon12/Wash/MaintenanceWash.xml
new file mode 100644
index 0000000..52d8301
--- /dev/null
+++ b/recipes/Transposon12/Wash/MaintenanceWash.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" ?>
+<Recipe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="Maintenance Wash Recipe">
+ <Protocol>
+ <ChemistryRef Description="PostRun Wash" ChemistryName="Wash" />
+ </Protocol>
+ <ChemistryDefinitions>
+ <ChemistryDefinition Name="Wash">
+ <ChemistryStep Description="Wash">
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="1000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
+ <Reagents>
+ <Reagent Name="PW1" Description="Water" ViciPosition="1" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="2" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="3" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="4" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="5" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="6" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="7" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="8" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="9" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="10" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="11" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="12" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="13" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="14" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="15" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="16" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="17" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="18" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="19" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="20" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="21" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="22" />
+
+ </Reagents>
+ <Name>PostRunWash_v1.0.1</Name>
+</Recipe>
\ No newline at end of file
diff --git a/recipes/Transposon12/Wash/PostRunWash.xml b/recipes/Transposon12/Wash/PostRunWash.xml
new file mode 100644
index 0000000..43bc4d8
--- /dev/null
+++ b/recipes/Transposon12/Wash/PostRunWash.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0"?>
+<Recipe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="PostRunWash_v1.0.0">
+ <Protocol>
+ <ChemistryRef Description="PostRun Wash" ChemistryName="Wash" />
+ </Protocol>
+
+ <ChemistryDefinitions>
+ <ChemistryDefinition Name="Wash">
+ <ChemistryStep Description="TemplateNaOClAspirate">
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="1000" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="1250" />
+ </ChemistryStep>
+ <ChemistryStep Description="Prime">
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="1000" />
+ <Dispense DispenseRate="7500" />
+ </ChemistryStep>
+ <ChemistryStep Description="Wash1" Repeat="8">
+ <Aspirate Solution="3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell Solution="17" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="EmptyTube">
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="2000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Prime">
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="1000" />
+ <Dispense DispenseRate="7500" />
+ </ChemistryStep>
+ <ChemistryStep Description="Wash2" Repeat="8">
+ <Aspirate Solution="3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell Solution="17" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="EmptyTube">
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="2000" />
+ </ChemistryStep>
+ <ChemistryStep Description="Prime">
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="1000" />
+ <Dispense DispenseRate="7500" />
+ </ChemistryStep>
+ <ChemistryStep Description="Wash3" Repeat="8">
+ <Aspirate Solution="3" AspirationRate="2000" Volume="250" />
+ <DispenseToFlowcell Solution="17" DispenseRate="2000" Volume="250" />
+ </ChemistryStep>
+ <ChemistryStep Description="Wash">
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="1000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <Dispense DispenseRate="7500" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="7500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
+ <Reagents>
+ <Reagent Name="PW1" Description="Water" ViciPosition="1" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="2" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="3" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="4" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="5" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="6" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="7" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="8" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="9" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="10" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="11" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="12" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="13" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="14" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="15" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="16" />
+ <Reagent Name="PW1" Description="DiluteNaOCl" ViciPosition="17" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="18" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="19" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="20" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="21" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="22" />
+
+ </Reagents>
+ <Name>PostRunWash_v1.0.1</Name>
+</Recipe>
\ No newline at end of file
diff --git a/recipes/Transposon12/Wash/PostRunWashOriginal.xml b/recipes/Transposon12/Wash/PostRunWashOriginal.xml
new file mode 100644
index 0000000..fc50905
--- /dev/null
+++ b/recipes/Transposon12/Wash/PostRunWashOriginal.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0"?>
+<Recipe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="PostRunWash_v1.0.0">
+ <Protocol>
+ <ChemistryRef Description="PostRun Wash" ChemistryName="Wash" />
+ </Protocol>
+ <ChemistryDefinitions>
+ <ChemistryDefinition Name="Wash">
+ <ChemistryStep Description="Wash">
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="1000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
+ <Reagents>
+ <Reagent Name="PW1" Description="Water" ViciPosition="1" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="2" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="3" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="4" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="5" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="6" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="7" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="8" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="9" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="10" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="11" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="12" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="13" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="14" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="15" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="16" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="17" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="18" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="19" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="20" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="21" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="22" />
+
+ </Reagents>
+ <Name>PostRunWash_v1.0.1</Name>
+</Recipe>
\ No newline at end of file
diff --git a/recipes/Transposon12/Wash/StandbyWash.xml b/recipes/Transposon12/Wash/StandbyWash.xml
new file mode 100644
index 0000000..ce83571
--- /dev/null
+++ b/recipes/Transposon12/Wash/StandbyWash.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<Recipe xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="StandbyWash_v1.0.0">
+ <Protocol>
+ <ChemistryRef Description="Standby Wash 1 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 2 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 3 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 4 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 5 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 6 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 7 of 8" ChemistryName="Wash" />
+ <ChemistryRef Description="Standby Wash 8 of 8" ChemistryName="Wash" />
+ </Protocol>
+ <ChemistryDefinitions>
+ <ChemistryDefinition Name="Wash">
+ <ChemistryStep Description="Wash">
+ <PumpToFlowcell Solution="4" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="3" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <AspirateFromBypass ReagentName="PR2" AspirationRate="2000" Volume="250" />
+ <Dispense DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="2" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="1" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="5" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="6" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="7" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="17" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="18" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="19" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="20" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="8" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="9" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="10" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="11" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="12" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="13" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="14" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="15" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="16" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="21" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ <PumpToFlowcell Solution="22" AspirationRate="2000" DispenseRate="2500" Volume="250" />
+ </ChemistryStep>
+ </ChemistryDefinition>
+ </ChemistryDefinitions>
+ <Reagents>
+ <Reagent Name="PW1" Description="Water" ViciPosition="1" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="2" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="3" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="4" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="5" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="6" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="7" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="8" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="9" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="10" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="11" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="12" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="13" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="14" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="15" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="16" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="17" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="18" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="19" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="20" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="21" />
+ <Reagent Name="PW1" Description="Water" ViciPosition="22" />
+
+ </Reagents>
+ <Name>StandbyWash_v1.0.0</Name>
+</Recipe>
\ No newline at end of file
diff --git a/software_license b/software_license
new file mode 100644
index 0000000..3f03f8b
--- /dev/null
+++ b/software_license
@@ -0,0 +1,680 @@
+This software is Copyright (c) 2013 by Wellcome Trust Sanger Institute.
+
+This is free software, licensed under:
+
+ The GNU General Public License, Version 3, June 2007
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/t/Bio/Tradis/AddTagsToSeq.t b/t/Bio/Tradis/AddTagsToSeq.t
new file mode 100644
index 0000000..030acc6
--- /dev/null
+++ b/t/Bio/Tradis/AddTagsToSeq.t
@@ -0,0 +1,97 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use File::Temp;
+use File::Slurp;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+BEGIN {
+ use Test::Most;
+ use_ok('Bio::Tradis::AddTagsToSeq');
+}
+my $samtools_exec = 'samtools';
+
+my $destination_directory_obj = File::Temp->newdir( CLEANUP => 1 );
+my $destination_directory = $destination_directory_obj->dirname();
+
+my ( $bamfile, $obj );
+
+$bamfile = "t/data/AddTags/sample_sm_tr.bam";
+
+ok(
+ $obj = Bio::Tradis::AddTagsToSeq->new(
+ bamfile => $bamfile,
+ script_name => 'name_of_script',
+ outfile => 't/data/output.bam'
+ ),
+ 'creating object'
+);
+
+is($obj->_output_switch, '-b', 'correctly select the bam output switch');
+
+ok( $obj->add_tags_to_seq, 'testing output' );
+ok( -e 't/data/output.bam', 'checking file existence' );
+`$samtools_exec view -h -o t/data/output.sam t/data/output.bam`;
+`$samtools_exec view -h -o t/data/AddTags/expected_tradis.sam t/data/AddTags/expected_tradis.bam`;
+is(
+ read_file('t/data/output.sam'),
+ read_file('t/data/AddTags/expected_tradis.sam'),
+ 'checking file contents'
+);
+
+
+$bamfile = "t/data/AddTags/sample_sm_no_tr.bam";
+ok(
+ $obj = Bio::Tradis::AddTagsToSeq->new(
+ bamfile => $bamfile,
+ script_name => 'name_of_script',
+ outfile => 't/data/output.bam'
+ ),
+ 'creating object'
+);
+ok( -e 't/data/output.bam', 'checking file existence' );
+`$samtools_exec view -h -o t/data/output.sam t/data/output.bam`;
+`$samtools_exec view -h -o t/data/AddTags/sample_sm_no_tr.sam t/data/AddTags/sample_sm_no_tr.bam`;
+is(
+ read_file('t/data/AddTags/sample_sm_no_tr.sam'),
+ read_file('t/data/output.sam'),
+ 'checking file contents'
+);
+
+is(
+ 6,
+ $obj->_number_of_lines_in_bam_file('t/data/AddTags/sample_sm_no_tr.bam'),
+ 'number of reads as expected'
+);
+
+my $cramfile = "t/data/AddTags/sample_sm_tr.cram";
+
+ok(
+ $obj = Bio::Tradis::AddTagsToSeq->new(
+ bamfile => $cramfile,
+ script_name => 'name_of_script',
+ outfile => 't/data/output.cram'
+ ),
+ 'creating object with cram file'
+);
+
+is($obj->_output_switch, '-C', 'correctly select the cram output switch');
+
+ok( $obj->add_tags_to_seq, 'testing output' );
+ok( -e 't/data/output.cram', 'checking file existence' );
+`$samtools_exec view -h -o t/data/output.sam t/data/output.cram`;
+`$samtools_exec view -h -o t/data/AddTags/expected_tradis.sam t/data/AddTags/expected_tradis.cram`;
+is(
+ read_file('t/data/output.sam'),
+ read_file('t/data/AddTags/expected_tradis.sam'),
+ 'checking file contents'
+);
+
+
+unlink('t/data/output.cram');
+unlink('t/data/output.bam');
+unlink('t/data/output.sam');
+unlink('t/data/AddTags/expected_tradis.sam');
+unlink('t/data/AddTags/sample_sm_no_tr.sam');
+done_testing();
diff --git a/t/Bio/Tradis/Analysis/InsertSite.t b/t/Bio/Tradis/Analysis/InsertSite.t
new file mode 100644
index 0000000..ba88fe8
--- /dev/null
+++ b/t/Bio/Tradis/Analysis/InsertSite.t
@@ -0,0 +1,115 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Data::Dumper;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+
+BEGIN {
+
+ use Test::Most;
+ use_ok('Bio::Tradis::Analysis::InsertSite');
+}
+
+ok my $insert_site_plots_from_bam = Bio::Tradis::Analysis::InsertSite->new(
+ filename => 't/data/InsertSite/small_multi_sequence.bam',
+ output_base_filename => 't/data/InsertSite/insert_site',
+ mapping_score => 0
+);
+ok $insert_site_plots_from_bam->create_plots();
+
+# parse output files and check they are okay
+ok is_input_string_found_on_given_line( "0 0", 1,
+ 't/data/InsertSite/insert_site.FN543502.insert_site_plot.gz' ),
+ 'check main sequence insert_site values first value';
+ok is_input_string_found_on_given_line( "0 2", 7899,
+ 't/data/InsertSite/insert_site.FN543502.insert_site_plot.gz' ),
+ 'check main sequence insert_site value before site';
+ok is_input_string_found_on_given_line( "0 12", 7915,
+ 't/data/InsertSite/insert_site.FN543502.insert_site_plot.gz' ),
+ 'check main sequence insert_site values for reverse reads only';
+ok is_input_string_found_on_given_line( "0 0", 249,
+ 't/data/InsertSite/insert_site.FN543502.insert_site_plot.gz' ),
+ 'various values';
+ok is_input_string_found_on_given_line( "1 0", 345,
+ 't/data/InsertSite/insert_site.FN543502.insert_site_plot.gz' ),
+ 'various values';
+ok is_input_string_found_on_given_line( "3 0", 354,
+ 't/data/InsertSite/insert_site.FN543502.insert_site_plot.gz' ),
+ 'various values';
+ok is_input_string_found_on_given_line( "1 0", 366,
+ 't/data/InsertSite/insert_site.FN543502.insert_site_plot.gz' ),
+ 'various values';
+ok is_input_string_found_on_given_line( "0 0", 513,
+ 't/data/InsertSite/insert_site.FN543502.insert_site_plot.gz' ),
+ 'various values';
+ok is_input_string_found_on_given_line( "0 0", 1,
+ 't/data/InsertSite/insert_site.pCROD1.insert_site_plot.gz' ),
+ 'check empty plasmid insert_site values first value';
+ok is_input_string_found_on_given_line( "0 0", 59,
+ 't/data/InsertSite/insert_site.pCROD1.insert_site_plot.gz' ),
+ 'check empty plasmid insert_site values last value';
+ok is_input_string_found_on_given_line( "0 0", 1,
+ 't/data/InsertSite/insert_site.pCROD2.insert_site_plot.gz' ),
+ 'check plasmid with 1 read insert_site values first value';
+ok is_input_string_found_on_given_line( "0 1", 143,
+ 't/data/InsertSite/insert_site.pCROD2.insert_site_plot.gz' ),
+ 'check plasmid with 1 read insert_site values first base of read';
+ok is_input_string_found_on_given_line( "0 0", 144,
+ 't/data/InsertSite/insert_site.pCROD2.insert_site_plot.gz' ),
+ 'check plasmid with 1 read insert_site values after last base of read';
+ok is_input_string_found_on_given_line( "0 0", 1000,
+ 't/data/InsertSite/insert_site.pCROD2.insert_site_plot.gz' ),
+ 'check plasmid with 1 read insert_site values last value';
+ok is_input_string_found_on_given_line( "0 0", 1,
+ 't/data/InsertSite/insert_site.pCROD3.insert_site_plot.gz' ),
+ 'check another empty plasmid insert_site values first value';
+ok is_input_string_found_on_given_line( "0 0", 100,
+ 't/data/InsertSite/insert_site.pCROD3.insert_site_plot.gz' ),
+ 'check another empty plasmid insert_site values last value';
+
+unlink("t/data/InsertSite/insert_site.FN543502.insert_site_plot.gz");
+unlink("t/data/InsertSite/insert_site.pCROD1.insert_site_plot.gz");
+unlink("t/data/InsertSite/insert_site.pCROD2.insert_site_plot.gz");
+unlink("t/data/InsertSite/insert_site.pCROD3.insert_site_plot.gz");
+
+
+
+ok $insert_site_plots_from_bam = Bio::Tradis::Analysis::InsertSite->new(
+ filename => 't/data/InsertSite/2_reads.bam',
+ output_base_filename => 't/data/InsertSite/2_reads_output',
+ mapping_score => 0
+);
+ok $insert_site_plots_from_bam->create_plots();
+ok is_input_string_found_on_given_line( "1 0", 100,
+ 't/data/InsertSite/2_reads_output.FN543502.insert_site_plot.gz' ),
+ 'check forward read';
+ ok is_input_string_found_on_given_line( "0 1", 153,
+ 't/data/InsertSite/2_reads_output.FN543502.insert_site_plot.gz' ),
+ 'check reverse read';
+unlink('t/data/InsertSite/2_reads_output.FN543502.insert_site_plot.gz');
+
+done_testing();
+
+sub is_input_string_found_on_given_line {
+ my ( $expected_string, $line_number, $filename ) = @_;
+ my $line_counter = 0;
+ open( IN, '-|', "gzip -dc " . $filename );
+ while (<IN>) {
+ chomp;
+ my $line = $_;
+ $line_counter++;
+ next unless ( $line_counter == $line_number );
+ last if ( $line_counter > $line_number );
+
+ if ( $expected_string eq $line ) { return 1; }
+ else {
+ print STDERR "Expected: "
+ . $expected_string
+ . "\t Got: "
+ . $line . "\n";
+ }
+ }
+ return 0;
+}
diff --git a/t/Bio/Tradis/CombinePlots.t b/t/Bio/Tradis/CombinePlots.t
new file mode 100644
index 0000000..65004be
--- /dev/null
+++ b/t/Bio/Tradis/CombinePlots.t
@@ -0,0 +1,120 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use File::Slurp;
+use Cwd;
+use File::Path qw( remove_tree );
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+BEGIN {
+ use Test::Most;
+ use Test::Files;
+ use_ok('Bio::Tradis::CombinePlots');
+}
+
+my ( $plotfile, $obj );
+
+$plotfile = "t/data/CombinePlots/comb_sample.txt";
+
+ok( $obj = Bio::Tradis::CombinePlots->new( plotfile => $plotfile ),
+ 'creating object' );
+
+ok( $obj->combine, 'combining plots' );
+ok(
+ -e 'combined/first.insert_site_plot.gz',
+ 'checking first combined plot file exists'
+);
+ok(
+ -e 'combined/second.insert_site_plot.gz',
+ 'checking second combined plot file exists'
+);
+ok(
+ -e 'comb_sample.stats',
+ 'checking stats file exists'
+);
+
+system("gunzip -c combined/first.insert_site_plot.gz > first.test.plot");
+is(
+ read_file('first.test.plot'),
+ read_file('t/data/CombinePlots/first.expected.plot'),
+ 'checking first file contents'
+);
+system("gunzip -c combined/second.insert_site_plot.gz > second.test.plot");
+is(
+ read_file('second.test.plot'),
+ read_file('t/data/CombinePlots/second.expected.plot'),
+ 'checking second file contents'
+);
+is(
+ read_file('comb_sample.stats'),
+ read_file('t/data/CombinePlots/comb_expected.stats'),
+ 'checking stats file contents'
+);
+
+#check with gzipped plots
+$plotfile = "t/data/CombinePlots/zip_comb_list.txt";
+
+ok( $obj = Bio::Tradis::CombinePlots->new( plotfile => $plotfile ),
+ 'creating object' );
+
+ok( $obj->combine, 'combining plots' );
+ok(
+ -e 'combined/zip_combined.insert_site_plot.gz',
+ 'checking first combined plot file exists'
+);
+ok(
+ -e 'combined/tabix_sorted.insert_site_plot.gz',
+ 'checking tabix sorted combined plot file exists'
+);
+
+ok(
+ -e 'combined/tabix_sorted.insert_site_plot.gz.tbi',
+ 'checking tabix index file exists'
+);
+
+
+system("gunzip -c combined/zip_combined.insert_site_plot.gz > zip_combined.test.plot");
+is(
+ read_file('zip_combined.test.plot'),
+ read_file('t/data/CombinePlots/zip_comb_exp.plot'),
+ 'checking zipped file contents'
+);
+is(
+ read_file('zip_comb_list.stats'),
+ read_file('t/data/CombinePlots/zip_comb_exp.stats'),
+ 'checking stats file contents'
+);
+
+# check custom directory name
+$plotfile = "t/data/CombinePlots/comb_sample.txt";
+ok( $obj = Bio::Tradis::CombinePlots->new(
+ plotfile => $plotfile,
+ combined_dir => 'comb_test'
+ ),
+ 'creating object'
+);
+
+ok( $obj->combine, 'combining plots' );
+ok( -d 'comb_test', 'checking directory exists' );
+ok(
+ -e 'comb_test/first.insert_site_plot.gz',
+ 'checking first combined plot file exists'
+);
+ok(
+ -e 'comb_test/second.insert_site_plot.gz',
+ 'checking second combined plot file exists'
+);
+
+cleanup_files();
+done_testing();
+
+sub cleanup_files {
+ unlink('first.test.plot');
+ unlink('second.test.plot');
+ unlink('zip_combined.test.plot');
+ unlink('comb_sample.stats');
+ unlink('zip_comb_list.stats');
+ remove_tree('combined');
+ remove_tree('comb_test');
+}
diff --git a/t/Bio/Tradis/CommandLine/TradisAnalysis.t b/t/Bio/Tradis/CommandLine/TradisAnalysis.t
new file mode 100644
index 0000000..fb10610
--- /dev/null
+++ b/t/Bio/Tradis/CommandLine/TradisAnalysis.t
@@ -0,0 +1,92 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Cwd;
+use File::Path 'rmtree';
+use File::Temp;
+use File::Slurp;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+
+BEGIN {
+ use Test::Most;
+ use Test::Exception;
+ use_ok('Bio::Tradis::CommandLine::TradisAnalysis');
+}
+
+# Tag which is found in both inputs
+my $output_directory_obj = File::Temp->newdir( 'tmp_TradisAnalysis_tests_XXXXX',
+ CLEANUP => 0,
+ DIR => cwd() );
+my $output_directory = $output_directory_obj->dirname;
+
+ok(
+ my $obj = Bio::Tradis::CommandLine::TradisAnalysis->new(
+ args => ['-f', 't/data/CommandLine/fastq.list', '-t',
+ "TAAGAGTCAG", '-r', "t/data/RunTradis/smallref.fa"],
+ script_name => 'bacteria_tradis_test',
+ _output_directory => $output_directory
+ ),
+ 'creating object'
+);
+
+ok( $obj->run, 'testing run' );
+
+open(STATS, "$output_directory/fastq.stats") or die "Could not open stats file";
+my $line_count = 0;
+while (<STATS>) { $line_count++; }
+is( $line_count, 3, "both files have reads with tag");
+rmtree($output_directory);
+
+# Only one file has a read with the given tag
+$output_directory_obj = File::Temp->newdir( 'tmp_TradisAnalysis_tests_XXXXX',
+ CLEANUP => 0,
+ DIR => cwd() );
+$output_directory = $output_directory_obj->dirname;
+
+$obj = Bio::Tradis::CommandLine::TradisAnalysis->new(
+ args => ['-f', 't/data/CommandLine/fastq.list', '-t',
+ "CGCACAGCCG", '-r', "t/data/RunTradis/smallref.fa"],
+ script_name => 'bacteria_tradis_test',
+ _output_directory => $output_directory
+);
+
+{
+ my $warning_counter = 0;
+ local $SIG{'__WARN__'} = sub { $warning_counter++; };
+ ok( $obj->run, 'testing run with tag only found in one fastq' );
+ is( $warning_counter, 1, "one warning raised" );
+}
+open(STATS, "$output_directory/fastq.stats") or die "Could not open stats file";
+$line_count = 0;
+while (<STATS>) { $line_count++; }
+is( $line_count, 2, "only one input fastq has reads with tag");
+rmtree($output_directory);
+
+# Neither fastq input has a read with the given tag
+$output_directory_obj = File::Temp->newdir( 'tmp_TradisAnalysis_tests_XXXXX',
+ CLEANUP => 0,
+ DIR => cwd() );
+$output_directory = $output_directory_obj->dirname;
+
+$obj = Bio::Tradis::CommandLine::TradisAnalysis->new(
+ args => ['-f', 't/data/CommandLine/fastq.list', '-t',
+ "AAAAAAAAAA", '-r', "t/data/RunTradis/smallref.fa"],
+ script_name => 'bacteria_tradis_test',
+ _output_directory => $output_directory
+);
+
+{
+ my $warning_counter = 0;
+ local $SIG{'__WARN__'} = sub { $warning_counter++; };
+ throws_ok {$obj->run} 'Bio::Tradis::Exception::TagFilterError', 'testing run without tag in either fastq';
+ is( $warning_counter, 2, "two warnings raised" );
+}
+open(STATS, "$output_directory/fastq.stats") or die "Could not open stats file";
+$line_count = 0;
+while (<STATS>) { $line_count++; }
+is( $line_count, 0, "neither input fastq has reads with tag");
+rmtree($output_directory);
+
+done_testing();
diff --git a/t/Bio/Tradis/DetectTags.t b/t/Bio/Tradis/DetectTags.t
new file mode 100644
index 0000000..fec94b8
--- /dev/null
+++ b/t/Bio/Tradis/DetectTags.t
@@ -0,0 +1,55 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use File::Temp;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+
+BEGIN {
+ use Test::Most;
+ use_ok('Bio::Tradis::DetectTags');
+}
+
+my $destination_directory_obj = File::Temp->newdir( CLEANUP => 1 );
+my $destination_directory = $destination_directory_obj->dirname();
+
+my ( $bamfile, $obj );
+
+$bamfile = "t/data/DetectTags/sample_sm_tr.bam";
+
+ok(
+ $obj = Bio::Tradis::DetectTags->new(
+ bamfile => $bamfile,
+ script_name => 'name_of_script'
+ ),
+ 'testing tag checker - tradis'
+);
+is( $obj->tags_present, 1, 'testing output' );
+
+
+my $cramfile = "t/data/DetectTags/sample_sm_tr.cram";
+
+ok(
+ $obj = Bio::Tradis::DetectTags->new(
+ bamfile => $cramfile,
+ script_name => 'name_of_script'
+ ),
+ 'testing tag checker for cram- tradis'
+);
+is( $obj->tags_present, 1, 'testing output cram' );
+
+
+
+$bamfile = "t/data/DetectTags/sample_sm_no_tr.bam";
+
+ok(
+ $obj = Bio::Tradis::DetectTags->new(
+ bamfile => $bamfile,
+ script_name => 'name_of_script'
+ ),
+ 'testing tag checker - no tradis'
+);
+is( $obj->tags_present, 0, 'testing output' );
+
+done_testing();
diff --git a/t/Bio/Tradis/FilterTags.t b/t/Bio/Tradis/FilterTags.t
new file mode 100644
index 0000000..3441ce0
--- /dev/null
+++ b/t/Bio/Tradis/FilterTags.t
@@ -0,0 +1,101 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use File::Temp;
+use File::Slurp;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+BEGIN {
+ use Test::Most;
+ use_ok('Bio::Tradis::FilterTags');
+}
+
+my $destination_directory_obj = File::Temp->newdir( CLEANUP => 1 );
+my $destination_directory = $destination_directory_obj->dirname();
+
+my ( $fastqfile, $tag, $obj );
+
+$fastqfile = "t/data/FilterTags/sample.fastq";
+$tag = "CAACGTTTT";
+
+ok(
+ $obj = Bio::Tradis::FilterTags->new(
+ fastqfile => $fastqfile,
+ tag => $tag,
+ mismatch => 0,
+ outfile => 'output.fastq'
+ ),
+ 'creating object'
+);
+ok( $obj->filter_tags, 'testing output' );
+ok( -e 'output.fastq', 'checking file existence' );
+is(
+ read_file('output.fastq'),
+ read_file('t/data/FilterTags/expected.caa.fastq'),
+ 'checking file contents'
+);
+
+# Test tag mismatch option
+ok(
+ $obj = Bio::Tradis::FilterTags->new(
+ fastqfile => $fastqfile,
+ tag => $tag,
+ mismatch => 1,
+ outfile => 'output.fastq'
+ ),
+ 'creating object'
+);
+ok( $obj->filter_tags, 'testing output' );
+ok( -e 'output.fastq', 'checking file existence' );
+is(
+ read_file('output.fastq'),
+ read_file('t/data/FilterTags/expected.1mm.caa.fastq'),
+ 'checking file contents'
+);
+
+# Different tag
+$tag = "TNAGAGACAG";
+
+ok(
+ $obj = Bio::Tradis::FilterTags->new(
+ fastqfile => $fastqfile,
+ tag => $tag,
+ mismatch => 0,
+ outfile => 'output.fastq'
+ ),
+ 'creating object'
+);
+ok( $obj->filter_tags, 'testing output' );
+ok( -e 'output.fastq', 'checking file existence' );
+is(
+ read_file('output.fastq'),
+ read_file('t/data/FilterTags/expected.tna.fastq'),
+ 'checking file contents'
+);
+
+# Gzipped input
+$fastqfile = "t/data/FilterTags/sample.fastq.gz";
+$tag = "CAACGTTTT";
+
+ok(
+ $obj = Bio::Tradis::FilterTags->new(
+ fastqfile => $fastqfile,
+ tag => $tag,
+ mismatch => 0,
+ outfile => 'output.fastq'
+ ),
+ 'creating object'
+);
+ok( $obj->filter_tags, 'testing output' );
+ok( -e 'output.fastq', 'checking file existence' );
+is(
+ read_file('output.fastq'),
+ read_file('t/data/FilterTags/expected.caa.fastq'),
+ 'checking file contents'
+);
+
+unlink('t/data/output.fastq');
+unlink('t/data/FilterTags/expected.caa.fastq');
+unlink('t/data/FilterTags/expected.tna.fastq');
+done_testing();
diff --git a/t/Bio/Tradis/Map.t b/t/Bio/Tradis/Map.t
new file mode 100644
index 0000000..c58161d
--- /dev/null
+++ b/t/Bio/Tradis/Map.t
@@ -0,0 +1,77 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use File::Temp;
+use File::Slurp;
+
+BEGIN {
+ unshift( @INC, '../lib' );
+ unshift( @INC, './lib' );
+}
+
+BEGIN {
+ use Test::Most;
+ use_ok('Bio::Tradis::Map');
+}
+
+my $destination_directory_obj = File::Temp->newdir( CLEANUP => 1 );
+my $destination_directory = $destination_directory_obj->dirname();
+
+my ( $fastqfile, $ref, $obj, $refname, $outfile );
+
+$fastqfile = "t/data/Map/test.fastq";
+$ref = "t/data/Map/smallref.fa";
+$refname = "t/data/Map/test.ref";
+$outfile = "t/data/Map/mapped.out";
+
+ok(
+ $obj = Bio::Tradis::Map->new(
+ fastqfile => $fastqfile,
+ reference => $ref,
+ refname => $refname,
+ outfile => $outfile
+ ),
+ 'creating object'
+);
+ok( $obj->index_ref, 'testing reference indexing' );
+ok( -e 't/data/Map/test.ref.sma', 'checking index file existence' );
+ok( -e 't/data/Map/test.ref.smi', 'checking index file existence' );
+
+ok( $obj->do_mapping, 'testing reference indexing' );
+ok( -e 't/data/Map/mapped.out', 'checking index file existence' );
+system("grep -v ^\@ t/data/Map/mapped.out > mapped.nohead.out");
+system("grep -v ^\@ t/data/Map/expected.mapped > expected.nohead.mapped");
+is(
+ read_file('mapped.nohead.out'),
+ read_file('expected.nohead.mapped'),
+ 'checking file contents'
+);
+
+# test optional smalt parameters
+ok(
+ $obj = Bio::Tradis::Map->new(
+ fastqfile => $fastqfile,
+ reference => $ref,
+ refname => $refname,
+ outfile => $outfile,
+ smalt_k => 10,
+ smalt_s => 10,
+ smalt_y => 0.9
+ ),
+ 'creating object'
+);
+
+my $index_cmd = $obj->index_ref;
+my $index_exp = "smalt index -k 10 -s 10 $refname $ref > /dev/null 2>&1";
+is( $index_cmd, $index_exp, "indexing args correct" );
+
+my $map_cmd = $obj->do_mapping;
+my $map_exp = "smalt map -n 1 -x -r -1 -y 0.9 $refname $fastqfile 1> $outfile 2> smalt.stderr";
+is( $map_cmd, $map_exp, "mapping args correct" );
+
+
+
+unlink('t/data/Map/test.ref.sma');
+unlink('t/data/Map/test.ref.smi');
+unlink('t/data/Map/mapped.out');
+done_testing();
diff --git a/t/Bio/Tradis/Parser/Bam.t b/t/Bio/Tradis/Parser/Bam.t
new file mode 100644
index 0000000..ce9f743
--- /dev/null
+++ b/t/Bio/Tradis/Parser/Bam.t
@@ -0,0 +1,105 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use File::Temp;
+use File::Slurp;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+
+BEGIN {
+ use Test::Most;
+ use_ok('Bio::Tradis::Parser::Bam');
+}
+
+my ( $obj, $bamfile );
+
+$bamfile = "t/data/Parsers/test.bam";
+
+ok(
+ $obj = Bio::Tradis::Parser::Bam->new(
+ file => $bamfile,
+ ),
+ 'creating object'
+);
+isa_ok $obj, 'Bio::Tradis::Parser::Bam';
+
+# Test sequence info
+my %si = $obj->seq_info;
+is ref( \%si ), 'HASH', 'seq_info returns a hash';
+
+# Test reading first result
+is $obj->next_read, 1, 'first result detected';
+my $read_info = $obj->read_info;
+is_deeply $read_info,
+ {
+ QNAME => 'MS5_9521:1:1101:10072:14269#14',
+ FLAG => '16',
+ BINARY_FLAG => '10000',
+ RNAME => 'ENA|AE004091|AE004091.2',
+ POS => '5',
+ MAPQ => '37',
+ CIGAR => '50M',
+ RNEXT => '*',
+ PNEXT => '0',
+ TLEN => '0',
+ SEQ => 'AAGAGACCGGCGATTCTAGTGAAATCGAACGGGCAGGTCAATTTCCAACC',
+ QUAL => 'HHHGGGGGGGHHHHHHHHHHHGHHHGHHGGGGGGGGGGFFFBFFCBAABA',
+ X0 => '1',
+ X1 => '0',
+ BC => 'TCTCGGTT',
+ MD => '50',
+ RG => '1#14',
+ XG => '0',
+ NM => '0',
+ XM => '0',
+ XO => '0',
+ QT => 'BBCDECBC',
+ XT => 'U',
+ tq => 'CCCBBFFFFF',
+ tr => 'TAAGAGTCAG',
+ READ => 'MS5_9521:1:1101:10072:14269#14 16 ENA|AE004091|AE004091.2 5 37 50M * 0 0 AAGAGACCGGCGATTCTAGTGAAATCGAACGGGCAGGTCAATTTCCAACC HHHGGGGGGGHHHHHHHHHHHGHHHGHHGGGGGGGGGGFFFBFFCBAABA X0:i:1 X1:i:0 BC:Z:TCTCGGTT MD:Z:50 RG:Z:1#14 XG:i:0 NM:i:0 XM:i:0 XO:i:0 QT:Z:BBCDECBC XT:A:U tq:Z:CCCBBFFFFF tr:Z:TAAGAGTCAG'
+ },
+ 'read_info contains correct info for first line';
+
+is $obj->is_mapped, 1, 'testing flag parsing - mapped';
+is $obj->is_reverse, 1, 'testing flag parsing - reverse complement';
+
+# Test reading second/last result
+is $obj->next_read, 1, 'last result detected';
+$read_info = $obj->read_info;
+is_deeply $read_info,
+ {
+ QNAME => 'MS5_9521:1:1103:26809:18585#14',
+ FLAG => '1040',
+ BINARY_FLAG => '10000010000',
+ RNAME => 'ENA|AE004091|AE004091.2',
+ POS => '23',
+ MAPQ => '37',
+ CIGAR => '50M',
+ RNEXT => '*',
+ PNEXT => '0',
+ TLEN => '0',
+ SEQ => 'GTGAAATCGAACGGGCAGGTCAATTTCCAACCAGCGATGACGTAATAGAT',
+ QUAL => '5FGGHHGEGHFEHHHHHGFHHGHGGHGFGGFCGEGBBAFC?DFFFBBBB3',
+ X0 => '1',
+ X1 => '0',
+ BC => 'TCTCGGTT',
+ MD => '50',
+ RG => '1#14',
+ XG => '0',
+ NM => '0',
+ XM => '0',
+ XO => '0',
+ QT => 'CCCCCCCC',
+ XT => 'U',
+ tq => 'BCCCCFFFFF',
+ tr => 'TAAGAGTCAG',
+ READ => 'MS5_9521:1:1103:26809:18585#14 1040 ENA|AE004091|AE004091.2 23 37 50M * 0 0 GTGAAATCGAACGGGCAGGTCAATTTCCAACCAGCGATGACGTAATAGAT 5FGGHHGEGHFEHHHHHGFHHGHGGHGFGGFCGEGBBAFC?DFFFBBBB3 X0:i:1 X1:i:0 BC:Z:TCTCGGTT MD:Z:50 RG:Z:1#14 XG:i:0 NM:i:0 XM:i:0 XO:i:0 QT:Z:CCCCCCCC XT:A:U tq:Z:BCCCCFFFFF tr:Z:TAAGAGTCAG'
+ },
+ 'read_info contains correct info for last line';
+
+# Ensure end of file is detected
+is $obj->next_read, 0, 'EOF detected';
+
+done_testing();
diff --git a/t/Bio/Tradis/Parser/Cigar.t b/t/Bio/Tradis/Parser/Cigar.t
new file mode 100755
index 0000000..f6a4d78
--- /dev/null
+++ b/t/Bio/Tradis/Parser/Cigar.t
@@ -0,0 +1,84 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use File::Temp;
+use File::Slurp;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+
+BEGIN {
+ use Test::Most;
+ use_ok('Bio::Tradis::Parser::Cigar');
+}
+
+my ( $obj, $fastqfile );
+
+my @cigar_tests = (
+ {
+ name => 'all matching',
+ cigar => '100M',
+ coord => 100,
+ start => 100,
+ end => 199,
+ },
+ {
+ name => 'nothing matching',
+ cigar => '*',
+ coord => 1000,
+ start => 0,
+ end => 0,
+ },
+ {
+ name => 'soft clipping at start',
+ cigar => '10S90M',
+ coord => 100,
+ start => 110,
+ end => 199,
+ },
+ {
+ name => 'soft clipping at end',
+ cigar => '90M10S',
+ coord => 100,
+ start => 100,
+ end => 189,
+ },
+ {
+ name => 'soft clipping at both ends',
+ cigar => '10S80M10S',
+ coord => 100,
+ start => 110,
+ end => 189,
+ },
+ {
+ name => 'deletion in middle',
+ 'cigar' => '20M1D80M',
+ 'coord' => 20,
+ 'end' => 120,
+ 'start' => 20
+ },
+ {
+ name => 'insertions and deletions',
+ 'cigar' => '27M1I6M1D66M',
+ 'coord' => 46,
+ 'end' => 145,
+ 'start' => 46
+ },
+ {
+ name => 'insertions in the middle',
+ 'cigar' => '90M1I9M',
+ 'coord' => 80,
+ 'end' => 178,
+ 'start' => 80
+ }
+
+);
+
+for my $cigar_test (@cigar_tests) {
+ ok( $obj = Bio::Tradis::Parser::Cigar->new( coordinate => $cigar_test->{coord}, cigar => $cigar_test->{cigar} ),
+ 'initialise obj -' . $cigar_test->{name} );
+ is( $obj->start, $cigar_test->{start}, 'read start -' . $cigar_test->{name} );
+ is( $obj->end, $cigar_test->{end}, 'read end -' . $cigar_test->{name} );
+}
+
+done_testing();
diff --git a/t/Bio/Tradis/Parser/Fastq.t b/t/Bio/Tradis/Parser/Fastq.t
new file mode 100644
index 0000000..5452d25
--- /dev/null
+++ b/t/Bio/Tradis/Parser/Fastq.t
@@ -0,0 +1,52 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use File::Temp;
+use File::Slurp;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+
+BEGIN {
+ use Test::Most;
+ use_ok('Bio::Tradis::Parser::Fastq');
+}
+
+my ( $obj, $fastqfile );
+
+$fastqfile = "t/data/Parsers/test.fastq";
+
+ok(
+ $obj = Bio::Tradis::Parser::Fastq->new(
+ file => $fastqfile,
+ ),
+ 'creating object'
+);
+isa_ok $obj, 'Bio::Tradis::Parser::Fastq';
+
+# Test reading first result
+is $obj->next_read, 1, 'first result detected';
+my @read_info = $obj->read_info;
+is_deeply \@read_info,
+ [
+ 'HS21_09876:1:1105:9650:48712#83',
+ 'TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG',
+ 'CCCFFFFFHHHHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF'
+ ],
+ 'read_info contains correct info for first line';
+
+# Test reading second/last result
+is $obj->next_read, 1, 'last result detected';
+ at read_info = $obj->read_info;
+is_deeply \@read_info,
+ [
+ 'HS21_09876:1:1106:8638:38957#83',
+ 'TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG',
+ 'B at CFFFFFHHHHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD'
+ ],
+ 'read_info contains correct info for last line';
+
+# Ensure end of file is detected
+is $obj->next_read, 0, 'EOF detected';
+
+done_testing();
diff --git a/t/Bio/Tradis/RemoveTags.t b/t/Bio/Tradis/RemoveTags.t
new file mode 100644
index 0000000..f2289c9
--- /dev/null
+++ b/t/Bio/Tradis/RemoveTags.t
@@ -0,0 +1,82 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use File::Temp;
+use File::Slurp;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+
+BEGIN {
+ use Test::Most;
+ use_ok('Bio::Tradis::RemoveTags');
+}
+
+my $destination_directory_obj = File::Temp->newdir( CLEANUP => 1 );
+my $destination_directory = $destination_directory_obj->dirname();
+
+my ( $fastqfile, $tag, $obj );
+
+$fastqfile = "t/data/RemoveTags/sample.caa.fastq";
+$tag = "CAACGTTTT";
+
+# Test without mismatch option
+ok(
+ $obj = Bio::Tradis::RemoveTags->new(
+ fastqfile => $fastqfile,
+ tag => $tag,
+ mismatch => 0,
+ outfile => 't/data/output.fastq'
+ ),
+ 'creating object'
+);
+ok( $obj->remove_tags, 'testing output' );
+ok( -e 't/data/output.fastq', 'checking file existence' );
+is(
+ read_file('t/data/output.fastq'),
+ read_file('t/data/RemoveTags/expected.rm.caa.fastq'),
+ 'checking file contents'
+);
+
+# Test with 1 mismatch allowed
+ok(
+ $obj = Bio::Tradis::RemoveTags->new(
+ fastqfile => $fastqfile,
+ tag => $tag,
+ mismatch => 1,
+ outfile => 't/data/output.fastq'
+ ),
+ 'creating object'
+);
+ok( $obj->remove_tags, 'testing output' );
+ok( -e 't/data/output.fastq', 'checking file existence' );
+is(
+ read_file('t/data/output.fastq'),
+ read_file('t/data/RemoveTags/expected.rm.1mm.caa.fastq'),
+ 'checking file contents'
+);
+
+$fastqfile = "t/data/RemoveTags/sample.tna.fastq";
+$tag = "TNAGAGACAG";
+
+ok(
+ $obj = Bio::Tradis::RemoveTags->new(
+ fastqfile => $fastqfile,
+ tag => $tag,
+ mismatch => 0,
+ outfile => 't/data/output.fastq'
+ ),
+ 'creating object'
+);
+ok( $obj->remove_tags, 'testing output' );
+ok( -e 't/data/output.fastq', 'checking file existence' );
+is(
+ read_file('t/data/output.fastq'),
+ read_file('t/data/RemoveTags/expected.rm.tna.fastq'),
+ 'checking file contents'
+);
+
+unlink('t/data/output.fastq');
+unlink('t/data/RemoveTags/expected.rm.caa.fastq');
+unlink('t/data/RemoveTags/expected.rm.tna.fastq');
+done_testing();
diff --git a/t/Bio/Tradis/RunTradis.t b/t/Bio/Tradis/RunTradis.t
new file mode 100644
index 0000000..3e78f03
--- /dev/null
+++ b/t/Bio/Tradis/RunTradis.t
@@ -0,0 +1,261 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Cwd;
+use File::Path 'rmtree';
+use File::Temp;
+use File::Slurp;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+
+BEGIN {
+ use Test::Most;
+ use Test::Exception;
+ use_ok('Bio::Tradis::RunTradis');
+}
+
+my $output_directory_obj = File::Temp->newdir( 'tmp_run_tradis_tests_XXXXX',
+ CLEANUP => 0,
+ DIR => cwd() );
+my $output_directory = $output_directory_obj->dirname;
+my $temp_directory_obj = File::Temp->newdir( CLEANUP => 0,
+ DIR => $output_directory );
+my $temp_directory = $temp_directory_obj->dirname();
+
+my ( $obj, $fastqfile, $stats_handle, $ref, $tag, $outfile );
+
+# First, test all parts and complete pipeline without mismatch
+
+$fastqfile = "t/data/RunTradis/test.tagged.fastq";
+$ref = "t/data/RunTradis/smallref.fa";
+$tag = "TAAGAGTCAG";
+$outfile = "test.plot";
+open( $stats_handle, '>', "$output_directory/test.stats" );
+
+ok(
+ $obj = Bio::Tradis::RunTradis->new(
+ fastqfile => $fastqfile,
+ reference => $ref,
+ tag => $tag,
+ outfile => $outfile,
+ output_directory => $output_directory,
+ _temp_directory => $temp_directory,
+ _stats_handle => $stats_handle
+ ),
+ 'creating object - Normal files, no mismatch'
+);
+
+# Filtering step
+ok( $obj->_filter, 'testing filtering step' );
+ok(
+ -e "$temp_directory/filter.fastq",
+ 'checking filtered file existence - Normal files, no mismatch'
+);
+is(
+ read_file("$temp_directory/filter.fastq"),
+ read_file('t/data/RunTradis/filtered.fastq'),
+ 'checking filtered file contents - Normal files, no mismatch'
+);
+
+# Check filtering step
+ok( $obj->_check_filter, 'testing check filtering step' );
+system("mv $temp_directory/filter.fastq $temp_directory/filter.fastq.bak");
+throws_ok {$obj->_check_filter} 'Bio::Tradis::Exception::TagFilterError', 'complain if no filtered reads';
+system("touch $temp_directory/filter.fastq");
+throws_ok {$obj->_check_filter} 'Bio::Tradis::Exception::TagFilterError', 'complain if filtered reads are empty';
+system("echo foo > $temp_directory/filter.fastq");
+throws_ok {$obj->_check_filter} 'Bio::Tradis::Exception::TagFilterError', 'complain if filtered reads has less than 4 lines';
+system("echo 'foo\nbar\nbaz\nquux' > $temp_directory/filter.fastq");
+throws_ok {$obj->_check_filter} 'Bio::Tradis::Exception::TagFilterError', 'complain if filtered reads do not look like a fastq';
+system("echo 'foo\nbar\n+' > $temp_directory/filter.fastq");
+throws_ok {$obj->_check_filter} 'Bio::Tradis::Exception::TagFilterError', 'complain if filtered reads are too short';
+system("echo 'foo\nbar\n+\nquux' > $temp_directory/filter.fastq");
+ok( $obj->_check_filter, 'check very basic filtered reads validation');
+system("mv $temp_directory/filter.fastq.bak $temp_directory/filter.fastq");
+
+# Tag removal
+ok( $obj->_remove, 'testing tag removal' );
+ok( -e "$temp_directory/tags_removed.fastq",
+ 'checking de-tagged file existence - Normal files, no mismatch' );
+is(
+ read_file("$temp_directory/tags_removed.fastq"),
+ read_file('t/data/RunTradis/notags.fastq'),
+ 'checking de-tagged file contents - Normal files, no mismatch'
+);
+
+# Mapping
+ok( $obj->_map, 'testing mapping' );
+ok( -e "$temp_directory/mapped.sam", 'checking SAM existence' );
+`grep -v "\@PG" $temp_directory/mapped.sam > $output_directory/tmp1.sam`;
+`grep -v "\@PG" t/data/RunTradis/mapped.sam > $output_directory/tmp2.sam`;
+is( read_file("$output_directory/tmp1.sam"), read_file("$output_directory/tmp2.sam"),
+ 'checking mapped file contents' );
+
+# Conversion
+ok( $obj->_sam2bam, 'testing SAM/BAM conversion' );
+ok( -e "$temp_directory/mapped.bam", 'checking BAM existence' );
+
+# Sorting
+ok( $obj->_sort_bam, 'testing BAM sorting' );
+ok( -e "$temp_directory/mapped.sort.bam",
+ 'checking sorted BAM existence - Normal files, no mismatch' );
+ok( -e "$temp_directory/mapped.sort.bam.bai",
+ 'checking indexed BAM existence - Normal files, no mismatch' );
+
+#Bamcheck
+ok( $obj->_bamcheck, 'testing bamcheck' );
+ok( -e "$temp_directory/mapped.bamcheck",
+ 'checking bamcheck file existence - Normal files, no mismatch' );
+
+# Plot
+ok( $obj->_make_plot, 'testing plotting' );
+ok( -e "$temp_directory/test.plot.AE004091.insert_site_plot.gz",
+ 'checking plot file existence - Normal files, no mismatch' );
+system(
+"gunzip -c $temp_directory/test.plot.AE004091.insert_site_plot.gz > $output_directory/test.plot.unzipped"
+);
+system("gunzip -c t/data/RunTradis/expected.plot.gz > $output_directory/expected.plot.unzipped");
+is(
+ read_file("$output_directory/test.plot.unzipped"),
+ read_file("$output_directory/expected.plot.unzipped"),
+ 'checking plot file contents - Normal files, no mismatch'
+);
+
+
+# Complete pipeline
+ok( $obj->run_tradis, 'testing complete analysis - Normal files, no mismatch' );
+ok( -e "$output_directory/test.plot.AE004091.insert_site_plot.gz",
+ 'checking plot file existence - Normal files, no mismatch' );
+system("gunzip -c $output_directory/test.plot.AE004091.insert_site_plot.gz > $output_directory/test.plot.unzipped");
+system("gunzip -c t/data/RunTradis/expected.plot.gz > $output_directory/expected.plot.unzipped");
+is(
+ read_file("$output_directory/test.plot.unzipped"),
+ read_file("$output_directory/expected.plot.unzipped"),
+ 'checking completed pipeline file contents - Normal files, no mismatch'
+);
+
+unlink("$temp_directory/filter.fastq");
+unlink("$temp_directory/tags_removed.fastq");
+
+unlink("$output_directory/test.plot.AE004091.insert_site_plot.gz");
+unlink("$output_directory/expected.plot.unzipped");
+unlink("$output_directory/test.plot.unzipped");
+
+# Test complete pipeline with 1 mismatch allowed
+
+$temp_directory_obj = File::Temp->newdir( CLEANUP => 0,
+ DIR => $output_directory );
+$temp_directory = $temp_directory_obj->dirname();
+
+ok(
+ $obj = Bio::Tradis::RunTradis->new(
+ fastqfile => $fastqfile,
+ reference => $ref,
+ tag => $tag,
+ outfile => $outfile,
+ mismatch => 1,
+ output_directory => $output_directory,
+ _temp_directory => $temp_directory,
+ _stats_handle => $stats_handle
+ ),
+ 'creating object - Normal files one mismatch'
+);
+
+ok( $obj->run_tradis, 'testing complete analysis with mismatch' );
+ok( -e "$output_directory/test.plot.AE004091.insert_site_plot.gz",
+ 'checking plot file existence - Normal files one mismatch' );
+system("gunzip -c $output_directory/test.plot.AE004091.insert_site_plot.gz > $output_directory/test.plot.unzipped");
+system(
+ "gunzip -c t/data/RunTradis/expected.1mm.plot.gz > $output_directory/expected.plot.unzipped");
+is(
+ read_file("$output_directory/test.plot.unzipped"),
+ read_file("$output_directory/expected.plot.unzipped"),
+ 'checking completed pipeline with mismatch file contents - Normal files one mismatch'
+);
+
+unlink("$output_directory/tmp1.sam");
+unlink("$output_directory/tmp2.sam");
+unlink("$output_directory/test.plot.AE004091.insert_site_plot.gz");
+unlink("$output_directory/expected.plot.unzipped");
+unlink("$output_directory/test.plot.unzipped");
+
+# Test pipeline with gzipped input
+$temp_directory_obj = File::Temp->newdir( CLEANUP => 0,
+ DIR => $output_directory );
+$temp_directory = $temp_directory_obj->dirname();
+$fastqfile = "t/data/RunTradis/test.tagged.fastq.gz";
+ok(
+ $obj = Bio::Tradis::RunTradis->new(
+ fastqfile => $fastqfile,
+ reference => $ref,
+ tag => $tag,
+ outfile => $outfile,
+ output_directory => $output_directory,
+ _temp_directory => $temp_directory,
+ _stats_handle => $stats_handle
+ ),
+ 'creating object with gzipped data - Normal files one mismatch'
+);
+
+ok( $obj->run_tradis, 'testing complete analysis with gzipped data' );
+ok(
+ -e "$output_directory/test.plot.AE004091.insert_site_plot.gz",
+ 'checking plot file existence (gzipped data) - Normal files one mismatch'
+);
+ok( -e "$output_directory/test.plot.mapped.bam", 'checking mapped bam existence - Normal files one mismatch');
+ok( -e "$output_directory/test.plot.mapped.bam.bai", 'checking indexed bam file - Normal files one mismatch');
+
+system("gunzip -c $output_directory/test.plot.AE004091.insert_site_plot.gz > $output_directory/test.plot.unzipped");
+system("gunzip -c t/data/RunTradis/expected.plot.gz > $output_directory/expected.plot.unzipped");
+is(
+ read_file("$output_directory/test.plot.unzipped"),
+ read_file("$output_directory/expected.plot.unzipped"),
+ 'checking completed pipeline with gzipped data file contents - Normal files one mismatch'
+);
+
+# Test mapping stage with custom smalt parameters
+$temp_directory_obj = File::Temp->newdir( CLEANUP => 0,
+ DIR => $output_directory );
+$temp_directory = $temp_directory_obj->dirname();
+ok(
+ $obj = Bio::Tradis::RunTradis->new(
+ fastqfile => $fastqfile,
+ reference => $ref,
+ tag => $tag,
+ outfile => $outfile,
+ output_directory => $output_directory,
+ _temp_directory => $temp_directory,
+ _stats_handle => $stats_handle,
+ smalt_k => 10,
+ smalt_s => 2
+ ),
+ 'creating object with custom smalt parameters'
+);
+# Filtering step
+$obj->_filter;
+$obj->_remove;
+ok( $obj->_map, 'mapping with custom parameters fine' );
+
+# Check die if ref is not found
+$temp_directory_obj = File::Temp->newdir( CLEANUP => 0,
+ DIR => $output_directory );
+$temp_directory = $temp_directory_obj->dirname();
+ok(
+ $obj = Bio::Tradis::RunTradis->new(
+ fastqfile => $fastqfile,
+ reference => "not_really_a_ref.fa",
+ tag => $tag,
+ outfile => $outfile,
+ output_directory => $output_directory,
+ _temp_directory => $temp_directory,
+ _stats_handle => $stats_handle,
+ smalt_k => 10,
+ smalt_s => 2
+ ),
+ 'creating object with custom smalt parameters'
+);
+throws_ok {$obj->run_tradis} 'Bio::Tradis::Exception::RefNotFound', 'correct error thrown';
+
+rmtree($output_directory);
+done_testing();
diff --git a/t/Bio/Tradis/TradisPlot.t b/t/Bio/Tradis/TradisPlot.t
new file mode 100644
index 0000000..6efe43a
--- /dev/null
+++ b/t/Bio/Tradis/TradisPlot.t
@@ -0,0 +1,43 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use File::Temp;
+use File::Slurp;
+use Test::Files;
+
+BEGIN { unshift( @INC, './lib' ) }
+BEGIN { unshift( @INC, '../lib' ) }
+
+BEGIN {
+ use Test::Most;
+ use_ok('Bio::Tradis::TradisPlot');
+}
+
+my $destination_directory_obj = File::Temp->newdir( CLEANUP => 1 );
+my $destination_directory = $destination_directory_obj->dirname();
+
+my ( $mappedfile, $obj, $outfile );
+
+$mappedfile = "t/data/TradisPlot/test.mapped.bam";
+$outfile = "test.plot";
+
+ok(
+ $obj = Bio::Tradis::TradisPlot->new(
+ mappedfile => $mappedfile,
+ outfile => $outfile,
+ mapping_score => 30
+ ),
+ 'creating object'
+);
+
+ok( $obj->plot, 'testing plotting' );
+ok( -e 'test.plot.AE004091.insert_site_plot.gz',
+ 'checking plot file existence' );
+
+system("gunzip -c test.plot.AE004091.insert_site_plot.gz > test.plot.unzipped");
+system("gunzip -c t/data/TradisPlot/expected.plot.gz > expected.plot.unzipped");
+compare_ok('test.plot.unzipped','expected.plot.unzipped','checking file contents');
+
+unlink('test.plot.AE004091.insert_site_plot.gz');
+unlink('expected.plot.unzipped');
+done_testing();
diff --git a/t/data/AddTags/expected_tradis.bam b/t/data/AddTags/expected_tradis.bam
new file mode 100644
index 0000000..b51b1b8
Binary files /dev/null and b/t/data/AddTags/expected_tradis.bam differ
diff --git a/t/data/AddTags/expected_tradis.cram b/t/data/AddTags/expected_tradis.cram
new file mode 100644
index 0000000..4d3f44d
Binary files /dev/null and b/t/data/AddTags/expected_tradis.cram differ
diff --git a/t/data/AddTags/sample_sm_no_tr.bam b/t/data/AddTags/sample_sm_no_tr.bam
new file mode 100644
index 0000000..b51b1b8
Binary files /dev/null and b/t/data/AddTags/sample_sm_no_tr.bam differ
diff --git a/t/data/AddTags/sample_sm_tr.bam b/t/data/AddTags/sample_sm_tr.bam
new file mode 100644
index 0000000..1904961
Binary files /dev/null and b/t/data/AddTags/sample_sm_tr.bam differ
diff --git a/t/data/AddTags/sample_sm_tr.cram b/t/data/AddTags/sample_sm_tr.cram
new file mode 100644
index 0000000..a47880b
Binary files /dev/null and b/t/data/AddTags/sample_sm_tr.cram differ
diff --git a/t/data/CombinePlots/comb_expected.stats b/t/data/CombinePlots/comb_expected.stats
new file mode 100644
index 0000000..22b1b25
--- /dev/null
+++ b/t/data/CombinePlots/comb_expected.stats
@@ -0,0 +1,3 @@
+ID,Sequence Length,Unique Insertion Sites,Seq Len/UIS
+first,20,10,2
+second,25,5,5
diff --git a/t/data/CombinePlots/comb_sample.txt b/t/data/CombinePlots/comb_sample.txt
new file mode 100644
index 0000000..b798920
--- /dev/null
+++ b/t/data/CombinePlots/comb_sample.txt
@@ -0,0 +1,2 @@
+first test1.plot test2.plot
+second test3.plot test4.plot
\ No newline at end of file
diff --git a/t/data/CombinePlots/first.expected.plot b/t/data/CombinePlots/first.expected.plot
new file mode 100644
index 0000000..48fe1ef
--- /dev/null
+++ b/t/data/CombinePlots/first.expected.plot
@@ -0,0 +1,20 @@
+0 1
+3 0
+0 0
+0 0
+0 4
+1 0
+0 0
+0 6
+0 0
+3 0
+0 0
+0 0
+2 0
+1 0
+0 0
+0 7
+0 0
+0 0
+0 0
+10 1
\ No newline at end of file
diff --git a/t/data/CombinePlots/sample1.sm.plot.gz b/t/data/CombinePlots/sample1.sm.plot.gz
new file mode 100644
index 0000000..b2fa361
Binary files /dev/null and b/t/data/CombinePlots/sample1.sm.plot.gz differ
diff --git a/t/data/CombinePlots/sample2.sm.plot.gz b/t/data/CombinePlots/sample2.sm.plot.gz
new file mode 100644
index 0000000..c9ac95a
Binary files /dev/null and b/t/data/CombinePlots/sample2.sm.plot.gz differ
diff --git a/t/data/CombinePlots/second.expected.plot b/t/data/CombinePlots/second.expected.plot
new file mode 100644
index 0000000..0429a13
--- /dev/null
+++ b/t/data/CombinePlots/second.expected.plot
@@ -0,0 +1,25 @@
+0 0
+0 0
+0 0
+2 0
+0 0
+0 0
+0 1
+0 0
+0 0
+0 0
+0 0
+0 0
+0 7
+1 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+9 0
+0 0
+0 0
+0 0
\ No newline at end of file
diff --git a/t/data/CombinePlots/tabix_sorted.insert_site_plot.gz b/t/data/CombinePlots/tabix_sorted.insert_site_plot.gz
new file mode 100644
index 0000000..247fd41
Binary files /dev/null and b/t/data/CombinePlots/tabix_sorted.insert_site_plot.gz differ
diff --git a/t/data/CombinePlots/tabix_sorted.insert_site_plot.gz.tbi b/t/data/CombinePlots/tabix_sorted.insert_site_plot.gz.tbi
new file mode 100644
index 0000000..d03f7b7
Binary files /dev/null and b/t/data/CombinePlots/tabix_sorted.insert_site_plot.gz.tbi differ
diff --git a/t/data/CombinePlots/test1.plot b/t/data/CombinePlots/test1.plot
new file mode 100644
index 0000000..1272c23
--- /dev/null
+++ b/t/data/CombinePlots/test1.plot
@@ -0,0 +1,20 @@
+0 0
+1 0
+0 0
+0 0
+0 2
+0 0
+0 0
+0 0
+0 0
+3 0
+0 0
+0 0
+1 0
+1 0
+0 0
+0 7
+0 0
+0 0
+0 0
+10 0
\ No newline at end of file
diff --git a/t/data/CombinePlots/test2.plot b/t/data/CombinePlots/test2.plot
new file mode 100644
index 0000000..d7fdc26
--- /dev/null
+++ b/t/data/CombinePlots/test2.plot
@@ -0,0 +1,20 @@
+0 1
+2 0
+0 0
+0 0
+0 2
+1 0
+0 0
+0 6
+0 0
+0 0
+0 0
+0 0
+1 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 1
\ No newline at end of file
diff --git a/t/data/CombinePlots/test3.plot b/t/data/CombinePlots/test3.plot
new file mode 100644
index 0000000..db4ef1e
--- /dev/null
+++ b/t/data/CombinePlots/test3.plot
@@ -0,0 +1,25 @@
+0 0
+0 0
+0 0
+1 0
+0 0
+0 0
+0 1
+0 0
+0 0
+0 0
+0 0
+0 0
+0 2
+1 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
\ No newline at end of file
diff --git a/t/data/CombinePlots/test4.plot b/t/data/CombinePlots/test4.plot
new file mode 100644
index 0000000..280a058
--- /dev/null
+++ b/t/data/CombinePlots/test4.plot
@@ -0,0 +1,25 @@
+0 0
+0 0
+0 0
+1 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 5
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+9 0
+0 0
+0 0
+0 0
\ No newline at end of file
diff --git a/t/data/CombinePlots/zip_comb_exp.plot b/t/data/CombinePlots/zip_comb_exp.plot
new file mode 100644
index 0000000..25ca72d
--- /dev/null
+++ b/t/data/CombinePlots/zip_comb_exp.plot
@@ -0,0 +1,100 @@
+0 0
+0 0
+0 0
+4 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 5
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+4 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+1 5
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
+0 0
\ No newline at end of file
diff --git a/t/data/CombinePlots/zip_comb_exp.stats b/t/data/CombinePlots/zip_comb_exp.stats
new file mode 100644
index 0000000..2559142
--- /dev/null
+++ b/t/data/CombinePlots/zip_comb_exp.stats
@@ -0,0 +1,2 @@
+ID,Sequence Length,Unique Insertion Sites,Seq Len/UIS
+zip_combined,100,4,25
diff --git a/t/data/CombinePlots/zip_comb_list.txt b/t/data/CombinePlots/zip_comb_list.txt
new file mode 100644
index 0000000..f87cee1
--- /dev/null
+++ b/t/data/CombinePlots/zip_comb_list.txt
@@ -0,0 +1 @@
+zip_combined sample1.sm.plot.gz sample2.sm.plot.gz
diff --git a/t/data/CommandLine/fastq.list b/t/data/CommandLine/fastq.list
new file mode 100644
index 0000000..8f04cd2
--- /dev/null
+++ b/t/data/CommandLine/fastq.list
@@ -0,0 +1,2 @@
+test_1.fastq
+test_2.fastq
diff --git a/t/data/CommandLine/test_1.fastq b/t/data/CommandLine/test_1.fastq
new file mode 100644
index 0000000..94d01f9
--- /dev/null
+++ b/t/data/CommandLine/test_1.fastq
@@ -0,0 +1,56 @@
+ at HS21_09876:1:1105:9650:48712#84
+TAAGATTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF
+ at HS21_09876:1:1106:8638:38957#84
+TGAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+B at CFFFFFHHHHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD
+ at HS21_09876:1:1105:9650:48712#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF
+ at HS21_09876:1:1106:8638:38957#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+B at CFFFFFHHHHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD
+ at HS21_09876:1:1204:19746:42237#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCBF2GGFFEFGEEFFFEEHEEHFFFFGFGFFFGGGGHGFEFF
+ at HS21_09876:1:2210:2408:11148#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBCFFFFFHHHHCBF,GGFF<FEHFFEGFGFEEEGFGGGFGFFFGGGFHGFEFF
+ at HS21_09876:1:2210:16541:84795#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BCCFFFFFHHFDB at F%GEFDCFGHE<FD>GEEEGFFGGFFGFFBG8FGFGFEEE
+ at HS21_09876:1:1201:6607:66324#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BCCDFBDEHHHHCDF8EHFEGFAGIFEDEGFEFFGFEGFEGFGFGEGGHGFEFD
+ at HS21_09876:1:2102:12312:75235#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BCCDFFFFHHHHCDH8EHFFGFAGDFIEEEGEFFGFFGFFGFFEGEFFFGFEFE
+ at HS21_09876:1:1106:16061:54950#83
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BBBDFFFFHHFHCBD4GHFFGFEEC<FCGEFEGHGFFEGFGFFFGDFGDGFDFF
+ at HS21_09876:1:2101:14032:85058#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFFFFHHHHCEH5GHFFFFGEDC;GHFFEHGGFFGFEGFFJGDGFHGFGFF
+ at HS21_09876:1:2111:11125:6617#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCCGGGGACCGGCGCGG
++
+BCCDDDDDFHHG2BH8HEFGFFGH;EFGHFGEGGGFEGGFGFFGGDGEHGFEFF
+ at HS21_09876:1:2202:3163:76297#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFDDDHHHHCEH8EGFEGFGEIFDGHFGEHECFFGGFGFFDGEGGHGFEFF
+ at HS21_09876:1:2205:20175:3703#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFFFEHHH>8BI2A<FEFFGCE<EDFDDEHH?F=GFFGF3FGEGGHGDDFE
diff --git a/t/data/CommandLine/test_2.fastq b/t/data/CommandLine/test_2.fastq
new file mode 100644
index 0000000..058e801
--- /dev/null
+++ b/t/data/CommandLine/test_2.fastq
@@ -0,0 +1,56 @@
+ at HS21_09876:1:2205:6527:34286#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFFFFHHHGBDH4HHFGFFGFDFDGHEGEHGGFEGFJGFGGGEGFHGFFFF
+ at HS21_09876:1:1201:10071:48582#83
+TAAGAGTCAGGCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+CCCDFFFFHHHHCDI8EHFGFFGEFFFGGFGEFGGFFGGFGFG8G8ECFGFFAE
+ at HS21_09876:1:2107:20205:78513#83
+TAAGAGTCAGGCCCCGAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+BCCFFFFFHHHHCEI%EGFFEFEGIFGDGFE>GDGFFGFEBFGDGEGEH;EFDD
+ at HS21_09876:1:2207:12005:97464#83
+TAAGAGTCAGGCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+BCCDFFFFHHHGBBH0EG?<FFEHCBGEE>DEDF?FFGFE1FE89EEGD;;@?D
+ at HS21_09876:1:1208:12319:4648#83
+TAAGAGTCAGCAACCTGGGGACCGGCGCGGCTGGACGCGGTATCGATGATCTTC
++
+B=BDFFFDH>AA>EF8EIFFGFGEC<F;FEEEG3?FFG/E=F?DG89C=GAD?E
+ at HS21_09876:1:2209:14024:59451#83
+TAAGAGTCAGCCCGGTGCGCTACCCGTTCCTGTGGAACGCGGCGCGGCAGAACA
++
+BCCDFFFFHHFHCBF.E<FEFFGHHGE;H>GEFHFFFGFFGFFFGEFGFGFGFF
+ at HS21_09876:2:1211:5990:82312#83
+TAAGAGTCAGTTTTCGGTCACCGCGGTGCGCAACCTGCACCCGGTGACCCTCTC
++
+BCCFFFFFHHHGFEH0FFDDDGCF7GFD1GCFGFGGFGFFGHEFF?FFFEEDEE
+ at HS21_09876:2:2103:19946:55809#83
+TAAGAGTCAGGGGTCATAACGCCGCGGAGATTCTCTCGCGCGGTCAGCAGAAGC
++
+BBCFDEFFHHHHEAE'EFFEGGGFHEFAHGFHG at GEFHFEGFGFFF<FGEEDCE
+ at HS21_09876:2:1104:10740:37072#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BBBDDFFFHHHHFAE,FIGDEG;FHFFHH>FAGGFFF;><GHA9<F<FGE=F at C
+ at HS21_09876:2:2201:4547:41892#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BCCDFFFFHHGGEEE7EFGEDGEDHGGAHFGHGFDGFCFEGFAFFFDFBEEEDE
+ at HS21_09876:2:2213:12056:100809#83
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BBCDDDDDHDBFEE?,B>DFG=EDF:GHHEG6GGDGFFFFGGF6FFEFGC1BFF
+ at HS21_09876:1:1115:10349:43433#83
+TTTTCGACAACCTTTTGCCTGCCGGAGAAACACGCAGTTGCTACCNNACNCTNN
++
+8,(,*A<A2;DGE4B>HGFEDDCFG8CE=FF8BB7ED?FEEE522!!<2!:0!!
+ at HS21_09876:1:1211:4356:84410#83
+TTCTCGACAACCTTTTGCCTGCCGGAGAAACACGCAGTTGCTACCTGACTCTTA
++
+>E52EHFGFFGGFFFGHGHEEEGFGEGFGFGFGCGGFGFGFDHHHHFFFFFCCC
+ at HS21_09876:1:1101:19209:27276#83
+CGCACAGCCGTGTGGAAAAAACCGCTGTGGATAACCATCTCGGCCTGACTCTTA
++
+CEF4GHFDFFEEIFECHFGEFFGFEFGFGFFFGDHGHGFEFFHHHHFFFFFCCC
diff --git a/t/data/DetectTags/sample_sm_no_tr.bam b/t/data/DetectTags/sample_sm_no_tr.bam
new file mode 100644
index 0000000..5578ab7
Binary files /dev/null and b/t/data/DetectTags/sample_sm_no_tr.bam differ
diff --git a/t/data/DetectTags/sample_sm_tr.bam b/t/data/DetectTags/sample_sm_tr.bam
new file mode 100644
index 0000000..1904961
Binary files /dev/null and b/t/data/DetectTags/sample_sm_tr.bam differ
diff --git a/t/data/DetectTags/sample_sm_tr.cram b/t/data/DetectTags/sample_sm_tr.cram
new file mode 100644
index 0000000..a5212b0
Binary files /dev/null and b/t/data/DetectTags/sample_sm_tr.cram differ
diff --git a/t/data/FilterTags/expected.1mm.caa.fastq b/t/data/FilterTags/expected.1mm.caa.fastq
new file mode 100644
index 0000000..2781abe
--- /dev/null
+++ b/t/data/FilterTags/expected.1mm.caa.fastq
@@ -0,0 +1,40 @@
+ at IL2_4334:7:5:6843:6843
+CGACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=8>;A<@>=B;FF8>CCF:=CC-7(C>/22C:4;<=;
+ at IL2_4334:7:5:18259:13400
+CACCGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<8:=B>=B(B88A?C@@A;;B at +21AA/38><8=C;>
+ at IL2_4334:7:15:5608:3756
+CAACGTTTTCTGCGTGTTGCCGATATTTTGGAAAGCA
++
+9AA9:17<988@=@AB6=:?;:-08C=&,6C@:8A4=
+ at IL2_4334:7:18:16351:15714
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<===?;=@<<>FCBFF=:B7?A+4/A>(22@?64?5@
+ at IL2_4334:7:39:12877:7020
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=B?=<>ACB=@;FFF=FFA<AC071??/84C=;3?75
+ at IL2_4334:7:42:14437:19550
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<7=B8 at B=;8;DF;CF;F;8A?2<6;:18;81;<;8C
+ at IL2_4334:7:53:4426:3757
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=B<7<:9B@:@AF at A>?F@<F=47. at A,11D<45D9<
+ at IL2_4334:7:79:9021:16833
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+;A:7A;CBFBFA?ABCC>86 at B:C?A>6=:6<CB:>C
+ at IL2_4334:7:82:17494:18362
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<79:<9;7<>8=CB@:C:AB=7410=C-46;,75>>F
+ at IL2_4334:7:84:7230:17356
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+DADFDFFDDD>8:=>=?@48 at 87A4@F6>??BF??B@
diff --git a/t/data/FilterTags/expected.caa.fastq b/t/data/FilterTags/expected.caa.fastq
new file mode 100644
index 0000000..f36ff76
--- /dev/null
+++ b/t/data/FilterTags/expected.caa.fastq
@@ -0,0 +1,32 @@
+ at IL2_4334:7:15:5608:3756
+CAACGTTTTCTGCGTGTTGCCGATATTTTGGAAAGCA
++
+9AA9:17<988@=@AB6=:?;:-08C=&,6C@:8A4=
+ at IL2_4334:7:18:16351:15714
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<===?;=@<<>FCBFF=:B7?A+4/A>(22@?64?5@
+ at IL2_4334:7:39:12877:7020
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=B?=<>ACB=@;FFF=FFA<AC071??/84C=;3?75
+ at IL2_4334:7:42:14437:19550
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<7=B8 at B=;8;DF;CF;F;8A?2<6;:18;81;<;8C
+ at IL2_4334:7:53:4426:3757
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=B<7<:9B@:@AF at A>?F@<F=47. at A,11D<45D9<
+ at IL2_4334:7:79:9021:16833
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+;A:7A;CBFBFA?ABCC>86 at B:C?A>6=:6<CB:>C
+ at IL2_4334:7:82:17494:18362
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<79:<9;7<>8=CB@:C:AB=7410=C-46;,75>>F
+ at IL2_4334:7:84:7230:17356
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+DADFDFFDDD>8:=>=?@48 at 87A4@F6>??BF??B@
diff --git a/t/data/FilterTags/expected.tna.fastq b/t/data/FilterTags/expected.tna.fastq
new file mode 100644
index 0000000..e410d63
--- /dev/null
+++ b/t/data/FilterTags/expected.tna.fastq
@@ -0,0 +1,12 @@
+ at IL2_4334:6:120:19845:10197
+TNAGAGACAGGTATTACTCTGCATCANTNAANNGAGA
++
+:)::9:9;BA;1CB7F:BCC==7 at 5A)=%76%%0B67
+ at IL2_4334:6:120:19846:21043
+TNAGAGACAGTGTCTAGGGCATCACTNANGGNNGAGG
++
+<)72:19:?>:A>C?@@??CC@?:6;)5%>9%%;;;<
+ at IL2_4334:6:120:19846:19594
+TNAGAGACAGATCCTATGGGGCTGAANTNTNNNGTGA
++
+:)7:782?=AC<;@=5444@:B;>?*%)%4%%%?161
diff --git a/t/data/FilterTags/sample.fastq b/t/data/FilterTags/sample.fastq
new file mode 100644
index 0000000..8136d33
--- /dev/null
+++ b/t/data/FilterTags/sample.fastq
@@ -0,0 +1,52 @@
+ at IL2_4334:7:5:6843:6843
+CGACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=8>;A<@>=B;FF8>CCF:=CC-7(C>/22C:4;<=;
+ at IL2_4334:7:5:18259:13400
+CACCGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<8:=B>=B(B88A?C@@A;;B at +21AA/38><8=C;>
+ at IL2_4334:7:15:5608:3756
+CAACGTTTTCTGCGTGTTGCCGATATTTTGGAAAGCA
++
+9AA9:17<988@=@AB6=:?;:-08C=&,6C@:8A4=
+ at IL2_4334:7:18:16351:15714
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<===?;=@<<>FCBFF=:B7?A+4/A>(22@?64?5@
+ at IL2_4334:7:39:12877:7020
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=B?=<>ACB=@;FFF=FFA<AC071??/84C=;3?75
+ at IL2_4334:7:42:14437:19550
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<7=B8 at B=;8;DF;CF;F;8A?2<6;:18;81;<;8C
+ at IL2_4334:7:53:4426:3757
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=B<7<:9B@:@AF at A>?F@<F=47. at A,11D<45D9<
+ at IL2_4334:7:79:9021:16833
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+;A:7A;CBFBFA?ABCC>86 at B:C?A>6=:6<CB:>C
+ at IL2_4334:6:120:19845:10197
+TNAGAGACAGGTATTACTCTGCATCANTNAANNGAGA
++
+:)::9:9;BA;1CB7F:BCC==7 at 5A)=%76%%0B67
+ at IL2_4334:7:82:17494:18362
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<79:<9;7<>8=CB@:C:AB=7410=C-46;,75>>F
+ at IL2_4334:7:84:7230:17356
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+DADFDFFDDD>8:=>=?@48 at 87A4@F6>??BF??B@
+ at IL2_4334:6:120:19846:21043
+TNAGAGACAGTGTCTAGGGCATCACTNANGGNNGAGG
++
+<)72:19:?>:A>C?@@??CC@?:6;)5%>9%%;;;<
+ at IL2_4334:6:120:19846:19594
+TNAGAGACAGATCCTATGGGGCTGAANTNTNNNGTGA
++
+:)7:782?=AC<;@=5444@:B;>?*%)%4%%%?161
\ No newline at end of file
diff --git a/t/data/FilterTags/sample.fastq.gz b/t/data/FilterTags/sample.fastq.gz
new file mode 100644
index 0000000..41b9c6e
Binary files /dev/null and b/t/data/FilterTags/sample.fastq.gz differ
diff --git a/t/data/InsertSite/2_reads.bam b/t/data/InsertSite/2_reads.bam
new file mode 100644
index 0000000..29f929a
Binary files /dev/null and b/t/data/InsertSite/2_reads.bam differ
diff --git a/t/data/InsertSite/small_multi_sequence.bam b/t/data/InsertSite/small_multi_sequence.bam
new file mode 100644
index 0000000..4337614
Binary files /dev/null and b/t/data/InsertSite/small_multi_sequence.bam differ
diff --git a/t/data/Map/expected.mapped b/t/data/Map/expected.mapped
new file mode 100644
index 0000000..cbcca9e
--- /dev/null
+++ b/t/data/Map/expected.mapped
@@ -0,0 +1,26 @@
+ at HD VN:1.3 SO:unknown
+ at SQ SN:AE004091 LN:9840
+ at PG ID:smalt PN:smalt VN:0.7.4 CL:smalt map -x -r -1 -y 0.96 test.ref.index /Users/cc21/Development/repos/Bio-Tradis/t/data/Map/test.fastq
+HS21_09876:1:1105:9650:48712#83 0 AE004091 6698 54 1S43M * 0 0 GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG HHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF NM:i:0 AS:i:43
+HS21_09876:1:1106:8638:38957#83 0 AE004091 6698 54 1S43M * 0 0 GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG HHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD NM:i:0 AS:i:43
+HS21_09876:1:1204:19746:42237#83 0 AE004091 6698 54 1S43M * 0 0 GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG HHCBF2GGFFEFGEEFFFEEHEEHFFFFGFGFFFGGGGHGFEFF NM:i:0 AS:i:43
+HS21_09876:1:2210:2408:11148#83 0 AE004091 6698 54 1S43M * 0 0 GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG HHCBF,GGFF<FEHFFEGFGFEEEGFGGGFGFFFGGGFHGFEFF NM:i:0 AS:i:43
+HS21_09876:1:2210:16541:84795#83 0 AE004091 6698 54 1S43M * 0 0 GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG FDB at F%GEFDCFGHE<FD>GEEEGFFGGFFGFFBG8FGFGFEEE NM:i:0 AS:i:43
+HS21_09876:1:1201:6607:66324#83 0 AE004091 7026 54 1S43M * 0 0 CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT HHCDF8EHFEGFAGIFEDEGFEFFGFEGFEGFGFGEGGHGFEFD NM:i:0 AS:i:43
+HS21_09876:1:2102:12312:75235#83 0 AE004091 7026 54 1S43M * 0 0 CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT HHCDH8EHFFGFAGDFIEEEGEFFGFFGFFGFFEGEFFFGFEFE NM:i:0 AS:i:43
+HS21_09876:1:1106:16061:54950#83 0 AE004091 7059 54 1S43M * 0 0 GGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC FHCBD4GHFFGFEEC<FCGEFEGHGFFEGFGFFFGDFGDGFDFF NM:i:0 AS:i:43
+HS21_09876:1:2101:14032:85058#83 0 AE004091 9250 54 2S42M * 0 0 GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG HHCEH5GHFFFFGEDC;GHFFEHGGFFGFEGFFJGDGFHGFGFF NM:i:0 AS:i:42
+HS21_09876:1:2111:11125:6617#83 4 * 0 0 * * 0 0 GAATCGAGCGCGCGCTGCCCAAGGACACCCGGGGACCGGCGCGG HG2BH8HEFGFFGH;EFGHFGEGGGFEGGFGFFGGDGEHGFEFF NM:i:0 AS:i:0
+HS21_09876:1:2202:3163:76297#83 0 AE004091 9250 54 2S42M * 0 0 GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG HHCEH8EGFEGFGEIFDGHFGEHECFFGGFGFFDGEGGHGFEFF NM:i:0 AS:i:42
+HS21_09876:1:2205:20175:3703#83 0 AE004091 9250 54 2S42M * 0 0 GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG H>8BI2A<FEFFGCE<EDFDDEHH?F=GFFGF3FGEGGHGDDFE NM:i:0 AS:i:42
+HS21_09876:1:2205:6527:34286#83 0 AE004091 9250 54 2S42M * 0 0 GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG HGBDH4HHFGFFGFDFDGHEGEHGGFEGFJGFGGGEGFHGFFFF NM:i:0 AS:i:42
+HS21_09876:1:1201:10071:48582#83 0 AE004091 9265 54 2S42M * 0 0 GCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG HHCDI8EHFGFFGEFFFGGFGEFGGFFGGFGFG8G8ECFGFFAE NM:i:0 AS:i:42
+HS21_09876:1:2107:20205:78513#83 4 * 0 0 * * 0 0 GCCCCGAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG HHCEI%EGFFEFEGIFGDGFE>GDGFFGFEBFGDGEGEH;EFDD NM:i:0 AS:i:0
+HS21_09876:1:2207:12005:97464#83 0 AE004091 9265 54 2S42M * 0 0 GCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG HGBBH0EG?<FFEHCBGEE>DEDF?FFGFE1FE89EEGD;;@?D NM:i:0 AS:i:42
+HS21_09876:1:1208:12319:4648#83 0 AE004091 9274 54 2S42M * 0 0 CAACCTGGGGACCGGCGCGGCTGGACGCGGTATCGATGATCTTC AA>EF8EIFFGFGEC<F;FEEEG3?FFG/E=F?DG89C=GAD?E NM:i:0 AS:i:42
+HS21_09876:1:2209:14024:59451#83 0 AE004091 9391 54 1S43M * 0 0 CCCGGTGCGCTACCCGTTCCTGTGGAACGCGGCGCGGCAGAACA FHCBF.E<FEFFGHHGE;H>GEFHFFFGFFGFFFGEFGFGFGFF NM:i:1 AS:i:40
+HS21_09876:2:1211:5990:82312#83 0 AE004091 3185 54 1S43M * 0 0 TTTTCGGTCACCGCGGTGCGCAACCTGCACCCGGTGACCCTCTC HGFEH0FFDDDGCF7GFD1GCFGFGGFGFFGHEFF?FFFEEDEE NM:i:0 AS:i:43
+HS21_09876:2:2103:19946:55809#83 0 AE004091 3958 54 1S43M * 0 0 GGGTCATAACGCCGCGGAGATTCTCTCGCGCGGTCAGCAGAAGC HHEAE'EFFEGGGFHEFAHGFHG at GEFHFEGFGFFF<FGEEDCE NM:i:0 AS:i:43
+HS21_09876:2:1104:10740:37072#83 0 AE004091 7026 54 1S43M * 0 0 CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT HHFAE,FIGDEG;FHFFHH>FAGGFFF;><GHA9<F<FGE=F at C NM:i:0 AS:i:43
+HS21_09876:2:2201:4547:41892#83 0 AE004091 7026 54 1S43M * 0 0 CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT GGEEE7EFGEDGEDHGGAHFGHGFDGFCFEGFAFFFDFBEEEDE NM:i:0 AS:i:43
+HS21_09876:2:2213:12056:100809#83 0 AE004091 7059 54 1S43M * 0 0 GGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC BFEE?,B>DFG=EDF:GHHEG6GGDGFFFFGGF6FFEFGC1BFF NM:i:0 AS:i:43
diff --git a/t/data/Map/smallref.fa b/t/data/Map/smallref.fa
new file mode 100644
index 0000000..58dcfe9
--- /dev/null
+++ b/t/data/Map/smallref.fa
@@ -0,0 +1,165 @@
+>AE004091 AE004091.2 Pseudomonas aeruginosa PAO1, complete genome.
+tttaaagagaccggcgattctagtgaaatcgaacgggcaggtcaatttccaaccagcgat
+gacgtaatagatagatacaaggaagtcatttttcttttaaaggatagaaacggttaatgc
+tcttgggacggcgcttttctgtgcataactcgatgaagcccagcaattgcgtgtttctcc
+ggcaggcaaaaggttgtcgagaaccggtgtcgaggctgtttccttcctgagcgaagcctg
+gggatgaacgagatggttatccacagcggttttttccacacggctgtgcgcagggatgta
+cccccttcaaagcaagggttatccacaaagtccaggacgaccgtccgtcggcctgcctgc
+ttttattaaggtcttgatttgcttggggcctcagcgcatcggcatgtggataagtccggc
+ccgtccggctacaataggcgcttatttcgttgtgccgcctttccaatctttgggggatat
+ccgtgtccgtggaactttggcagcagtgcgtggatcttctccgcgatgagctgccgtccc
+aacaattcaacacctggatccgtcccttgcaggtcgaagccgaaggcgacgaattgcgtg
+tgtatgcacccaaccgtttcgtcctcgattgggtgaacgagaaatacctcggtcggcttc
+tggaactgctcggtgaacgcggcgagggtcagttgcccgcgctttccttattaataggca
+gcaagcgtagccgtacgccgcgcgccgccatcgtcccatcgcagacccacgtggctcccc
+cgcctccggttgctccgccgccggcgccagtgcagccggtatcggccgcgcccgtggtag
+tgccacgtgaagagctgccgccagtgacgacggctcccagcgtgtcgagcgatccctacg
+agccggaagaacccagcatcgatccgctggccgccgccatgccggctggagcagcgcctg
+cggtgcgcaccgagcgcaacgtccaggtcgaaggtgcgctgaagcacaccagctatctca
+accgtaccttcaccttcgagaacttcgtcgagggcaagtccaaccagttggcccgcgccg
+ccgcctggcaggtggcggacaacctcaagcacggctacaacccgctgttcctctacggtg
+gcgtcggtctgggcaagacccacctgatgcatgcggtgggcaaccacctgctgaagaaga
+acccgaacgccaaggtggtctacctgcattcggaacgtttcgtcgcggacatggtgaagg
+ccttgcagctcaacgccatcaacgaattcaagcgcttctaccgctcggtggacgcactgt
+tgatcgacgacatccagttcttcgcccgtaaggagcgctcccaggaggagttcttccaca
+ccttcaatgcccttctcgaaggcggccagcaggtgatcctcaccagcgaccgctatccga
+aggaaatcgaaggcctggaagagcggctgaaatcccgcttcggctggggcctgacggtgg
+ccgtcgagccgccggaactggaaacccgggtggcgatcctgatgaagaaggccgagcagg
+cgaagatcgagctgccgcacgatgcggccttcttcatcgcccagcgcatccgttccaacg
+tgcgtgaactggaaggtgcgctgaagcgggtgatcgcccactcgcacttcatgggccggc
+cgatcaccatcgagctgattcgcgagtcgctgaaggacctgttggcccttcaggacaagc
+tggtcagcatcgacaacatccagcgcaccgtcgccgagtactacaagatcaagatatccg
+atctgttgtccaagcggcgttcgcgctcggtggcgcgcccgcgccaggtggccatggcgc
+tctccaaggagctgaccaaccacagcctgccggagatcggcgtggccttcggcggtcggg
+atcacaccacggtgttgcacgcctgtcgtaagatcgctcaacttagggaatccgacgcgg
+atatccgcgaggactacaagaacctgctgcgtaccctgacaacctgacgcagcccacgag
+gcaagggactagaccatgcatttcaccattcaacgcgaagccctgttgaaaccgctgcaa
+ctggtcgccggcgtcgtggaacgccgccagacattgccggttctctccaacgtcctgctg
+gtggtcgaaggccagcaactgtcgctgaccggcaccgacctcgaagtcgagctggttggt
+cgcgtggtactggaagatgccgccgaacccggcgagatcaccgtaccggcgcgcaagctg
+atggacatctgcaagagcctgccgaacgacgtgctgatcgacatccgtgtcgaagagcag
+aaacttctggtgaaggccgggcgtagccgcttcaccctgtccaccctgccggccaacgat
+ttccccaccgtagaggaaggtcccggctcgctgaacttcagcattgcccagagcaagctg
+cgtcgcctgatcgaccgcaccagcttcgccatggcccagcaggacgtgcgttactacctc
+aacggcatgctgctggaagtgaacggcggcaccctgcgctccgtcgccaccgacggccac
+cgactggccatgtgctcgctggatgcgcagatcccgtcgcaggaccgccaccaggtgatc
+gtgccgcgcaaaggcatcctcgaactggctcgtctgctcaccgagcaggacggcgaagtc
+ggcatcgtcctgggccagcaccatatccgtgccaccactggcgaattcaccttcacttcg
+aagctggtggacggcaagttcccggactacgagcgtgtactgccgcgcggtggcgacaag
+ctggtggtcggtgaccgccagcaactgcgcgaagccttcagccgtaccgcgatcctctcc
+aacgagaagtaccgcggcattcgcctgcagctttccaacggtttgctgaaaatccaggcg
+aacaacccggagcaggaagaggccgaggaagaagtgcaggtcgagtacaacggcggcaac
+ctggagataggcttcaacgtcagttacctgctcgacgtgctgggtgtgatcggtaccgag
+caggtccgcttcatcctttccgattccaacagcagcgccctggtccacgaggccgacaat
+gacgattctgcctatgtcgtcatgccgatgcgcctctaaacatactgaatgtccctgacc
+cgcgtttcggtcaccgcggtgcgcaacctgcacccggtgaccctctccccctccccccgc
+atcaacatcctctacggcgacaacggcagcggcaagaccagcgtgctcgaagccatccac
+ctgctgggcctggcgcgttcattccgcagtgcgcgcttgcagccggtgatccagtatgag
+gaagcggcctgcaccgtattcggccaggtgatgttggccaacggcatcgccagcaacctg
+gggatttcccgtgagcgccagggcgagttcaccatccgcatcgatgggcagaacgcccgg
+agtgcggctcaattggcggaaactctcccactgcaactgatcaacccggacagctttcgg
+ttgctcgagggagcgccgaagatccggcgacagttcctcgattggggagtgttccacgtg
+gaacctcggtttctgcccgtctggcagcgcctgcagaaggcgctgcgccagcggaactcc
+tggctccggcatggtaaactggaccccgcgtcgcaagcggcctgggaccgggaattgagc
+ctggccagcgatgagatcgatgcctaccgcagaagctatatccaggcgttgaaaccggta
+ttcgaggaaacactcgccgaattggtttcactggatgacctgacccttagctactaccga
+ggctgggacaaggaccgggacctcctggaggttctggcttccagcctgttgcgcgaccag
+cagatgggccacacccaggcgggaccgcagcgtgcggatcttcgcatacggttggcaggt
+cataacgccgcggagattctctcgcgcggtcagcagaagctggtggtatgcgccctgcgc
+atcgcccaaggccatctgatcaatcgcgccaagcgcggacagtgcgtctacctggtggac
+gacctgccctcggaactggatgagcagcatcgaatggctctttgccgcttgcttgaagat
+ttgggttgccaggtattcatcacctgcgtggacccgcaactattgaaagacggctggcgc
+acggatacgccggtatccatgttccacgtggaacatggaaaagtctctcagaccacgacc
+atcgggagtgaagcatgagcgagaacaacacgtacgactcttccagcatcaaggtgctga
+aggggctggatgccgtacgcaagcgccccggcatgtacatcggcgacaccgacgatggca
+ccggtctgcaccacatggtgttcgaggtggtggataactccatcgacgaagcgctggccg
+gttactgcagcgaaatcagcatcaccatccatacggatgagtcgatcactgtccgcgaca
+atggacgcggtattccggtggatatccacaaggaagaaggggtttctgcggcggaagtga
+tcatgaccgtcctccacgccggcggcaagttcgacgacaacacctacaaggtgtccggcg
+gcttgcacggtgtgggcgtctcggtggtgaacgcgctgtcccatgaactacgcctgacca
+tccgtcgccacaacaaggtctgggaacaggtctaccaccacggcgttccgcagttcccac
+tgcgcgaagtgggcgagaccgatggctccggcaccgaagttcacttcaagccgtccccgg
+agaccttcagcaacatccacttcagttgggacatcctggccaagcgcatccgcgagctgt
+ccttcctcaactccggcgtcggcatcctgctgcgcgacgagcgtaccggcaaggaggagc
+tgttcaagtacgaaggcggtctgaaggccttcgtcgagtacctgaacaccaacaagaccg
+cggtgaacgaggtattccacttcaacgtccagcgtgaagaggacggcgtgggtgtggaag
+tcgccttgcagtggaacgacagcttcaacgagaacctgctctgcttcaccaacaacatcc
+cgcagcgtgacggcggcacccacctggccggtttccgttcggcgctgacgcgtaacctga
+acaactacatcgaggccgaaggcctggcgaagaagttcaagatcgccaccaccggcgacg
+atgcccgcgaaggcctcaccgcgatcatctcggtgaaggtaccggacccgaagttcagct
+cgcagaccaaggacaagctggtctcctccgaggtgaagactgcggtggaacaggagatgg
+gcaagtacttcgccgacttcctgctggagaatcccaacgaagccaaggccgtggtcggca
+agatgatcgacgccgcccgtgcccgcgaggccgcgcgcaaggcgcgcgagatgacccgcc
+gcaagggcgcgctggacatcgccggcctgcccggcaaactggccgattgccaggaaaagg
+acccggcgctctccgaactgtacatcgtggagggtgactccgcgggcggttccgccaagc
+agggccgcaatcgccggacccaggcgatcctgccgctcaagggcaagatcctcaacgtcg
+aaaaggcgcgcttcgacaagatgctctcctcccaggaggtcggtacgctgatcaccgccc
+tgggctgtggcatcggccgcgaggaatacaacatcgacaagctgcgctaccacaacatca
+tcatcatgaccgatgctgacgtcgacggttcgcacatccgcaccctgctgttgaccttct
+tcttccgccagatgcccgagctgatcgagcgtggctacatctacatcgcccagcccccgt
+tgtacaaggtcaagcgcggcaagcaggagcagtacatcaaggacgaccaggccatggaag
+agtacatgacccagtcggccctggaagacgccagcctgcacgtcaacgagcacgctccgg
+gcctgtccggggcggcgctggagaaactggtcaacgagtatcgcggggtgatcgccaccc
+tcaagcgcctgtcgcgcctgtacccccaggagctgaccgagcacttcatctacctgccta
+ccgtgtcggtggacgacctggctaacgagtcggccatgcagggctggttggagaagttcc
+aggcgcgcctgaccgccgccgagaagtccggcctgacctacaaggccagcctgcgcgaag
+accgcgagcgccacctgtggctgcccgaggtggaactggtggcccacggcctgtccagct
+acgtcaccttcaaccgtgacttcttcgccagcaatgactaccgctcggtgtcgctgctcg
+gcgaccagctgaacagcctgctggaagacggcgcctacgtgcagaagggtgagcgcaagc
+gcccgatcagcgccttcaaggacggcctggactggctgatggccgaaggtaccaagcgcc
+acagcatccagcgatacaaggggctgggcgagatgaaccctgagcagctgtgggaaacca
+ccatggatccgaacgtccggcgcatgctcaaggtgaccatcgaggatgccatcgccgccg
+accagatcttcaacaccctgatgggcgatgccgtggagccgcgccgcgacttcatcgaaa
+gcaacgcgctggcggtgtcgaacctggacgtgtgacaggtcggcagaccgaccctcatgg
+aaaccccggcctggcgccggggttttctttttgcgccaggtagcctggatacgggcgcca
+ggggtgccttgccaaggtgtggccgagccccggttactcgccggcattggcaccctggac
+ccgggcctcctggcggcgtggcaccgcttctgtgggcagcggtcgccggtcggttcggtc
+gatcgttgccagccggccttgctttgcgcctcgcgtgaaaacaagaagccccgctatggc
+ggggcttcttttatcgaatcggcgcacagtacgccttgcagggggctttgcggcccttca
+cgagaccaccgacggctccggatggctgacccgctgctggatggggctgatctcggccat
+ggtctcgctgacccaggcttcggcgcgctggtttagctcggcgatggcgcgcgggccttc
+gccttcggcgtgcatggccgggccgatcaccacctggatggtgcccgggtacttggccca
+gccggccttgggccaatactgcccggcgttgtgggcgatcggcagtaccggtagcccggc
+gttgaccgccagggcggtgccgccgcgggagaacttgcccatctgccccaccggaatacg
+cgtgccttccgggaagatcagcacccaggcgcctttcttcaggcactcgtcgccctgctt
+ggccagttgcttgagggccagcttgggctggctgcggtcgatggcgatgggcttgagcag
+ggccagggcccagccgaagaacggcacgtagagcagctcgcgcttgagtacctggctgag
+tggctcgaagaagccggagaggaagaaggtttcccaggtgctctggtgcttggagaggat
+cacgcagggcttttccgggatgttctccagtccgcgcacctcgtagcggatgccggcgac
+cacgcgggtcagccagatcgcgaagcggcaccagttctgtaccacgaagcggtagcgggc
+gcggaacggcaggatcggcgcgatgaagaagctgagggtgccccagacgaacgcgctggc
+ggacagcagcaggtaaaagaggacggttctgatggcctgcactgtcgacatgtattctga
+ccttactgaagtaatgcgctggcgactgccgccagatcgtcgaatatcagggtgccctct
+ggcaagggcttgcccagcgtacgtacaccttttccggtctttaccaataccggctgacaa
+tcgacggcccgcgccgcctccaggtcaccgatgctgtcgccgacgaaccagatacccgac
+agatcgaccccgtagtgctcgccgatctgccgcagcatacccggcttcggcttgcggcag
+tcgcaaccgtcgtccggtccatgcggacaatagacgatgaggccgacctcgccgccctgc
+tccgcgaccagttcgcgcaagcgcgcatgcatggcctcgagcactgccaggtcgtaatag
+ccacgggcgatgccggactggttggtagccaccgcgacggtccagccggcctggctcagg
+cgggcgatggcctcgatcgagctggggatggggatccactcgtcgagggtcttgatgtaa
+tcgtcggagtcgaggttgatgactccatcgcggtcgagaatcagcagggaacgggacatc
+gatgcgcagttggccatgaacggaaaggatcgattctacctcagccagccggagcatcgc
+ggatggatcgacgagccccctacgctggacaatctgtactagattcaataatggcaatgg
+aatggcaatcccaggccagggagtcatttggcacgcagcagtgggtgtctcggagtacgt
+gcgaaccccttggcgggtggatcaccggagtaacgcagtaagcgcctatcgcatgccagc
+acggccgaccggccgtgtttccaccacaggtggagcgggcgtgacgacggggagttccgg
+ggcgtctgcccgttcccaaggacggtaaccgtgaaacgcctgaaaaagacactgcacctt
+tcaagcttgtccctcgcttccctggctctttcttccgccgccctggcggccgctccggtc
+atgctcgaccagggcaaggaatggaccgaaagccaccgccaggacttctacagccgcgac
+cagggctcgcaggtgatgcccctgccctggctcaaggcgttgcgacagccggatggaacg
+cctttcctcgccgacagcctggcccgctacggctatttgcccaaccccaaggcgcccgcg
+gaaggcctgccggtgggcttcaccgtagccggcacgggcgcccggcagatggtcggcatg
+acctgttcggcctgccatacccggcagatcgaggtgaagggcactgcctatcggatcgac
+ggcggtccggcgatcgtcgacttccaggcattcctcgccgacctcgatcgggccgtggga
+ccgctgaccagcgatgacgccgccttcgacgccttcgccaagccgatcctcggggccaat
+ccgcctcccggtgcgcgcgacgctctgctcgcggcggtgaaggaatggtacgagccctat
+cacacgctgatcgagcgcgcgctgcccaaggacacctggggaccggcgcggctggacgcg
+gtatcgatgatcttcaaccgccttaccgggctggatatcggcaccgcgccgccctacctg
+attcccgacaacatcaaggcggccgatgcgccggtgcgctatccgttcctgtggaacgcg
+gcgcggcagaacaagacccagtggcccggcttcgccgccaacggcaacgacctgctcggc
+ctggcgcgcaatgtcggcgaggtctacggggtgttcgccaccttccacccgcagaagagc
+aagttccacctgctgggcatggactacctgaagatcaactcggccaacttccacgggctg
+ggcaagctggaagacctgatcaagaagatcggcccgccgaagtggccctgggcggtggac
+aagcacctggccaggaaaggcgcgctgatcttcgcccgcaagaccgacgaaggtggctgc
+gtggagtgccacggcatccggatcaaggacctggtgctttgggacactccgctgagggac
+gtcggcagcgacagccgccagcacgccatcctcgatggccaggtgcagaccggcgtgatg
diff --git a/t/data/Map/test.fastq b/t/data/Map/test.fastq
new file mode 100644
index 0000000..ed95c28
--- /dev/null
+++ b/t/data/Map/test.fastq
@@ -0,0 +1,92 @@
+ at HS21_09876:1:1105:9650:48712#83
+GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+HHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF
+ at HS21_09876:1:1106:8638:38957#83
+GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+HHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD
+ at HS21_09876:1:1204:19746:42237#83
+GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+HHCBF2GGFFEFGEEFFFEEHEEHFFFFGFGFFFGGGGHGFEFF
+ at HS21_09876:1:2210:2408:11148#83
+GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+HHCBF,GGFF<FEHFFEGFGFEEEGFGGGFGFFFGGGFHGFEFF
+ at HS21_09876:1:2210:16541:84795#83
+GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+FDB at F%GEFDCFGHE<FD>GEEEGFFGGFFGFFBG8FGFGFEEE
+ at HS21_09876:1:1201:6607:66324#83
+CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+HHCDF8EHFEGFAGIFEDEGFEFFGFEGFEGFGFGEGGHGFEFD
+ at HS21_09876:1:2102:12312:75235#83
+CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+HHCDH8EHFFGFAGDFIEEEGEFFGFFGFFGFFEGEFFFGFEFE
+ at HS21_09876:1:1106:16061:54950#83
+GGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+FHCBD4GHFFGFEEC<FCGEFEGHGFFEGFGFFFGDFGDGFDFF
+ at HS21_09876:1:2101:14032:85058#83
+GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+HHCEH5GHFFFFGEDC;GHFFEHGGFFGFEGFFJGDGFHGFGFF
+ at HS21_09876:1:2111:11125:6617#83
+GAATCGAGCGCGCGCTGCCCAAGGACACCCGGGGACCGGCGCGG
++
+HG2BH8HEFGFFGH;EFGHFGEGGGFEGGFGFFGGDGEHGFEFF
+ at HS21_09876:1:2202:3163:76297#83
+GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+HHCEH8EGFEGFGEIFDGHFGEHECFFGGFGFFDGEGGHGFEFF
+ at HS21_09876:1:2205:20175:3703#83
+GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+H>8BI2A<FEFFGCE<EDFDDEHH?F=GFFGF3FGEGGHGDDFE
+ at HS21_09876:1:2205:6527:34286#83
+GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+HGBDH4HHFGFFGFDFDGHEGEHGGFEGFJGFGGGEGFHGFFFF
+ at HS21_09876:1:1201:10071:48582#83
+GCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+HHCDI8EHFGFFGEFFFGGFGEFGGFFGGFGFG8G8ECFGFFAE
+ at HS21_09876:1:2107:20205:78513#83
+GCCCCGAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+HHCEI%EGFFEFEGIFGDGFE>GDGFFGFEBFGDGEGEH;EFDD
+ at HS21_09876:1:2207:12005:97464#83
+GCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+HGBBH0EG?<FFEHCBGEE>DEDF?FFGFE1FE89EEGD;;@?D
+ at HS21_09876:1:1208:12319:4648#83
+CAACCTGGGGACCGGCGCGGCTGGACGCGGTATCGATGATCTTC
++
+AA>EF8EIFFGFGEC<F;FEEEG3?FFG/E=F?DG89C=GAD?E
+ at HS21_09876:1:2209:14024:59451#83
+CCCGGTGCGCTACCCGTTCCTGTGGAACGCGGCGCGGCAGAACA
++
+FHCBF.E<FEFFGHHGE;H>GEFHFFFGFFGFFFGEFGFGFGFF
+ at HS21_09876:2:1211:5990:82312#83
+TTTTCGGTCACCGCGGTGCGCAACCTGCACCCGGTGACCCTCTC
++
+HGFEH0FFDDDGCF7GFD1GCFGFGGFGFFGHEFF?FFFEEDEE
+ at HS21_09876:2:2103:19946:55809#83
+GGGTCATAACGCCGCGGAGATTCTCTCGCGCGGTCAGCAGAAGC
++
+HHEAE'EFFEGGGFHEFAHGFHG at GEFHFEGFGFFF<FGEEDCE
+ at HS21_09876:2:1104:10740:37072#83
+CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+HHFAE,FIGDEG;FHFFHH>FAGGFFF;><GHA9<F<FGE=F at C
+ at HS21_09876:2:2201:4547:41892#83
+CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+GGEEE7EFGEDGEDHGGAHFGHGFDGFCFEGFAFFFDFBEEEDE
+ at HS21_09876:2:2213:12056:100809#83
+GGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BFEE?,B>DFG=EDF:GHHEG6GGDGFFFFGGF6FFEFGC1BFF
diff --git a/t/data/Parsers/test.bam b/t/data/Parsers/test.bam
new file mode 100644
index 0000000..6ee5bbd
Binary files /dev/null and b/t/data/Parsers/test.bam differ
diff --git a/t/data/Parsers/test.fastq b/t/data/Parsers/test.fastq
new file mode 100644
index 0000000..1953324
--- /dev/null
+++ b/t/data/Parsers/test.fastq
@@ -0,0 +1,8 @@
+ at HS21_09876:1:1105:9650:48712#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF
+ at HS21_09876:1:1106:8638:38957#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+B at CFFFFFHHHHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD
diff --git a/t/data/RemoveTags/expected.rm.1mm.caa.fastq b/t/data/RemoveTags/expected.rm.1mm.caa.fastq
new file mode 100644
index 0000000..283f502
--- /dev/null
+++ b/t/data/RemoveTags/expected.rm.1mm.caa.fastq
@@ -0,0 +1,40 @@
+ at IL2_4334:7:5:6843:6843
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+B;FF8>CCF:=CC-7(C>/22C:4;<=;
+ at IL2_4334:7:5:18259:13400
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+B88A?C@@A;;B at +21AA/38><8=C;>
+ at IL2_4334:7:15:5608:3756
+CTGCGTGTTGCCGATATTTTGGAAAGCA
++
+88@=@AB6=:?;:-08C=&,6C@:8A4=
+ at IL2_4334:7:18:16351:15714
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<>FCBFF=:B7?A+4/A>(22@?64?5@
+ at IL2_4334:7:39:12877:7020
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=@;FFF=FFA<AC071??/84C=;3?75
+ at IL2_4334:7:42:14437:19550
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+8;DF;CF;F;8A?2<6;:18;81;<;8C
+ at IL2_4334:7:53:4426:3757
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+:@AF at A>?F@<F=47. at A,11D<45D9<
+ at IL2_4334:7:79:9021:16833
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+BFA?ABCC>86 at B:C?A>6=:6<CB:>C
+ at IL2_4334:7:82:17494:18362
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+>8=CB@:C:AB=7410=C-46;,75>>F
+ at IL2_4334:7:84:7230:17356
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+D>8:=>=?@48 at 87A4@F6>??BF??B@
diff --git a/t/data/RemoveTags/expected.rm.caa.fastq b/t/data/RemoveTags/expected.rm.caa.fastq
new file mode 100644
index 0000000..14adee6
--- /dev/null
+++ b/t/data/RemoveTags/expected.rm.caa.fastq
@@ -0,0 +1,40 @@
+ at IL2_4334:7:5:6843:6843
+CGACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=8>;A<@>=B;FF8>CCF:=CC-7(C>/22C:4;<=;
+ at IL2_4334:7:5:18259:13400
+CACCGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<8:=B>=B(B88A?C@@A;;B at +21AA/38><8=C;>
+ at IL2_4334:7:15:5608:3756
+CTGCGTGTTGCCGATATTTTGGAAAGCA
++
+88@=@AB6=:?;:-08C=&,6C@:8A4=
+ at IL2_4334:7:18:16351:15714
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<>FCBFF=:B7?A+4/A>(22@?64?5@
+ at IL2_4334:7:39:12877:7020
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=@;FFF=FFA<AC071??/84C=;3?75
+ at IL2_4334:7:42:14437:19550
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+8;DF;CF;F;8A?2<6;:18;81;<;8C
+ at IL2_4334:7:53:4426:3757
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+:@AF at A>?F@<F=47. at A,11D<45D9<
+ at IL2_4334:7:79:9021:16833
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+BFA?ABCC>86 at B:C?A>6=:6<CB:>C
+ at IL2_4334:7:82:17494:18362
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+>8=CB@:C:AB=7410=C-46;,75>>F
+ at IL2_4334:7:84:7230:17356
+CTGCGTGTTGCCGATATTCTGGAAAGCA
++
+D>8:=>=?@48 at 87A4@F6>??BF??B@
diff --git a/t/data/RemoveTags/expected.rm.tna.fastq b/t/data/RemoveTags/expected.rm.tna.fastq
new file mode 100644
index 0000000..7219671
--- /dev/null
+++ b/t/data/RemoveTags/expected.rm.tna.fastq
@@ -0,0 +1,12 @@
+ at IL2_4334:6:120:19845:10197
+GTATTACTCTGCATCANTNAANNGAGA
++
+;1CB7F:BCC==7 at 5A)=%76%%0B67
+ at IL2_4334:6:120:19846:21043
+TGTCTAGGGCATCACTNANGGNNGAGG
++
+:A>C?@@??CC@?:6;)5%>9%%;;;<
+ at IL2_4334:6:120:19846:19594
+ATCCTATGGGGCTGAANTNTNNNGTGA
++
+C<;@=5444@:B;>?*%)%4%%%?161
diff --git a/t/data/RemoveTags/sample.caa.fastq b/t/data/RemoveTags/sample.caa.fastq
new file mode 100644
index 0000000..2781abe
--- /dev/null
+++ b/t/data/RemoveTags/sample.caa.fastq
@@ -0,0 +1,40 @@
+ at IL2_4334:7:5:6843:6843
+CGACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=8>;A<@>=B;FF8>CCF:=CC-7(C>/22C:4;<=;
+ at IL2_4334:7:5:18259:13400
+CACCGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<8:=B>=B(B88A?C@@A;;B at +21AA/38><8=C;>
+ at IL2_4334:7:15:5608:3756
+CAACGTTTTCTGCGTGTTGCCGATATTTTGGAAAGCA
++
+9AA9:17<988@=@AB6=:?;:-08C=&,6C@:8A4=
+ at IL2_4334:7:18:16351:15714
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<===?;=@<<>FCBFF=:B7?A+4/A>(22@?64?5@
+ at IL2_4334:7:39:12877:7020
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=B?=<>ACB=@;FFF=FFA<AC071??/84C=;3?75
+ at IL2_4334:7:42:14437:19550
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<7=B8 at B=;8;DF;CF;F;8A?2<6;:18;81;<;8C
+ at IL2_4334:7:53:4426:3757
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=B<7<:9B@:@AF at A>?F@<F=47. at A,11D<45D9<
+ at IL2_4334:7:79:9021:16833
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+;A:7A;CBFBFA?ABCC>86 at B:C?A>6=:6<CB:>C
+ at IL2_4334:7:82:17494:18362
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<79:<9;7<>8=CB@:C:AB=7410=C-46;,75>>F
+ at IL2_4334:7:84:7230:17356
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+DADFDFFDDD>8:=>=?@48 at 87A4@F6>??BF??B@
diff --git a/t/data/RemoveTags/sample.tna.fastq b/t/data/RemoveTags/sample.tna.fastq
new file mode 100644
index 0000000..e410d63
--- /dev/null
+++ b/t/data/RemoveTags/sample.tna.fastq
@@ -0,0 +1,12 @@
+ at IL2_4334:6:120:19845:10197
+TNAGAGACAGGTATTACTCTGCATCANTNAANNGAGA
++
+:)::9:9;BA;1CB7F:BCC==7 at 5A)=%76%%0B67
+ at IL2_4334:6:120:19846:21043
+TNAGAGACAGTGTCTAGGGCATCACTNANGGNNGAGG
++
+<)72:19:?>:A>C?@@??CC@?:6;)5%>9%%;;;<
+ at IL2_4334:6:120:19846:19594
+TNAGAGACAGATCCTATGGGGCTGAANTNTNNNGTGA
++
+:)7:782?=AC<;@=5444@:B;>?*%)%4%%%?161
diff --git a/t/data/RunTradis/expected.1mm.plot.gz b/t/data/RunTradis/expected.1mm.plot.gz
new file mode 100644
index 0000000..d340513
Binary files /dev/null and b/t/data/RunTradis/expected.1mm.plot.gz differ
diff --git a/t/data/RunTradis/expected.plot.gz b/t/data/RunTradis/expected.plot.gz
new file mode 100644
index 0000000..ca5111c
Binary files /dev/null and b/t/data/RunTradis/expected.plot.gz differ
diff --git a/t/data/RunTradis/filelist.txt b/t/data/RunTradis/filelist.txt
new file mode 100644
index 0000000..cc9c0cc
--- /dev/null
+++ b/t/data/RunTradis/filelist.txt
@@ -0,0 +1,2 @@
+test.tagged.fastq
+test2.tagged.fastq
diff --git a/t/data/RunTradis/filtered.fastq b/t/data/RunTradis/filtered.fastq
new file mode 100644
index 0000000..5fbeb3f
--- /dev/null
+++ b/t/data/RunTradis/filtered.fastq
@@ -0,0 +1,92 @@
+ at HS21_09876:1:1105:9650:48712#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF
+ at HS21_09876:1:1106:8638:38957#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+B at CFFFFFHHHHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD
+ at HS21_09876:1:1204:19746:42237#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCBF2GGFFEFGEEFFFEEHEEHFFFFGFGFFFGGGGHGFEFF
+ at HS21_09876:1:2210:2408:11148#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBCFFFFFHHHHCBF,GGFF<FEHFFEGFGFEEEGFGGGFGFFFGGGFHGFEFF
+ at HS21_09876:1:2210:16541:84795#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BCCFFFFFHHFDB at F%GEFDCFGHE<FD>GEEEGFFGGFFGFFBG8FGFGFEEE
+ at HS21_09876:1:1201:6607:66324#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BCCDFBDEHHHHCDF8EHFEGFAGIFEDEGFEFFGFEGFEGFGFGEGGHGFEFD
+ at HS21_09876:1:2102:12312:75235#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BCCDFFFFHHHHCDH8EHFFGFAGDFIEEEGEFFGFFGFFGFFEGEFFFGFEFE
+ at HS21_09876:1:1106:16061:54950#83
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BBBDFFFFHHFHCBD4GHFFGFEEC<FCGEFEGHGFFEGFGFFFGDFGDGFDFF
+ at HS21_09876:1:2101:14032:85058#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFFFFHHHHCEH5GHFFFFGEDC;GHFFEHGGFFGFEGFFJGDGFHGFGFF
+ at HS21_09876:1:2111:11125:6617#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCCGGGGACCGGCGCGG
++
+BCCDDDDDFHHG2BH8HEFGFFGH;EFGHFGEGGGFEGGFGFFGGDGEHGFEFF
+ at HS21_09876:1:2202:3163:76297#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFDDDHHHHCEH8EGFEGFGEIFDGHFGEHECFFGGFGFFDGEGGHGFEFF
+ at HS21_09876:1:2205:20175:3703#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFFFEHHH>8BI2A<FEFFGCE<EDFDDEHH?F=GFFGF3FGEGGHGDDFE
+ at HS21_09876:1:2205:6527:34286#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFFFFHHHGBDH4HHFGFFGFDFDGHEGEHGGFEGFJGFGGGEGFHGFFFF
+ at HS21_09876:1:1201:10071:48582#83
+TAAGAGTCAGGCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+CCCDFFFFHHHHCDI8EHFGFFGEFFFGGFGEFGGFFGGFGFG8G8ECFGFFAE
+ at HS21_09876:1:2107:20205:78513#83
+TAAGAGTCAGGCCCCGAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+BCCFFFFFHHHHCEI%EGFFEFEGIFGDGFE>GDGFFGFEBFGDGEGEH;EFDD
+ at HS21_09876:1:2207:12005:97464#83
+TAAGAGTCAGGCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+BCCDFFFFHHHGBBH0EG?<FFEHCBGEE>DEDF?FFGFE1FE89EEGD;;@?D
+ at HS21_09876:1:1208:12319:4648#83
+TAAGAGTCAGCAACCTGGGGACCGGCGCGGCTGGACGCGGTATCGATGATCTTC
++
+B=BDFFFDH>AA>EF8EIFFGFGEC<F;FEEEG3?FFG/E=F?DG89C=GAD?E
+ at HS21_09876:1:2209:14024:59451#83
+TAAGAGTCAGCCCGGTGCGCTACCCGTTCCTGTGGAACGCGGCGCGGCAGAACA
++
+BCCDFFFFHHFHCBF.E<FEFFGHHGE;H>GEFHFFFGFFGFFFGEFGFGFGFF
+ at HS21_09876:2:1211:5990:82312#83
+TAAGAGTCAGTTTTCGGTCACCGCGGTGCGCAACCTGCACCCGGTGACCCTCTC
++
+BCCFFFFFHHHGFEH0FFDDDGCF7GFD1GCFGFGGFGFFGHEFF?FFFEEDEE
+ at HS21_09876:2:2103:19946:55809#83
+TAAGAGTCAGGGGTCATAACGCCGCGGAGATTCTCTCGCGCGGTCAGCAGAAGC
++
+BBCFDEFFHHHHEAE'EFFEGGGFHEFAHGFHG at GEFHFEGFGFFF<FGEEDCE
+ at HS21_09876:2:1104:10740:37072#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BBBDDFFFHHHHFAE,FIGDEG;FHFFHH>FAGGFFF;><GHA9<F<FGE=F at C
+ at HS21_09876:2:2201:4547:41892#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BCCDFFFFHHGGEEE7EFGEDGEDHGGAHFGHGFDGFCFEGFAFFFDFBEEEDE
+ at HS21_09876:2:2213:12056:100809#83
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BBCDDDDDHDBFEE?,B>DFG=EDF:GHHEG6GGDGFFFFGGF6FFEFGC1BFF
diff --git a/t/data/RunTradis/mapped.sam b/t/data/RunTradis/mapped.sam
new file mode 100644
index 0000000..527cc1f
--- /dev/null
+++ b/t/data/RunTradis/mapped.sam
@@ -0,0 +1,26 @@
+ at HD VN:1.3 SO:unknown
+ at SQ SN:AE004091 LN:9840
+ at PG ID:smalt PN:smalt VN:0.7.4 CL:smalt map -x -r -1 -y 0.96 ref.index /Users/cc21/Development/repos/Bio-Tradis/t/data/RunTradis/notags.fastq
+HS21_09876:1:1105:9650:48712#83 0 AE004091 6698 54 1S43M * 0 0 GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG HHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF NM:i:0 AS:i:43
+HS21_09876:1:1106:8638:38957#83 0 AE004091 6698 54 1S43M * 0 0 GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG HHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD NM:i:0 AS:i:43
+HS21_09876:1:1204:19746:42237#83 0 AE004091 6698 54 1S43M * 0 0 GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG HHCBF2GGFFEFGEEFFFEEHEEHFFFFGFGFFFGGGGHGFEFF NM:i:0 AS:i:43
+HS21_09876:1:2210:2408:11148#83 0 AE004091 6698 54 1S43M * 0 0 GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG HHCBF,GGFF<FEHFFEGFGFEEEGFGGGFGFFFGGGFHGFEFF NM:i:0 AS:i:43
+HS21_09876:1:2210:16541:84795#83 0 AE004091 6698 54 1S43M * 0 0 GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG FDB at F%GEFDCFGHE<FD>GEEEGFFGGFFGFFBG8FGFGFEEE NM:i:0 AS:i:43
+HS21_09876:1:1201:6607:66324#83 0 AE004091 7026 54 1S43M * 0 0 CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT HHCDF8EHFEGFAGIFEDEGFEFFGFEGFEGFGFGEGGHGFEFD NM:i:0 AS:i:43
+HS21_09876:1:2102:12312:75235#83 0 AE004091 7026 54 1S43M * 0 0 CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT HHCDH8EHFFGFAGDFIEEEGEFFGFFGFFGFFEGEFFFGFEFE NM:i:0 AS:i:43
+HS21_09876:1:1106:16061:54950#83 0 AE004091 7059 54 1S43M * 0 0 GGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC FHCBD4GHFFGFEEC<FCGEFEGHGFFEGFGFFFGDFGDGFDFF NM:i:0 AS:i:43
+HS21_09876:1:2101:14032:85058#83 0 AE004091 9250 54 2S42M * 0 0 GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG HHCEH5GHFFFFGEDC;GHFFEHGGFFGFEGFFJGDGFHGFGFF NM:i:0 AS:i:42
+HS21_09876:1:2111:11125:6617#83 4 * 0 0 * * 0 0 GAATCGAGCGCGCGCTGCCCAAGGACACCCGGGGACCGGCGCGG HG2BH8HEFGFFGH;EFGHFGEGGGFEGGFGFFGGDGEHGFEFF NM:i:0 AS:i:0
+HS21_09876:1:2202:3163:76297#83 0 AE004091 9250 54 2S42M * 0 0 GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG HHCEH8EGFEGFGEIFDGHFGEHECFFGGFGFFDGEGGHGFEFF NM:i:0 AS:i:42
+HS21_09876:1:2205:20175:3703#83 0 AE004091 9250 54 2S42M * 0 0 GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG H>8BI2A<FEFFGCE<EDFDDEHH?F=GFFGF3FGEGGHGDDFE NM:i:0 AS:i:42
+HS21_09876:1:2205:6527:34286#83 0 AE004091 9250 54 2S42M * 0 0 GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG HGBDH4HHFGFFGFDFDGHEGEHGGFEGFJGFGGGEGFHGFFFF NM:i:0 AS:i:42
+HS21_09876:1:1201:10071:48582#83 0 AE004091 9265 54 2S42M * 0 0 GCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG HHCDI8EHFGFFGEFFFGGFGEFGGFFGGFGFG8G8ECFGFFAE NM:i:0 AS:i:42
+HS21_09876:1:2107:20205:78513#83 4 * 0 0 * * 0 0 GCCCCGAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG HHCEI%EGFFEFEGIFGDGFE>GDGFFGFEBFGDGEGEH;EFDD NM:i:0 AS:i:0
+HS21_09876:1:2207:12005:97464#83 0 AE004091 9265 54 2S42M * 0 0 GCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG HGBBH0EG?<FFEHCBGEE>DEDF?FFGFE1FE89EEGD;;@?D NM:i:0 AS:i:42
+HS21_09876:1:1208:12319:4648#83 0 AE004091 9274 54 2S42M * 0 0 CAACCTGGGGACCGGCGCGGCTGGACGCGGTATCGATGATCTTC AA>EF8EIFFGFGEC<F;FEEEG3?FFG/E=F?DG89C=GAD?E NM:i:0 AS:i:42
+HS21_09876:1:2209:14024:59451#83 0 AE004091 9391 54 1S43M * 0 0 CCCGGTGCGCTACCCGTTCCTGTGGAACGCGGCGCGGCAGAACA FHCBF.E<FEFFGHHGE;H>GEFHFFFGFFGFFFGEFGFGFGFF NM:i:1 AS:i:40
+HS21_09876:2:1211:5990:82312#83 0 AE004091 3185 54 1S43M * 0 0 TTTTCGGTCACCGCGGTGCGCAACCTGCACCCGGTGACCCTCTC HGFEH0FFDDDGCF7GFD1GCFGFGGFGFFGHEFF?FFFEEDEE NM:i:0 AS:i:43
+HS21_09876:2:2103:19946:55809#83 0 AE004091 3958 54 1S43M * 0 0 GGGTCATAACGCCGCGGAGATTCTCTCGCGCGGTCAGCAGAAGC HHEAE'EFFEGGGFHEFAHGFHG at GEFHFEGFGFFF<FGEEDCE NM:i:0 AS:i:43
+HS21_09876:2:1104:10740:37072#83 0 AE004091 7026 54 1S43M * 0 0 CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT HHFAE,FIGDEG;FHFFHH>FAGGFFF;><GHA9<F<FGE=F at C NM:i:0 AS:i:43
+HS21_09876:2:2201:4547:41892#83 0 AE004091 7026 54 1S43M * 0 0 CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT GGEEE7EFGEDGEDHGGAHFGHGFDGFCFEGFAFFFDFBEEEDE NM:i:0 AS:i:43
+HS21_09876:2:2213:12056:100809#83 0 AE004091 7059 54 1S43M * 0 0 GGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC BFEE?,B>DFG=EDF:GHHEG6GGDGFFFFGGF6FFEFGC1BFF NM:i:0 AS:i:43
diff --git a/t/data/RunTradis/notags.fastq b/t/data/RunTradis/notags.fastq
new file mode 100644
index 0000000..ed95c28
--- /dev/null
+++ b/t/data/RunTradis/notags.fastq
@@ -0,0 +1,92 @@
+ at HS21_09876:1:1105:9650:48712#83
+GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+HHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF
+ at HS21_09876:1:1106:8638:38957#83
+GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+HHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD
+ at HS21_09876:1:1204:19746:42237#83
+GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+HHCBF2GGFFEFGEEFFFEEHEEHFFFFGFGFFFGGGGHGFEFF
+ at HS21_09876:1:2210:2408:11148#83
+GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+HHCBF,GGFF<FEHFFEGFGFEEEGFGGGFGFFFGGGFHGFEFF
+ at HS21_09876:1:2210:16541:84795#83
+GGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+FDB at F%GEFDCFGHE<FD>GEEEGFFGGFFGFFBG8FGFGFEEE
+ at HS21_09876:1:1201:6607:66324#83
+CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+HHCDF8EHFEGFAGIFEDEGFEFFGFEGFEGFGFGEGGHGFEFD
+ at HS21_09876:1:2102:12312:75235#83
+CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+HHCDH8EHFFGFAGDFIEEEGEFFGFFGFFGFFEGEFFFGFEFE
+ at HS21_09876:1:1106:16061:54950#83
+GGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+FHCBD4GHFFGFEEC<FCGEFEGHGFFEGFGFFFGDFGDGFDFF
+ at HS21_09876:1:2101:14032:85058#83
+GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+HHCEH5GHFFFFGEDC;GHFFEHGGFFGFEGFFJGDGFHGFGFF
+ at HS21_09876:1:2111:11125:6617#83
+GAATCGAGCGCGCGCTGCCCAAGGACACCCGGGGACCGGCGCGG
++
+HG2BH8HEFGFFGH;EFGHFGEGGGFEGGFGFFGGDGEHGFEFF
+ at HS21_09876:1:2202:3163:76297#83
+GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+HHCEH8EGFEGFGEIFDGHFGEHECFFGGFGFFDGEGGHGFEFF
+ at HS21_09876:1:2205:20175:3703#83
+GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+H>8BI2A<FEFFGCE<EDFDDEHH?F=GFFGF3FGEGGHGDDFE
+ at HS21_09876:1:2205:6527:34286#83
+GAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+HGBDH4HHFGFFGFDFDGHEGEHGGFEGFJGFGGGEGFHGFFFF
+ at HS21_09876:1:1201:10071:48582#83
+GCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+HHCDI8EHFGFFGEFFFGGFGEFGGFFGGFGFG8G8ECFGFFAE
+ at HS21_09876:1:2107:20205:78513#83
+GCCCCGAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+HHCEI%EGFFEFEGIFGDGFE>GDGFFGFEBFGDGEGEH;EFDD
+ at HS21_09876:1:2207:12005:97464#83
+GCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+HGBBH0EG?<FFEHCBGEE>DEDF?FFGFE1FE89EEGD;;@?D
+ at HS21_09876:1:1208:12319:4648#83
+CAACCTGGGGACCGGCGCGGCTGGACGCGGTATCGATGATCTTC
++
+AA>EF8EIFFGFGEC<F;FEEEG3?FFG/E=F?DG89C=GAD?E
+ at HS21_09876:1:2209:14024:59451#83
+CCCGGTGCGCTACCCGTTCCTGTGGAACGCGGCGCGGCAGAACA
++
+FHCBF.E<FEFFGHHGE;H>GEFHFFFGFFGFFFGEFGFGFGFF
+ at HS21_09876:2:1211:5990:82312#83
+TTTTCGGTCACCGCGGTGCGCAACCTGCACCCGGTGACCCTCTC
++
+HGFEH0FFDDDGCF7GFD1GCFGFGGFGFFGHEFF?FFFEEDEE
+ at HS21_09876:2:2103:19946:55809#83
+GGGTCATAACGCCGCGGAGATTCTCTCGCGCGGTCAGCAGAAGC
++
+HHEAE'EFFEGGGFHEFAHGFHG at GEFHFEGFGFFF<FGEEDCE
+ at HS21_09876:2:1104:10740:37072#83
+CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+HHFAE,FIGDEG;FHFFHH>FAGGFFF;><GHA9<F<FGE=F at C
+ at HS21_09876:2:2201:4547:41892#83
+CCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+GGEEE7EFGEDGEDHGGAHFGHGFDGFCFEGFAFFFDFBEEEDE
+ at HS21_09876:2:2213:12056:100809#83
+GGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BFEE?,B>DFG=EDF:GHHEG6GGDGFFFFGGF6FFEFGC1BFF
diff --git a/t/data/RunTradis/smallref.fa b/t/data/RunTradis/smallref.fa
new file mode 100644
index 0000000..58dcfe9
--- /dev/null
+++ b/t/data/RunTradis/smallref.fa
@@ -0,0 +1,165 @@
+>AE004091 AE004091.2 Pseudomonas aeruginosa PAO1, complete genome.
+tttaaagagaccggcgattctagtgaaatcgaacgggcaggtcaatttccaaccagcgat
+gacgtaatagatagatacaaggaagtcatttttcttttaaaggatagaaacggttaatgc
+tcttgggacggcgcttttctgtgcataactcgatgaagcccagcaattgcgtgtttctcc
+ggcaggcaaaaggttgtcgagaaccggtgtcgaggctgtttccttcctgagcgaagcctg
+gggatgaacgagatggttatccacagcggttttttccacacggctgtgcgcagggatgta
+cccccttcaaagcaagggttatccacaaagtccaggacgaccgtccgtcggcctgcctgc
+ttttattaaggtcttgatttgcttggggcctcagcgcatcggcatgtggataagtccggc
+ccgtccggctacaataggcgcttatttcgttgtgccgcctttccaatctttgggggatat
+ccgtgtccgtggaactttggcagcagtgcgtggatcttctccgcgatgagctgccgtccc
+aacaattcaacacctggatccgtcccttgcaggtcgaagccgaaggcgacgaattgcgtg
+tgtatgcacccaaccgtttcgtcctcgattgggtgaacgagaaatacctcggtcggcttc
+tggaactgctcggtgaacgcggcgagggtcagttgcccgcgctttccttattaataggca
+gcaagcgtagccgtacgccgcgcgccgccatcgtcccatcgcagacccacgtggctcccc
+cgcctccggttgctccgccgccggcgccagtgcagccggtatcggccgcgcccgtggtag
+tgccacgtgaagagctgccgccagtgacgacggctcccagcgtgtcgagcgatccctacg
+agccggaagaacccagcatcgatccgctggccgccgccatgccggctggagcagcgcctg
+cggtgcgcaccgagcgcaacgtccaggtcgaaggtgcgctgaagcacaccagctatctca
+accgtaccttcaccttcgagaacttcgtcgagggcaagtccaaccagttggcccgcgccg
+ccgcctggcaggtggcggacaacctcaagcacggctacaacccgctgttcctctacggtg
+gcgtcggtctgggcaagacccacctgatgcatgcggtgggcaaccacctgctgaagaaga
+acccgaacgccaaggtggtctacctgcattcggaacgtttcgtcgcggacatggtgaagg
+ccttgcagctcaacgccatcaacgaattcaagcgcttctaccgctcggtggacgcactgt
+tgatcgacgacatccagttcttcgcccgtaaggagcgctcccaggaggagttcttccaca
+ccttcaatgcccttctcgaaggcggccagcaggtgatcctcaccagcgaccgctatccga
+aggaaatcgaaggcctggaagagcggctgaaatcccgcttcggctggggcctgacggtgg
+ccgtcgagccgccggaactggaaacccgggtggcgatcctgatgaagaaggccgagcagg
+cgaagatcgagctgccgcacgatgcggccttcttcatcgcccagcgcatccgttccaacg
+tgcgtgaactggaaggtgcgctgaagcgggtgatcgcccactcgcacttcatgggccggc
+cgatcaccatcgagctgattcgcgagtcgctgaaggacctgttggcccttcaggacaagc
+tggtcagcatcgacaacatccagcgcaccgtcgccgagtactacaagatcaagatatccg
+atctgttgtccaagcggcgttcgcgctcggtggcgcgcccgcgccaggtggccatggcgc
+tctccaaggagctgaccaaccacagcctgccggagatcggcgtggccttcggcggtcggg
+atcacaccacggtgttgcacgcctgtcgtaagatcgctcaacttagggaatccgacgcgg
+atatccgcgaggactacaagaacctgctgcgtaccctgacaacctgacgcagcccacgag
+gcaagggactagaccatgcatttcaccattcaacgcgaagccctgttgaaaccgctgcaa
+ctggtcgccggcgtcgtggaacgccgccagacattgccggttctctccaacgtcctgctg
+gtggtcgaaggccagcaactgtcgctgaccggcaccgacctcgaagtcgagctggttggt
+cgcgtggtactggaagatgccgccgaacccggcgagatcaccgtaccggcgcgcaagctg
+atggacatctgcaagagcctgccgaacgacgtgctgatcgacatccgtgtcgaagagcag
+aaacttctggtgaaggccgggcgtagccgcttcaccctgtccaccctgccggccaacgat
+ttccccaccgtagaggaaggtcccggctcgctgaacttcagcattgcccagagcaagctg
+cgtcgcctgatcgaccgcaccagcttcgccatggcccagcaggacgtgcgttactacctc
+aacggcatgctgctggaagtgaacggcggcaccctgcgctccgtcgccaccgacggccac
+cgactggccatgtgctcgctggatgcgcagatcccgtcgcaggaccgccaccaggtgatc
+gtgccgcgcaaaggcatcctcgaactggctcgtctgctcaccgagcaggacggcgaagtc
+ggcatcgtcctgggccagcaccatatccgtgccaccactggcgaattcaccttcacttcg
+aagctggtggacggcaagttcccggactacgagcgtgtactgccgcgcggtggcgacaag
+ctggtggtcggtgaccgccagcaactgcgcgaagccttcagccgtaccgcgatcctctcc
+aacgagaagtaccgcggcattcgcctgcagctttccaacggtttgctgaaaatccaggcg
+aacaacccggagcaggaagaggccgaggaagaagtgcaggtcgagtacaacggcggcaac
+ctggagataggcttcaacgtcagttacctgctcgacgtgctgggtgtgatcggtaccgag
+caggtccgcttcatcctttccgattccaacagcagcgccctggtccacgaggccgacaat
+gacgattctgcctatgtcgtcatgccgatgcgcctctaaacatactgaatgtccctgacc
+cgcgtttcggtcaccgcggtgcgcaacctgcacccggtgaccctctccccctccccccgc
+atcaacatcctctacggcgacaacggcagcggcaagaccagcgtgctcgaagccatccac
+ctgctgggcctggcgcgttcattccgcagtgcgcgcttgcagccggtgatccagtatgag
+gaagcggcctgcaccgtattcggccaggtgatgttggccaacggcatcgccagcaacctg
+gggatttcccgtgagcgccagggcgagttcaccatccgcatcgatgggcagaacgcccgg
+agtgcggctcaattggcggaaactctcccactgcaactgatcaacccggacagctttcgg
+ttgctcgagggagcgccgaagatccggcgacagttcctcgattggggagtgttccacgtg
+gaacctcggtttctgcccgtctggcagcgcctgcagaaggcgctgcgccagcggaactcc
+tggctccggcatggtaaactggaccccgcgtcgcaagcggcctgggaccgggaattgagc
+ctggccagcgatgagatcgatgcctaccgcagaagctatatccaggcgttgaaaccggta
+ttcgaggaaacactcgccgaattggtttcactggatgacctgacccttagctactaccga
+ggctgggacaaggaccgggacctcctggaggttctggcttccagcctgttgcgcgaccag
+cagatgggccacacccaggcgggaccgcagcgtgcggatcttcgcatacggttggcaggt
+cataacgccgcggagattctctcgcgcggtcagcagaagctggtggtatgcgccctgcgc
+atcgcccaaggccatctgatcaatcgcgccaagcgcggacagtgcgtctacctggtggac
+gacctgccctcggaactggatgagcagcatcgaatggctctttgccgcttgcttgaagat
+ttgggttgccaggtattcatcacctgcgtggacccgcaactattgaaagacggctggcgc
+acggatacgccggtatccatgttccacgtggaacatggaaaagtctctcagaccacgacc
+atcgggagtgaagcatgagcgagaacaacacgtacgactcttccagcatcaaggtgctga
+aggggctggatgccgtacgcaagcgccccggcatgtacatcggcgacaccgacgatggca
+ccggtctgcaccacatggtgttcgaggtggtggataactccatcgacgaagcgctggccg
+gttactgcagcgaaatcagcatcaccatccatacggatgagtcgatcactgtccgcgaca
+atggacgcggtattccggtggatatccacaaggaagaaggggtttctgcggcggaagtga
+tcatgaccgtcctccacgccggcggcaagttcgacgacaacacctacaaggtgtccggcg
+gcttgcacggtgtgggcgtctcggtggtgaacgcgctgtcccatgaactacgcctgacca
+tccgtcgccacaacaaggtctgggaacaggtctaccaccacggcgttccgcagttcccac
+tgcgcgaagtgggcgagaccgatggctccggcaccgaagttcacttcaagccgtccccgg
+agaccttcagcaacatccacttcagttgggacatcctggccaagcgcatccgcgagctgt
+ccttcctcaactccggcgtcggcatcctgctgcgcgacgagcgtaccggcaaggaggagc
+tgttcaagtacgaaggcggtctgaaggccttcgtcgagtacctgaacaccaacaagaccg
+cggtgaacgaggtattccacttcaacgtccagcgtgaagaggacggcgtgggtgtggaag
+tcgccttgcagtggaacgacagcttcaacgagaacctgctctgcttcaccaacaacatcc
+cgcagcgtgacggcggcacccacctggccggtttccgttcggcgctgacgcgtaacctga
+acaactacatcgaggccgaaggcctggcgaagaagttcaagatcgccaccaccggcgacg
+atgcccgcgaaggcctcaccgcgatcatctcggtgaaggtaccggacccgaagttcagct
+cgcagaccaaggacaagctggtctcctccgaggtgaagactgcggtggaacaggagatgg
+gcaagtacttcgccgacttcctgctggagaatcccaacgaagccaaggccgtggtcggca
+agatgatcgacgccgcccgtgcccgcgaggccgcgcgcaaggcgcgcgagatgacccgcc
+gcaagggcgcgctggacatcgccggcctgcccggcaaactggccgattgccaggaaaagg
+acccggcgctctccgaactgtacatcgtggagggtgactccgcgggcggttccgccaagc
+agggccgcaatcgccggacccaggcgatcctgccgctcaagggcaagatcctcaacgtcg
+aaaaggcgcgcttcgacaagatgctctcctcccaggaggtcggtacgctgatcaccgccc
+tgggctgtggcatcggccgcgaggaatacaacatcgacaagctgcgctaccacaacatca
+tcatcatgaccgatgctgacgtcgacggttcgcacatccgcaccctgctgttgaccttct
+tcttccgccagatgcccgagctgatcgagcgtggctacatctacatcgcccagcccccgt
+tgtacaaggtcaagcgcggcaagcaggagcagtacatcaaggacgaccaggccatggaag
+agtacatgacccagtcggccctggaagacgccagcctgcacgtcaacgagcacgctccgg
+gcctgtccggggcggcgctggagaaactggtcaacgagtatcgcggggtgatcgccaccc
+tcaagcgcctgtcgcgcctgtacccccaggagctgaccgagcacttcatctacctgccta
+ccgtgtcggtggacgacctggctaacgagtcggccatgcagggctggttggagaagttcc
+aggcgcgcctgaccgccgccgagaagtccggcctgacctacaaggccagcctgcgcgaag
+accgcgagcgccacctgtggctgcccgaggtggaactggtggcccacggcctgtccagct
+acgtcaccttcaaccgtgacttcttcgccagcaatgactaccgctcggtgtcgctgctcg
+gcgaccagctgaacagcctgctggaagacggcgcctacgtgcagaagggtgagcgcaagc
+gcccgatcagcgccttcaaggacggcctggactggctgatggccgaaggtaccaagcgcc
+acagcatccagcgatacaaggggctgggcgagatgaaccctgagcagctgtgggaaacca
+ccatggatccgaacgtccggcgcatgctcaaggtgaccatcgaggatgccatcgccgccg
+accagatcttcaacaccctgatgggcgatgccgtggagccgcgccgcgacttcatcgaaa
+gcaacgcgctggcggtgtcgaacctggacgtgtgacaggtcggcagaccgaccctcatgg
+aaaccccggcctggcgccggggttttctttttgcgccaggtagcctggatacgggcgcca
+ggggtgccttgccaaggtgtggccgagccccggttactcgccggcattggcaccctggac
+ccgggcctcctggcggcgtggcaccgcttctgtgggcagcggtcgccggtcggttcggtc
+gatcgttgccagccggccttgctttgcgcctcgcgtgaaaacaagaagccccgctatggc
+ggggcttcttttatcgaatcggcgcacagtacgccttgcagggggctttgcggcccttca
+cgagaccaccgacggctccggatggctgacccgctgctggatggggctgatctcggccat
+ggtctcgctgacccaggcttcggcgcgctggtttagctcggcgatggcgcgcgggccttc
+gccttcggcgtgcatggccgggccgatcaccacctggatggtgcccgggtacttggccca
+gccggccttgggccaatactgcccggcgttgtgggcgatcggcagtaccggtagcccggc
+gttgaccgccagggcggtgccgccgcgggagaacttgcccatctgccccaccggaatacg
+cgtgccttccgggaagatcagcacccaggcgcctttcttcaggcactcgtcgccctgctt
+ggccagttgcttgagggccagcttgggctggctgcggtcgatggcgatgggcttgagcag
+ggccagggcccagccgaagaacggcacgtagagcagctcgcgcttgagtacctggctgag
+tggctcgaagaagccggagaggaagaaggtttcccaggtgctctggtgcttggagaggat
+cacgcagggcttttccgggatgttctccagtccgcgcacctcgtagcggatgccggcgac
+cacgcgggtcagccagatcgcgaagcggcaccagttctgtaccacgaagcggtagcgggc
+gcggaacggcaggatcggcgcgatgaagaagctgagggtgccccagacgaacgcgctggc
+ggacagcagcaggtaaaagaggacggttctgatggcctgcactgtcgacatgtattctga
+ccttactgaagtaatgcgctggcgactgccgccagatcgtcgaatatcagggtgccctct
+ggcaagggcttgcccagcgtacgtacaccttttccggtctttaccaataccggctgacaa
+tcgacggcccgcgccgcctccaggtcaccgatgctgtcgccgacgaaccagatacccgac
+agatcgaccccgtagtgctcgccgatctgccgcagcatacccggcttcggcttgcggcag
+tcgcaaccgtcgtccggtccatgcggacaatagacgatgaggccgacctcgccgccctgc
+tccgcgaccagttcgcgcaagcgcgcatgcatggcctcgagcactgccaggtcgtaatag
+ccacgggcgatgccggactggttggtagccaccgcgacggtccagccggcctggctcagg
+cgggcgatggcctcgatcgagctggggatggggatccactcgtcgagggtcttgatgtaa
+tcgtcggagtcgaggttgatgactccatcgcggtcgagaatcagcagggaacgggacatc
+gatgcgcagttggccatgaacggaaaggatcgattctacctcagccagccggagcatcgc
+ggatggatcgacgagccccctacgctggacaatctgtactagattcaataatggcaatgg
+aatggcaatcccaggccagggagtcatttggcacgcagcagtgggtgtctcggagtacgt
+gcgaaccccttggcgggtggatcaccggagtaacgcagtaagcgcctatcgcatgccagc
+acggccgaccggccgtgtttccaccacaggtggagcgggcgtgacgacggggagttccgg
+ggcgtctgcccgttcccaaggacggtaaccgtgaaacgcctgaaaaagacactgcacctt
+tcaagcttgtccctcgcttccctggctctttcttccgccgccctggcggccgctccggtc
+atgctcgaccagggcaaggaatggaccgaaagccaccgccaggacttctacagccgcgac
+cagggctcgcaggtgatgcccctgccctggctcaaggcgttgcgacagccggatggaacg
+cctttcctcgccgacagcctggcccgctacggctatttgcccaaccccaaggcgcccgcg
+gaaggcctgccggtgggcttcaccgtagccggcacgggcgcccggcagatggtcggcatg
+acctgttcggcctgccatacccggcagatcgaggtgaagggcactgcctatcggatcgac
+ggcggtccggcgatcgtcgacttccaggcattcctcgccgacctcgatcgggccgtggga
+ccgctgaccagcgatgacgccgccttcgacgccttcgccaagccgatcctcggggccaat
+ccgcctcccggtgcgcgcgacgctctgctcgcggcggtgaaggaatggtacgagccctat
+cacacgctgatcgagcgcgcgctgcccaaggacacctggggaccggcgcggctggacgcg
+gtatcgatgatcttcaaccgccttaccgggctggatatcggcaccgcgccgccctacctg
+attcccgacaacatcaaggcggccgatgcgccggtgcgctatccgttcctgtggaacgcg
+gcgcggcagaacaagacccagtggcccggcttcgccgccaacggcaacgacctgctcggc
+ctggcgcgcaatgtcggcgaggtctacggggtgttcgccaccttccacccgcagaagagc
+aagttccacctgctgggcatggactacctgaagatcaactcggccaacttccacgggctg
+ggcaagctggaagacctgatcaagaagatcggcccgccgaagtggccctgggcggtggac
+aagcacctggccaggaaaggcgcgctgatcttcgcccgcaagaccgacgaaggtggctgc
+gtggagtgccacggcatccggatcaaggacctggtgctttgggacactccgctgagggac
+gtcggcagcgacagccgccagcacgccatcctcgatggccaggtgcagaccggcgtgatg
diff --git a/t/data/RunTradis/test.tagged.fastq b/t/data/RunTradis/test.tagged.fastq
new file mode 100644
index 0000000..036f778
--- /dev/null
+++ b/t/data/RunTradis/test.tagged.fastq
@@ -0,0 +1,112 @@
+ at HS21_09876:1:1105:9650:48712#84
+TAAGATTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF
+ at HS21_09876:1:1106:8638:38957#84
+TGAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+B at CFFFFFHHHHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD
+ at HS21_09876:1:1105:9650:48712#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCEE8EEFGFFGFIFGGFGEEHFFFGGGFGFGEGEEEFGFGFF
+ at HS21_09876:1:1106:8638:38957#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+B at CFFFFFHHHHCEF7FHFFFFGFEGEFFEHEGEGFGGGEGFGFGGFEHGFEFD
+ at HS21_09876:1:1204:19746:42237#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCBF2GGFFEFGEEFFFEEHEEHFFFFGFGFFFGGGGHGFEFF
+ at HS21_09876:1:2210:2408:11148#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBCFFFFFHHHHCBF,GGFF<FEHFFEGFGFEEEGFGGGFGFFFGGGFHGFEFF
+ at HS21_09876:1:2210:16541:84795#83
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BCCFFFFFHHFDB at F%GEFDCFGHE<FD>GEEEGFFGGFFGFFBG8FGFGFEEE
+ at HS21_09876:1:1201:6607:66324#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BCCDFBDEHHHHCDF8EHFEGFAGIFEDEGFEFFGFEGFEGFGFGEGGHGFEFD
+ at HS21_09876:1:2102:12312:75235#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BCCDFFFFHHHHCDH8EHFFGFAGDFIEEEGEFFGFFGFFGFFEGEFFFGFEFE
+ at HS21_09876:1:1106:16061:54950#83
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BBBDFFFFHHFHCBD4GHFFGFEEC<FCGEFEGHGFFEGFGFFFGDFGDGFDFF
+ at HS21_09876:1:2101:14032:85058#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFFFFHHHHCEH5GHFFFFGEDC;GHFFEHGGFFGFEGFFJGDGFHGFGFF
+ at HS21_09876:1:2111:11125:6617#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCCGGGGACCGGCGCGG
++
+BCCDDDDDFHHG2BH8HEFGFFGH;EFGHFGEGGGFEGGFGFFGGDGEHGFEFF
+ at HS21_09876:1:2202:3163:76297#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFDDDHHHHCEH8EGFEGFGEIFDGHFGEHECFFGGFGFFDGEGGHGFEFF
+ at HS21_09876:1:2205:20175:3703#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFFFEHHH>8BI2A<FEFFGCE<EDFDDEHH?F=GFFGF3FGEGGHGDDFE
+ at HS21_09876:1:2205:6527:34286#83
+TAAGAGTCAGGAATCGAGCGCGCGCTGCCCAAGGACACCTGGGGACCGGCGCGG
++
+BCCDFFFFHHHGBDH4HHFGFFGFDFDGHEGEHGGFEGFJGFGGGEGFHGFFFF
+ at HS21_09876:1:1201:10071:48582#83
+TAAGAGTCAGGCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+CCCDFFFFHHHHCDI8EHFGFFGEFFFGGFGEFGGFFGGFGFG8G8ECFGFFAE
+ at HS21_09876:1:2107:20205:78513#83
+TAAGAGTCAGGCCCCGAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+BCCFFFFFHHHHCEI%EGFFEFEGIFGDGFE>GDGFFGFEBFGDGEGEH;EFDD
+ at HS21_09876:1:2207:12005:97464#83
+TAAGAGTCAGGCCCCAAGGACACCTGGGGACCGGCGCGGCTGGACGCGGTATCG
++
+BCCDFFFFHHHGBBH0EG?<FFEHCBGEE>DEDF?FFGFE1FE89EEGD;;@?D
+ at HS21_09876:1:1208:12319:4648#83
+TAAGAGTCAGCAACCTGGGGACCGGCGCGGCTGGACGCGGTATCGATGATCTTC
++
+B=BDFFFDH>AA>EF8EIFFGFGEC<F;FEEEG3?FFG/E=F?DG89C=GAD?E
+ at HS21_09876:1:2209:14024:59451#83
+TAAGAGTCAGCCCGGTGCGCTACCCGTTCCTGTGGAACGCGGCGCGGCAGAACA
++
+BCCDFFFFHHFHCBF.E<FEFFGHHGE;H>GEFHFFFGFFGFFFGEFGFGFGFF
+ at HS21_09876:2:1211:5990:82312#83
+TAAGAGTCAGTTTTCGGTCACCGCGGTGCGCAACCTGCACCCGGTGACCCTCTC
++
+BCCFFFFFHHHGFEH0FFDDDGCF7GFD1GCFGFGGFGFFGHEFF?FFFEEDEE
+ at HS21_09876:2:2103:19946:55809#83
+TAAGAGTCAGGGGTCATAACGCCGCGGAGATTCTCTCGCGCGGTCAGCAGAAGC
++
+BBCFDEFFHHHHEAE'EFFEGGGFHEFAHGFHG at GEFHFEGFGFFF<FGEEDCE
+ at HS21_09876:2:1104:10740:37072#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BBBDDFFFHHHHFAE,FIGDEG;FHFFHH>FAGGFFF;><GHA9<F<FGE=F at C
+ at HS21_09876:2:2201:4547:41892#83
+TAAGAGTCAGCCCACCGACGGCTCCGGATGGCTGACCCGCTGCTGGATGGGGCT
++
+BCCDFFFFHHGGEEE7EFGEDGEDHGGAHFGHGFDGFCFEGFAFFFDFBEEEDE
+ at HS21_09876:2:2213:12056:100809#83
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BBCDDDDDHDBFEE?,B>DFG=EDF:GHHEG6GGDGFFFFGGF6FFEFGC1BFF
+ at HS21_09876:1:1115:10349:43433#83
+TTTTCGACAACCTTTTGCCTGCCGGAGAAACACGCAGTTGCTACCNNACNCTNN
++
+8,(,*A<A2;DGE4B>HGFEDDCFG8CE=FF8BB7ED?FEEE522!!<2!:0!!
+ at HS21_09876:1:1211:4356:84410#83
+TTCTCGACAACCTTTTGCCTGCCGGAGAAACACGCAGTTGCTACCTGACTCTTA
++
+>E52EHFGFFGGFFFGHGHEEEGFGEGFGFGFGCGGFGFGFDHHHHFFFFFCCC
+ at HS21_09876:1:1101:19209:27276#83
+CGCACAGCCGTGTGGAAAAAACCGCTGTGGATAACCATCTCGGCCTGACTCTTA
++
+CEF4GHFDFFEEIFECHFGEFFGFEFGFGFFFGDHGHGFEFFHHHHFFFFFCCC
diff --git a/t/data/RunTradis/test.tagged.fastq.gz b/t/data/RunTradis/test.tagged.fastq.gz
new file mode 100644
index 0000000..d4b5f3f
Binary files /dev/null and b/t/data/RunTradis/test.tagged.fastq.gz differ
diff --git a/t/data/RunTradis/test2.tagged.fastq b/t/data/RunTradis/test2.tagged.fastq
new file mode 100644
index 0000000..598b411
--- /dev/null
+++ b/t/data/RunTradis/test2.tagged.fastq
@@ -0,0 +1,452 @@
+ at HS21_09876:1:1207:4978:63940#75
+TAAGAGTCAGGGGATAGAAACGGTTAATGCTCTTGGGACGGCGCTTTTCTGTGC
++
+CCCFFFFFHHGHC7E4EEFGFFGGFFFCEG at EHGFFEGFEGFFEGEHFFGFGFE
+ at HS21_09876:1:1203:13201:16985#75
+TAAGAGTCAGCGGGTTAATGCTCTTGGGACGGCGCTTTTCTGTGCATAACTCGA
++
+BCCFFFFFGHHHCED9GEFDEFGFIFEGCEFEHGGFGGFFGFFGGEFGHGEGFF
+ at HS21_09876:1:1105:14817:70208#75
+TAAGAGTCAGGCCTCTTGGGACGGCGCTTTTCTGTGCATAACTCGACGAAGCCC
++
+CCCFFFFFHHHHCEF8HHFGCFGGEFEFEGGEFFGFFGFFGFGFGEGGHGFEFE
+ at HS21_09876:1:1101:1155:30938#75
+TAAGAGTCAGGTTGCATAACTCGACGAAGCCCAGCAACTGCGTGTTTCTCCGGC
++
+B=?DDDEFHCFHBDD,AEFEGDGGCFFGE>DEAHEFFFCFGFFFDEGEFGFFFE
+ at HS21_09876:1:2204:6930:62477#75
+TAAGAGTCAGGGGCAAAAGGTTGTCGAGAACCGGTGTCGAGGCTGTTTCCTTCC
++
+BBCFFFFFHHHHCEF5GHFFCFDGEFBCHFFEFFGFFGFFGFFDGEEGFGFGFE
+ at HS21_09876:1:2211:14592:36752#75
+TAAGAGTCAGGGGTCACCGCGGTGCGCAACCTGCACCCGGTGACCCTCTCCCCC
++
+CCCFFFFFHFHH9BF%GGFFEFDGFFF;EFFEHGGFEGFFGFFEGDEFHGFGFE
+ at HS21_09876:1:1101:1117:56616#75
+TAAGAGTCAGGGGCCTGCACCGTATTCGGCCAGGTGATGTTGGCCAACGGCATC
++
+=:=DADDDFFHHCDF8EEFGGFGEEFDGHEEEGGCFFFFFGFGFGCGGFGE at ED
+ at HS21_09876:1:1106:9993:12675#75
+TAAGAGTCAGGGGCCTGCACCGTATTCGGCCAGGTGATGTTGGCCAACGGCATC
++
+BBBFFFFFHHFHCBI2DEFGGFGEFFFGHGIEHHGFFGFFGFFJGEHFFGFDFE
+ at HS21_09876:1:2205:12308:83747#75
+TAAGAGTCAGGGGCCTGCACCGTATTCGGCCAGGTGATGTTGGCCAACGGCATC
++
+BCCFFFFFHHHHC at F7EEFGFFGFEFGGGFHEGEFFFGFFGFFECDEGHGFFFF
+ at HS21_09876:1:2211:5325:48675#75
+TAAGAGTCAGGGGCCTGCACCGTATTCGGCCAGGTGATGTTGGCCAACGGCATC
++
+1:B4A2AD2ACF57<'GE4EEFG9 at FDDGGIEE?F:=8FEGFGDGACGFGEDA:
+ at HS21_09876:1:1202:13852:46659#75
+TAAGAGTCAGGGGCCAACGGCATCGCCAGCAACCTGGGGATTTCCCGTGAGCGC
++
+CCCFFFFFHHHHCEH8EEFGFFDG7FG;EFFEAHEFGGFFBFGEGEGGFGEGFF
+ at HS21_09876:1:1110:4160:49896#75
+TAAGAGTCAGAAACTCTCCCACTGCAACTGATCAACCCGGACAGCTTTCGGTTG
++
+BCBFFFFDHHHHCDF8AEFGCFGHDFGCHGDEFFGFFGGFGFGFG8GGHGFFFE
+ at HS21_09876:1:2205:9754:20814#75
+TAAGAGTCAGAAACTCTCCCACTGCAACTGATCAACCCGGACAGCTTTCGGTTG
++
+BBCFDEFEHHHHCEE4EIFGGFAFEFGGHFFEGEFFGGFEGFFFGEFEHGFEFF
+ at HS21_09876:1:1104:13063:60859#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHH>0 at F,GEFE3CHEEFDC2FEEAG?FCEFED=F8CEEEH;;EDE
+ at HS21_09876:1:1107:8692:25384#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+@@CFFFFFHHHHA at E7EIFEEFGE-<FF>F at EHDCFF8G>GFFBGCCCHGF:AD
+ at HS21_09876:1:1109:11137:7630#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BCCFFFFFHHGHCBF8EEFDEFGEEFGG>GFEGGCFFGGFGFFEGGFFHGFEFF
+ at HS21_09876:1:1110:7663:40978#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BB@=DADDHDFH?7D9EGFFEFGFEFF;>FDED?FFEGGEGFGFACFFFGFFFE
+ at HS21_09876:1:1201:5332:2719#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BCCFFFFFHHHHADF4EHFEEFGFEFEGCG at EEFCFFGFFGFGFGEEGHGFFFD
+ at HS21_09876:1:1204:12364:36595#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCBD2EGFF<FGEIFFD>FFEDFEFFGFFGFGEGEGEHGFGFF
+ at HS21_09876:1:2102:4320:20528#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBBFFFDDFFHHCEF2EEFGCFGEEGED>G at EEGEFGGGEGFGEBCEGHGFEED
+ at HS21_09876:1:2102:17907:93005#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHCEE5EEFFEFGEEFEGFEEEDFCFGGFFGFFGGGFGHGFEFF
+ at HS21_09876:1:2104:19430:56353#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBCDFFFEHHHHCBH5FGFEEFGEDEFG>EHEEEEFFGGEGFFEGDGGFGFGFE
+ at HS21_09876:1:2106:8768:77924#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBCFFFFFHHHHCBE7EGFFEFG87CEDFEFEFHCFFGFFGFFEGEGEHGFEDF
+ at HS21_09876:1:2109:3560:75405#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+B@@DFDDFHHHHCBD,FGFE<FGEIEEG>FIEGGFFGGGFGFFEGEFGFGFEFD
+ at HS21_09876:1:2201:7109:15683#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBCFFFFFHHHHCBF5GHFECFGEFFEGEGEEEFFFEGFFGFFGGGEFHGFEFF
+ at HS21_09876:1:2204:5779:59154#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFEHHHHCEF7EEFF<DGHIEFD>E at EHGFFFGGEGFFDCEEGHGEFFE
+ at HS21_09876:1:2210:14908:13619#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBCFFFFFHFHHC7H,EEFG<FGC7CDD>DEEAFGF=GA>GFG8GCGGHGFDFD
+ at HS21_09876:1:2210:1263:58662#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBBFFFFFHHHGBBH4HE?FE at GC7GFDFEDEAHCFFG;>GFGFG8EEHGF at DD
+ at HS21_09876:1:2211:14421:77160#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHFFF;EE-HEFFCFGCDFGDFFHEDFFFGGFEGFGEGEGGHGFGEF
+ at HS21_09876:1:1107:18833:61679#75
+TAAGAGTCAGGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTCGGCGC
++
+CCCFFFFFHHHH87E,G24E<9<F@<F;2>IE-FGFFG/1GFFFGEGE=;FGFC
+ at HS21_09876:1:1201:13166:59616#75
+TAAGAGTCAGGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTCGGCGC
++
+BCCFFFFFHHHHCDF5GEFFEFEFEFFDEGGEHGEFEEFFGFGFGDEGHGFGFD
+ at HS21_09876:1:1205:1312:68078#75
+TAAGAGTCAGGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTCGGCGC
++
+B@@FFFFFHHHHCDE,GEFCEFEFEFDGCGFEGGGFFEFEGFFEGECEHGFFFE
+ at HS21_09876:1:2101:9743:73722#75
+TAAGAGTCAGGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTCGGCGC
++
+BCCFFFFFHHHHCDF7EEFFEFGFEFBDFEHEEFGFFFFFGFGFGEEEFGFEFE
+ at HS21_09876:1:2112:4406:21609#75
+TAAGAGTCAGGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTCGGCGC
++
+BBCDFFFFHHHD-<<+8=F<EADG7FFBEGFEEFG9F4FEGF?FGGEEHGFEEE
+ at HS21_09876:1:2207:15792:48961#75
+TAAGAGTCAGGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTCGGCGC
++
+BCCFFFFFHHHGCEF,AGFCCFDEEFD;CGIEAECFF8GFGFF8GEGGFGFEFE
+ at HS21_09876:1:1102:3356:32350#75
+TAAGAGTCAGGGGACATCGATGCGCAGTTGGCCATGAACGGAAAGGATCGATTC
++
+CCCFFFFFHHHHC at F8EHFEEFGEIFDDEGGEGGFFFGFFGFFEGEFGHGFEFE
+ at HS21_09876:1:1108:19283:13217#75
+TAAGAGTCAGGGGACATCGATGCGCAGTTGGCCATGAACGGAAAGGATCGATTC
++
+B at CBDDBDHHHH8BF2EHFF<FGHFFDCGFFEGEGFEGFFGFFDGDGFHGFDFD
+ at HS21_09876:1:1201:19929:5101#75
+TAAGAGTCAGCCCCCTACGCTGGACAATCTGTACTAGATTCAATAATGGCAATG
++
+BCCDFFFFHHHHCEH7GHFFFFGGEFGFFFFEDHGFGGFEGFFGGEGFHGFDFF
+ at HS21_09876:1:2105:4638:75190#75
+TAAGAGTCAGCCCCCTACGCTGGACAATCTGTACTAGATTCAATAATGGCAATG
++
+BBCDFFFFHCFHCEH7GEFGFFGEEFDEFFFEGHGFGGFFGFGDGEGFHGFEFE
+ at HS21_09876:1:2207:17913:29384#75
+TAAGAGTCAGCCCCCTACGCTGGACAATCTGTACTAGATTCAATAATGGCAATG
++
+BCCDFFFFHHHHCDH9EHFGGFGHDFGDHGEEHGGFGGGFGFFEGEGFHGDEFF
+ at HS21_09876:1:2112:7251:38022#75
+TAAGAGTCAGTTTCCCAAGGACGGTAACCGTGAAACGCCTGAAAAAGACACTGC
++
+BBCFFFFDFFHF-7())EF=F8GE+EE2FF5+EEF7=/AF=F/FGDCE=G;@AD
+ at HS21_09876:1:1104:16812:95781#75
+TAAGAGTCAGGGGGCAAGGAATGGACCGAAAGCCACCGCCAGGACTTCTACAGC
++
+BCBFFFFFHHHHCDH%GEFGGCGEEFFGHGGEDFGFFGFFGFGFGCFGFGFGFD
+ at HS21_09876:1:2107:10172:88839#75
+TAAGAGTCAGGGGCAAGGAATGGACCGAAAGCCACCGCCAGGACTTCTACAGCC
++
+CCCFFFFFHHHHCBE-GIFEE at GECFFDHEIEFHGFFGGFAFGEGDFFHGFDFF
+ at HS21_09876:1:2101:13178:6874#75
+TAAGAGTCAGGGGTGATGCCCCTGCCCTGGCTCAAGGCGTTGCGACAGCCGGAT
++
+BCCDFFFFHA?FC7<7E2FDFF<EDFFEEEF>HEGFGGFEGFE?GDGG=GDFBE
+ at HS21_09876:1:2207:5093:25809#75
+TAAGAGTCAGCCCCCTGCCCTGGCTCAAGGCGTTGCGACAGCCGGATGGAACGC
++
+BBCDDEFDHHFFCBF,FEFECFGFFFF;HGGEFFEFEGFFGFGDGEGGHGFFBE
+ at HS21_09876:1:1105:3593:46102#75
+TAAGAGTCAGGGGCTCAAGGCGTTGCGACAGCCGGATGGAACGCCTTTCCTCGC
++
+CCCFFFFFHHHHCDE4EGFGECGFEFFEGFEEGFEFEGGEGFFJGFFGHGFGFF
+ at HS21_09876:1:1214:11162:39342#75
+TAAGAGTCAGGGGCTCAAGGCGTTGCGACAGCCGGATGGAACGCCTTTCCTCGC
++
+BCCDDFFFHHHHCB<&3GFEFFGGEFFDFGDEHGECGGGFGFFFGEEGFDFEFD
+ at HS21_09876:1:2103:18144:97839#75
+TAAGAGTCAGGGGCTCAAGGCGTTGCGACAGCCGGATGGAACGCCTTTCCTCGC
++
+CCCFFFFFHHGFCEE'EIFFGFDFDFECGGHEFGGFFCGFGFGDGEGEHGFEFD
+ at HS21_09876:1:1109:10864:56828#75
+TAAGAGTCAGCCCGCTGACCAGCGATGACGCCGCCTTCGACGCCTTCGCCAAGC
++
+BCCDFFFFHHHFABE2EHFGCFEEE<FCHGFEHEGFEGFE=FGFGEECHGFFFE
+ at HS21_09876:1:2102:16237:67170#75
+TAAGAGTCAGGGGACAAGCACCTGGCCAGGAAAGGCGCGCTGATCTTCGCCCGC
++
+B at CFFFFFHHHHCBF8GEFEGFGECFFEFEIEFEGFGGGFGFFGGEGEHGFGFD
+ at HS21_09876:1:1107:14911:52768#75
+TAAGAGTCAGGGGGACACTCCGCTGAGGGACGTCGGCAGCGACAGCCGCCAGCA
++
+CCCFFFFFHHA?8B<48<?<E9EEI<B;>DFEAF?FEGAD==GE98EG=G@@ED
+ at HS21_09876:1:2108:6881:4925#75
+TAAGAGTCAGGGGGACACTCCGCTGAGGGACGTCGGCAGCGACAGCCGCCAGCA
++
+CCCFFFEEHHHHCEE0EEFGFFGGEFDGHEFEEFGFGFGFGFGDGDEEHGDEFE
+ at HS21_09876:1:1111:18499:9859#75
+TAAGAGTCAGCCCGCTGAGGGACGTCGGCAGCGACAGCCGCCAGCACGCCATCC
++
+BBCFFFFFHHHHCEF0GEFDEFEFIFFGGGFEHDGFFGGFGFFEGEGFHGFGFF
+ at HS21_09876:1:1210:19511:97335#75
+TAAGAGTCAGCCCGCTGAGGGACGTCGGCAGCGACAGCCGCCAGCACGCCATCC
++
+CCCFFFFDHFFHCDH7HGFGGFGEIFFGHGHEFFGFFGFEGFFGGGGEHGFEFD
+ at HS21_09876:1:1103:13218:78186#75
+TAAGAGTCAGCCCGTAGCGGTGGCCGGTTCGATCCTGCAGCACTTCGTGCCGAT
++
+CCCFFFFFHHHHCDF7EEFDC9GEFFECEEFEHGGFGGFFGFFFGGFGFGFFFC
+ at HS21_09876:1:2107:11891:7630#75
+TAAGAGTCAGCCCGTAGCGGTGGCCGGTTCGATCCTGCAGCACTTCGTGCCGAT
++
+ at CCFFDDDHFFHCED0GIFDEFGEEFFDEFIEEFEFFEFEGFFBGEFGFGFEFD
+ at HS21_09876:1:2201:9833:67072#75
+TAAGAGTCAGCCCGTAGCGGTGGCCGGTTCGATCCTGCAGCACTTCGTGCCGAT
++
+CCCFFFFFHHHHCEE5GHFDEFGHDFEDFEGEEHGFGGFFGFGFGDGGFGFEFC
+ at HS21_09876:2:2101:20921:89053#75
+TAAGAGTCAGGGGATAGAAACGGTTAATGCTCTTGGGACGGCGCTTTTCTGTGC
++
+CCCFFFFFHHHHD9E0FEFEGGGFHFFHHGGFGCFGFHFFGGGFFFFFGFEEEF
+ at HS21_09876:2:2205:9713:92092#75
+TAAGAGTCAGGGGATAGAAACGGTTAATGCTCTTGGGACGGCGCTTTTCTGTGC
++
+CCCFFFFFHHHGED<6?EFEDG;:EEC;=GEAG at GFF;FGGCA9F>DFDFCE at E
+ at HS21_09876:2:2208:11577:65116#75
+TAAGAGTCAGGGGATAGAAACGGTTAATGCTCTTGGGACGGCGCTTTTCTGTGC
++
+BBCFFDFFDFFA at AE3F3@D:GGFD:FHD>=FGFGD<A>1GDAGF?<FG?EBFC
+ at HS21_09876:2:2210:17556:49545#75
+TAAGAGTCAGGGGATAGAAACGGTTAATGCTCTTGGGACGGCGCTTTTCTGTGC
++
+B at BFFFFFHHHHF9E1FDGEE=GDDEFAH>FEGGDEFGFFGDG9FF<FEFH:FB
+ at HS21_09876:2:1203:11706:53883#75
+TAAGAGTCAGGGGCAAAAGGTTGTCGAGAACCGGTGTCGAGGCTGTTTCCTTCC
++
+B at CFFFFFHHHHEDE,FFFEGG;:HEFDHGG6GC=>FFFCG;AFFFFFGFEF9E
+ at HS21_09876:2:2103:7357:48165#75
+TAAGAGTCAGCCCATCCACCTGCTGGGCCTGGCGCGTTCATTCCGCAGTGCGCG
++
+CCCFFFFFHHHHDEE3GEDFGGGFEGGFHGFFGGGEFHFFGGGFFFFFDFHFEF
+ at HS21_09876:2:1102:4592:99056#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBCFFFFFHHHHDDE,FFGFFGGF-GIFCFGFGHDDFGFFGGEFFFFFEFFFED
+ at HS21_09876:2:1105:18701:63246#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BBCFFFFFHHHHFDE3FFFEFGGDDFFFDEHEGHGFFFFF>GFFFFFFGFEFED
+ at HS21_09876:2:1107:9181:47786#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHFHHEDE1FFF4GGGEEFGFFGFHGHGFFHFFGEGFFFEFEFEFCE
+ at HS21_09876:2:2101:7072:68459#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHDEE3FFFFDGGF7EFHAFFGGFGEFHFFGGGFFFFFGFHFFD
+ at HS21_09876:2:2104:11024:92879#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFFHHHHDDE7FFDG:GGDEEFF=GGFAHFFFFFGGEEFFFFFGFEFEF
+ at HS21_09876:2:2106:9334:51625#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BB at FBDADFHHFEA<1FFG::=GFH0=;1>=FA at D>FAF<>;A9FFFFG?=B9E
+ at HS21_09876:2:2107:14640:85151#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+BB at BDDFFHHFHFEE,FIDFDGGDFFGF=GHGGHFFFHFHGEGFFF at FGEEEDD
+ at HS21_09876:2:2201:18727:56295#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+B=BDFFFFHHD>EAE3GDFCD=GEEDGH1>C6GGD>FG3FGHEFFF0F7EEDDC
+ at HS21_09876:2:2203:20492:60041#75
+TAAGAGTCAGGGGTCGGCAGACCGACCCTCATGGAAACCCCGGCCTGGCGCCGG
++
+CCCFFFFEHFFFCEE'FFFFDGGEEGGFAFFFGHGDFHFFGHGFFFFFGEEEEF
+ at HS21_09876:2:1102:1602:23426#75
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BBCFFFFFHHFHDAE6FFDEGGGDC:FDHEGHA at GGFGFFGEGFFFFFGEFBFE
+ at HS21_09876:2:1104:6936:48990#75
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+CCCFFFFFHHHHDEE,FFFEGGGDF:F;HFGFGFGEFGFFGGEGFFFFGFFFEF
+ at HS21_09876:2:2101:9813:71457#75
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BCCDFFFFHHHHEEE3FIDEGGGDEDFAHGGGGGGGFFFFGHEFFFFFEFHDEF
+ at HS21_09876:2:2201:13960:2115#75
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BCCFFFFFHHHHFEE4FFGEGGGDFAGDHGHGGGGFFGFFGEDFFFFFDFHDED
+ at HS21_09876:2:2202:14819:44089#75
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+CCCFFFFFHHHHD9E4GFFFIGGDF:GDHGGGGHGFFFFFGEEGFFFFEFEEEG
+ at HS21_09876:2:2203:10287:44498#75
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BCCFFFFFHHHHDEE6GIFEGGGDDDGHHGGFGFGFFFFEGFFGFFFFGFEEEF
+ at HS21_09876:2:2206:9622:55348#75
+TAAGAGTCAGGGGATGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTC
++
+BBCFFFFFHHHHDDE,FFFEGGGDFAGHHGGFGHFDFFFFGGDFFFFFDEHEEE
+ at HS21_09876:2:1101:1182:4708#75
+TAAGAGTCAGGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTCGGCGC
++
+BBBFFFFFHHGHF=E6EFFEEGGGFDGGEGFAGFGFFCFFGHEFFFEFFGFEED
+ at HS21_09876:2:2207:16105:64688#75
+TAAGAGTCAGGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTCGGCGC
++
+BCCFFFFFHHHHFEE1FFDDDGBFEGCFAFFEGHDEFCFEGDF9F;<FDFHF at F
+ at HS21_09876:2:2208:6290:56164#75
+TAAGAGTCAGGGGGCTGATCTCGGCCATGGTCTCGCTGACCCAGGCTTCGGCGC
++
+BCCFFFFFHHHHFEE7FEFDEGCFFGFHHEFHGFGGFAFFGGGGFF at FGEEFCG
+ at HS21_09876:2:1103:10943:7841#75
+TAAGAGTCAGGGGACATCGATGCGCAGTTGGCCATGAACGGAAAGGATCGATTC
++
+BCBFFFFFHHHHFDE8FFFFDGGFEECFHGHFGFFDFFFFGGFFFFFFGFEDEF
+ at HS21_09876:2:2105:16580:94645#75
+TAAGAGTCAGGGGACATCGATGCGCAGTTGGCCATGAACGGAAAGGATCGATTC
++
+CCCDFFFFHHHGEDE3GEFGGGG6FGGHHFHFGFGFFGFEGFEFFFFFGFEFCG
+ at HS21_09876:2:2201:10169:48549#75
+TAAGAGTCAGGGGACATCGATGCGCAGTTGGCCATGAACGGAAAGGATCGATTC
++
+CCCFFFFFHHHHFEE6GFFDEGGFHEFFHFHFGGGDFFFFGFGFFFFFGFEECC
+ at HS21_09876:2:1206:3642:93629#75
+TAAGAGTCAGCCCCCTACGCTGGACAATCTGTACTAGATTCAATAATGGCAATG
++
+BCCDFFFFHHFBEA<'F>@EFGG:EEFH=FCEG3FF<;FFGHFFFFDFGECEDF
+ at HS21_09876:2:1212:2848:49763#75
+TAAGAGTCAGCCCCCTACGCTGGACAATCTGTACTAGATTCAATAATGGCAATG
++
+BCCDDEFFHGGHFDE,DDEDHG;E;FG;HFGEGFGDFF3FGEGFFFFF7FFF9D
+ at HS21_09876:2:2101:18079:59533#75
+TAAGAGTCAGCCCGTGAAACGCCTGAAAAAGACACTGCACCTTTCAAGCTTGTC
++
+@@@DDDDDHHA+9AB1F>G01AG:CD1H=>CEA3F3FA><G;GF</CFBEC/B8
+ at HS21_09876:2:2203:9677:46062#75
+TAAGAGTCAGGAAAAAAGACACTGCACCTTTCAAGCTTGTCCCTCGTTTCCCTG
++
+BCCFFFFFHHHHFDE1FEDEGGCGHGFHHGGFGHGFFHFFGEGFFFFFGFEEED
+ at HS21_09876:2:1205:13947:81320#75
+TAAGAGTCAGGGGGCAAGGAATGGACCGAAAGCCACCGCCAGGACTTCTACAGC
++
+CCCFFFFFHHHHDEE6FFGEGGGFHGGFHGGGGGGFFFFFGFGFFFFFEFEDEG
+ at HS21_09876:2:1208:6932:10738#75
+TAAGAGTCAGGGGGCAAGGAATGGACCGAAAGCCACCGCCAGGACTTCTACAGC
++
+B at CDDEFFHDHHCEE7FFGEGGGEDEGFHFHEGFGGFHFFGFGEFFFFGEEFDE
+ at HS21_09876:2:2106:12096:83091#75
+TAAGAGTCAGGGGGCAAGGAATGGACCGAAAGCCACCGCCAGGACTTCTACAGC
++
+BCCFFFFFHHHHDEE0GFDEIGGGEGGGHGGFGHGFFFFFGFGFFFFFDEEECE
+ at HS21_09876:2:2106:9969:96661#75
+TAAGAGTCAGGGGGCAAGGAATGGACCGAAAGCCACCGCCAGGACTTCTACAGC
++
+BBBFFADDAF?D1AE6FFFGEGGEDGCDHGGAG at D>FAFEGEGFFFEFGFEEEE
+ at HS21_09876:2:1111:18613:97316#75
+TAAGAGTCAGCCCCCTGCCCTGGCTCAAGGCGTTGCGACAGCCGGATGGAACGC
++
+BBCBDFFFHHHHDAE,EFFFGGGEEEGADEHFGCGDFGFFGGGFFFFFDGEFCE
+ at HS21_09876:2:2112:7311:2729#75
+TAAGAGTCAGCCCCCTGCCCTGGCTCAAGGCGTTGCGACAGCCGGATGGAACGC
++
+BCCDFEFEHFFH7EE)GEGFFGGGCEI;HGGFGFGFFHFEGEG6FFDFECC76D
+ at HS21_09876:2:2209:5184:70364#75
+TAAGAGTCAGCCCCCTGCCCTGGCTCAAGGCGTTGCGACAGCCGGATGGAACGC
++
+CCCFFFFFHFFHDEE7FFFGFGGGDGGHHGGFGFGDFCFFGEEGFFFFEFFFEF
+ at HS21_09876:2:2206:10363:37150#75
+TAAGAGTCAGGGGGCTTCACCGTAGCCGGCACGGGCGCCCGGCAGATGGTCGGC
++
+BBBFFFFFHHHHDDE1FF at HIGGE?GGFHFEFGHGEFFFFGFGFFFFFGEEFBE
+ at HS21_09876:2:1211:8018:71514#75
+TAAGAGTCAGCCCGCTGACCAGCGATGACGCCGCCTTCGACGCCTTCGCCAAGC
++
+BBCDDEDFHHGHDAE,FEDE:2;ECF=H=>GF5 at G>FGFH3CGFFF at FDEEF9E
+ at HS21_09876:2:2207:12305:87719#75
+TAAGAGTCAGCCCGCTGACCAGCGATGACGCCGCCTTCGACGCCTTCGCCAAGC
++
+@@CADAADFFFFFEE6FEGFGGGFEFFHHGGFGHGFFHFEGHEFFFEFGFEDEB
+ at HS21_09876:2:1109:4620:60950#75
+TAAGAGTCAGAAAGCAGATCCTCGGGGCCAATCCGCCTCCCGGTGCGCGCGACG
++
+CCCFFFFFHHHHDEE4FFFEGGGHFGGFHFCFGFGEFHFFGGEGFFFFDFEFCE
+ at HS21_09876:2:1108:17674:57476#75
+TAAGAGTCAGCCCTTCCACCCGCAGAAGAGCAAGTTCCACCTGCTGGGCATGGA
++
+CCCFFFFFHHHHFEE4FFDGIGGGFGGFHGGFGGGFFFFFGFFFFFFFDFHFEC
+ at HS21_09876:2:1208:4027:38154#75
+TAAGAGTCAGCCCTTCCACCCGCAGAAGAGCAAGTTCCACCTGCTGGGCATGGA
++
+BCCFFFFFHHHHFEE6GFFEIGGGCGFFHGGFGGGEFGFFGFGFFFFFDFHFFE
+ at HS21_09876:2:2104:21108:77778#75
+TAAGAGTCAGCCCTTCCACCCGCAGAAGAGCAAGTTCCACCTGCTGGGCATGGA
++
+CCCFFFFFHHHHDEE,EFFGFGGDEEGHHGGFGCGFFCFFGFEFFFDFGCHFE8
+ at HS21_09876:2:1105:10717:93499#75
+TAAGAGTCAGGGGGACACTCCGCTGAGGGACGTCGGCAGCGACAGCCGCCAGCA
++
+CCCFFFFFHHHHDEB6DFFFDG;EEFFFAGHFGFGFFAFFGEGFFFFFGCH:9F
+ at HS21_09876:2:2107:17307:90872#75
+TAAGAGTCAGCCCGCTGAGGGACGTCGGCAGCGACAGCCGCCAGCACGCCATCC
++
+BCCDFEFDHHFHDAE7FFFFFGGFHGGHHGFFGGGEFFFFGGEFFFFFDFHEEG
+ at HS21_09876:2:2108:10562:66996#75
+TAAGAGTCAGCCCGCTGAGGGACGTCGGCAGCGACAGCCGCCAGCACGCCATCC
++
+CCCFFFFEHHFFDEE6FFDIGGGF>GFHHGFFGFGFFFFFGEGFFFFFDFFFCD
+ at HS21_09876:2:1204:3124:19338#75
+TAAGAGTCAGGGGTGCAGACCGGCGTGATGGAGGGCGCGCGGATGCCGTTCGGC
++
+CCCFFFFFHHHHDAE6FFGEIGGEHDGHHGGFGFDEFFFEGEEFFFFFDEEFFF
+ at HS21_09876:2:1104:8314:51088#75
+TAAGAGTCAGCCCGTAGCGGTGGCCGGTTCGATCCTGCAGCACTTCGTGCCGAT
++
+CCCFFFFFHGDFFEE1GFGEFGGEDDGDH>GAGFGFFHFFGGECFFFFGFHBDC
+ at HS21_09876:2:1205:9430:9196#75
+TAAGAGTCAGCCCGTAGCGGTGGCCGGTTCGATCCTGCAGCACTTCGTGCCGAT
++
+BBCDFFFFHHHHDEE7FFFGDGGEHEFHHFHFGFGDFFFFGGGFFFFFDFEFCC
+ at HS21_09876:2:1211:6841:16284#75
+TAAGAGTCAGCCCGTAGCGGTGGCCGGTTCGATCCTGCAGCACTTCGTGCCGAT
++
+BCCFFFFFHHHHDDE1FEDEE=GEFGFHHGGEGFG>FFFCGCG at FF@FDGF at DE
+ at HS21_09876:2:2101:5488:100342#75
+TAAGAGTCAGCCCGTAGCGGTGGCCGGTTCGATCCTGCAGCACTTCGTGCCGAT
++
+CCCFFFDDHHHHDEE3FFGCD=GFEGFHHEGEGFFDFGFEGDEFFFFFGFEFB8
+ at HS21_09876:2:2109:9412:27195#75
+TAAGAGTCAGCCCGTAGCGGTGGCCGGTTCGATCCTGCAGCACTTCGTGCCGAT
++
+BCCFFFFEHGBCC@<,D>GF:CGFDGGD=GG6ACDDF at FFGDECFFFF7EEDE.
+ at HS21_09876:2:2208:5757:63730#75
+TAAGAGTCAGCCCGTAGCGGTGGCCGGTTCGATCCTGCAGCACTTCGTGCCGAT
++
+BCCDDEFFHFHHFEE6FIFEEGGFEFIF=GHGGHGFFH>FGEG9FFEFDFHFEB
diff --git a/t/data/RunTradis/test2.tagged.fastq.gz b/t/data/RunTradis/test2.tagged.fastq.gz
new file mode 100644
index 0000000..0e187f2
Binary files /dev/null and b/t/data/RunTradis/test2.tagged.fastq.gz differ
diff --git a/t/data/TradisPlot/expected.plot.gz b/t/data/TradisPlot/expected.plot.gz
new file mode 100644
index 0000000..34168ba
Binary files /dev/null and b/t/data/TradisPlot/expected.plot.gz differ
diff --git a/t/data/TradisPlot/sample.fastq b/t/data/TradisPlot/sample.fastq
new file mode 100644
index 0000000..c10bf1f
--- /dev/null
+++ b/t/data/TradisPlot/sample.fastq
@@ -0,0 +1,52 @@
+ at IL2_4334:7:5:6843:6843
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=8>;A<@>=B;FF8>CCF:=CC-7(C>/22C:4;<=;
+ at IL2_4334:7:5:18259:13400
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<8:=B>=B(B88A?C@@A;;B at +21AA/38><8=C;>
+ at IL2_4334:7:15:5608:3756
+CAACGTTTTCTGCGTGTTGCCGATATTTTGGAAAGCA
++
+9AA9:17<988@=@AB6=:?;:-08C=&,6C@:8A4=
+ at IL2_4334:7:18:16351:15714
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<===?;=@<<>FCBFF=:B7?A+4/A>(22@?64?5@
+ at IL2_4334:7:39:12877:7020
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=B?=<>ACB=@;FFF=FFA<AC071??/84C=;3?75
+ at IL2_4334:7:42:14437:19550
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<7=B8 at B=;8;DF;CF;F;8A?2<6;:18;81;<;8C
+ at IL2_4334:7:53:4426:3757
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+=B<7<:9B@:@AF at A>?F@<F=47. at A,11D<45D9<
+ at IL2_4334:7:79:9021:16833
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+;A:7A;CBFBFA?ABCC>86 at B:C?A>6=:6<CB:>C
+ at IL2_4334:6:120:19845:10197
+TNAGAGACAGGTATTACTCTGCATCANTNAANNGAGA
++
+:)::9:9;BA;1CB7F:BCC==7 at 5A)=%76%%0B67
+ at IL2_4334:7:82:17494:18362
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+<79:<9;7<>8=CB@:C:AB=7410=C-46;,75>>F
+ at IL2_4334:7:84:7230:17356
+CAACGTTTTCTGCGTGTTGCCGATATTCTGGAAAGCA
++
+DADFDFFDDD>8:=>=?@48 at 87A4@F6>??BF??B@
+ at IL2_4334:6:120:19846:21043
+TNAGAGACAGTGTCTAGGGCATCACTNANGGNNGAGG
++
+<)72:19:?>:A>C?@@??CC@?:6;)5%>9%%;;;<
+ at IL2_4334:6:120:19846:19594
+TNAGAGACAGATCCTATGGGGCTGAANTNTNNNGTGA
++
+:)7:782?=AC<;@=5444@:B;>?*%)%4%%%?161
\ No newline at end of file
diff --git a/t/data/TradisPlot/test.mapped.bam b/t/data/TradisPlot/test.mapped.bam
new file mode 100644
index 0000000..57a47a6
Binary files /dev/null and b/t/data/TradisPlot/test.mapped.bam differ
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/bio-tradis.git
More information about the debian-med-commit
mailing list