# HG changeset patch
# User iuc
# Date 1496314023 14400
# Node ID 43d12513224bdf81ec5afcb32a9c7d69efe8e6b5
# Parent 937aa69e715f6a6a0f3012327638329143c72c0c
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bowtie2 commit cf554b9b69c32acb484c34fdc60384fa49c7c482
diff -r 937aa69e715f -r 43d12513224b bowtie2_macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bowtie2_macros.xml Thu Jun 01 06:47:03 2017 -0400
@@ -0,0 +1,326 @@
+
+
+
+#def identifier_or_name($input1)
+ #if hasattr($input1, 'element_identifier')
+ #return $input1.element_identifier
+ #else
+ #return $input1.name.rstrip('.gz').rstrip('.fastq').rstrip('.fq').rstrip('bz2')
+ #end if
+#end def
+
+#def clean(name)
+ #import re
+ #set $name_clean = re.sub('[^\w\-_\.]', '_', $name)
+ #return $name_clean
+#end def
+
+#def read_group_name_default($input1, $input2=None)
+ #if $input2 is None
+ #return $clean($identifier_or_name($input1))
+ #else
+ #import itertools
+ #set $input_name1 = $clean($identifier_or_name($input1))
+ #set $input_name2 = $clean($identifier_or_name($input2))
+ #set $common_prefix = ''.join([c[0] for c in itertools.takewhile(lambda x: all(x[0] == y for y in x), itertools.izip(*[$input_name1, $input_name2]))])
+ #if len($common_prefix) > 3
+ #return $common_prefix
+ #else
+ #return $input_name1
+ #end if
+ #end if
+#end def
+
+#def format_read_group(prefix, value, quote='', arg='')
+ #if $value
+ #return $arg + $quote + $prefix + $value + $quote
+ #else
+ #return ''
+ #end if
+#end def
+
+#def rg_param(name)
+ #if $varExists("rg")
+ #return $rg.get($name, None)
+ #else
+ #return $getVar($name, None)
+ #end if
+#end def
+
+#set $use_rg = True
+
+
+
+#if $use_rg
+ #if $rg_param('read_group_id_conditional') is None
+ #set $rg_id = $rg_auto_name
+ #elif $rg_param('read_group_id_conditional').do_auto_name
+ #set $rg_id = $rg_auto_name
+ #else
+ #set $rg_id = str($rg_param('read_group_id_conditional').ID)
+ #end if
+
+ #if $rg_param('read_group_sm_conditional') is None
+ #set $rg_sm = ''
+ #elif $rg_param('read_group_sm_conditional').do_auto_name
+ #set $rg_sm = $rg_auto_name
+ #else
+ #set $rg_sm = str($rg_param('read_group_sm_conditional').SM)
+ #end if
+
+ #if $rg_param('PL')
+ #set $rg_pl = str($rg_param('PL'))
+ #else
+ #set $rg_pl = ''
+ #end if
+
+ #if $rg_param('read_group_lb_conditional') is None
+ #set $rg_lb = ''
+ #elif $rg_param('read_group_lb_conditional').do_auto_name
+ #set $rg_lb = $rg_auto_name
+ #else
+ #set $rg_lb = str($rg_param('read_group_lb_conditional').LB)
+ #end if
+
+ #if $rg_param('CN')
+ #set $rg_cn = str($rg_param('CN'))
+ #else
+ #set $rg_cn = ''
+ #end if
+
+ #if $rg_param("DS")
+ #set $rg_ds = str($rg_param("DS"))
+ #else
+ #set $rg_ds = ''
+ #end if
+
+ #if $rg_param("DT")
+ #set $rg_dt = str($rg_param("DT"))
+ #else
+ #set $rg_dt = ''
+ #end if
+
+ #if $rg_param("FO")
+ #set $rg_fo = str($rg_param("FO"))
+ #else
+ #set $rg_fo = ''
+ #end if
+
+ #if $rg_param("KS")
+ #set $rg_ks = str($rg_param("KS"))
+ #else
+ #set $rg_ks = ''
+ #end if
+
+ #if $rg_param("PG")
+ #set $rg_pg = str($rg_param("PG"))
+ #else
+ #set $rg_pg = ''
+ #end if
+
+ #if $rg_param("PI") != None
+ #set $rg_pi = str($rg_param("PI"))
+ #else
+ #set $rg_pi = ''
+ #end if
+
+ #if $rg_param("PU")
+ #set $rg_pu = str($rg_param("PU"))
+ #else
+ #set $rg_pu = ''
+ #end if
+#end if
+
+
+#set $use_rg = str($rg.rg_selector) != "do_not_set"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \*|[ACMGRSVTWYHKDBN]+$
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 937aa69e715f -r 43d12513224b bowtie2_wrapper.xml
--- a/bowtie2_wrapper.xml Wed Apr 12 17:09:42 2017 -0400
+++ b/bowtie2_wrapper.xml Thu Jun 01 06:47:03 2017 -0400
@@ -1,10 +1,10 @@
-
+
- map reads against reference genome
- read_group_macros.xml
+ bowtie2_macros.xml
- bowtie2
+ bowtie2
samtools
bowtie2 --version
@@ -66,6 +66,18 @@
#set read2 = "input_r.fastq"
#end if
ln -s '${library.input_1.reverse}' ${read2} &&
+
+ #else if str($library.type) == 'paired_interleaved':
+ #if $library.input_1.is_of_type("fastq.gz", "fastqsanger.gz"):
+ #set read1 = "input_il.fastq.gz"
+ #set compressed = "GZ"
+ #else if $library.input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"):
+ #set read1 = "input_il.fastq.bz2"
+ #set compressed = "BZ2"
+ #else:
+ #set read1 = "input_il.fastq"
+ #end if
+ ln -s '${library.input_1}' ${read1} &&
#else:
#if $library.input_1.is_of_type("fastq.gz", "fastqsanger.gz"):
#set read1 = "input_f.fastq.gz"
@@ -110,6 +122,27 @@
--al '${output_aligned_reads_l}'
#end if
#end if
+
+ #elif str( $library.type ) == "paired_interleaved":
+ --interleaved '${read1}'
+ #if str( $library.unaligned_file ) == "true":
+ #if $compressed == "GZ":
+ --un-gz '${output_unaligned_reads_l}'
+ #else if $compressed == "BZ2":
+ --un-bz2 '${output_unaligned_reads_l}'
+ #else:
+ --un '${output_unaligned_reads_l}'
+ #end if
+ #end if
+ #if str( $library.aligned_file ) == "true":
+ #if $compressed == "GZ":
+ --al-gz '${output_aligned_reads_l}'
+ #else if $compressed == "BZ2":
+ --al-bz2 '${output_aligned_reads_l}'
+ #else:
+ --al '${output_aligned_reads_l}'
+ #end if
+ #end if
#else:
-1 '${read1}'
-2 '${read2}'
@@ -273,69 +306,36 @@
+
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -648,7 +648,6 @@
-
@@ -661,7 +660,6 @@
-
@@ -677,7 +675,6 @@
-
@@ -687,12 +684,29 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -705,7 +719,6 @@
-
@@ -754,12 +767,15 @@
**Inputs**
-Bowtie 2 accepts files in Sanger FASTQ format (single or pair-end). Use the FASTQ Groomer to prepare your files.
+Bowtie 2 accepts files in Sanger FASTQ format (single or paired-end). Paired-end data can represented as two individual (forward and reverse) datasets, as well as a single interleaved dataset (see an example at the end of the help section).
------
**Input options**::
+ --interleaved
+ Reads interleaved FASTQ files where the first two records (8 lines) represent a mate pair.
+
-s/--skip
Skip (i.e. do not align) the first `` reads or pairs in the input.
@@ -1137,6 +1153,57 @@
but might be more appropriate in situations where the input consists of many
identical reads.
+-----
+
+
+**Paired-end (and mate-pair) data in fastq format**
+
+Paired end datasets can be represented as two individual datasets:
+
+First dataset::
+
+ @1/1
+ AGGGATGTGTTAGGGTTAGGGTTAGGGTTAGGGTTAGGGTTAGGGTTA
+ +
+ EGGEGGGDFGEEEAEECGDEGGFEEGEFGBEEDDECFEFDD@CDD
10.1186/gb-2009-10-3-r25
diff -r 937aa69e715f -r 43d12513224b read_group_macros.xml
--- a/read_group_macros.xml Wed Apr 12 17:09:42 2017 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +0,0 @@
-
-
-
-#def identifier_or_name($input1)
- #if hasattr($input1, 'element_identifier')
- #return $input1.element_identifier
- #else
- #return $input1.name.rstrip('.gz').rstrip('.fastq').rstrip('.fq')
- #end if
-#end def
-
-#def clean(name)
- #import re
- #set $name_clean = re.sub('[^\w\-_\.]', '_', $name)
- #return $name_clean
-#end def
-
-#def read_group_name_default($input1, $input2=None)
- #if $input2 is None
- #return $clean($identifier_or_name($input1))
- #else
- #import itertools
- #set $input_name1 = $clean($identifier_or_name($input1))
- #set $input_name2 = $clean($identifier_or_name($input2))
- #set $common_prefix = ''.join([c[0] for c in itertools.takewhile(lambda x: all(x[0] == y for y in x), itertools.izip(*[$input_name1, $input_name2]))])
- #if len($common_prefix) > 3
- #return $common_prefix
- #else
- #return $input_name1
- #end if
- #end if
-#end def
-
-#def format_read_group(prefix, value, quote='', arg='')
- #if $value
- #return $arg + $quote + $prefix + $value + $quote
- #else
- #return ''
- #end if
-#end def
-
-#def rg_param(name)
- #if $varExists("rg")
- #return $rg.get($name, None)
- #else
- #return $getVar($name, None)
- #end if
-#end def
-
-#set $use_rg = True
-
-
-
-#if $use_rg
- #if $rg_param('read_group_id_conditional') is None
- #set $rg_id = $rg_auto_name
- #elif $rg_param('read_group_id_conditional').do_auto_name
- #set $rg_id = $rg_auto_name
- #else
- #set $rg_id = str($rg_param('read_group_id_conditional').ID)
- #end if
-
- #if $rg_param('read_group_sm_conditional') is None
- #set $rg_sm = ''
- #elif $rg_param('read_group_sm_conditional').do_auto_name
- #set $rg_sm = $rg_auto_name
- #else
- #set $rg_sm = str($rg_param('read_group_sm_conditional').SM)
- #end if
-
- #if $rg_param('PL')
- #set $rg_pl = str($rg_param('PL'))
- #else
- #set $rg_pl = ''
- #end if
-
- #if $rg_param('read_group_lb_conditional') is None
- #set $rg_lb = ''
- #elif $rg_param('read_group_lb_conditional').do_auto_name
- #set $rg_lb = $rg_auto_name
- #else
- #set $rg_lb = str($rg_param('read_group_lb_conditional').LB)
- #end if
-
- #if $rg_param('CN')
- #set $rg_cn = str($rg_param('CN'))
- #else
- #set $rg_cn = ''
- #end if
-
- #if $rg_param("DS")
- #set $rg_ds = str($rg_param("DS"))
- #else
- #set $rg_ds = ''
- #end if
-
- #if $rg_param("DT")
- #set $rg_dt = str($rg_param("DT"))
- #else
- #set $rg_dt = ''
- #end if
-
- #if $rg_param("FO")
- #set $rg_fo = str($rg_param("FO"))
- #else
- #set $rg_fo = ''
- #end if
-
- #if $rg_param("KS")
- #set $rg_ks = str($rg_param("KS"))
- #else
- #set $rg_ks = ''
- #end if
-
- #if $rg_param("PG")
- #set $rg_pg = str($rg_param("PG"))
- #else
- #set $rg_pg = ''
- #end if
-
- #if $rg_param("PI") != None
- #set $rg_pi = str($rg_param("PI"))
- #else
- #set $rg_pi = ''
- #end if
-
- #if $rg_param("PU")
- #set $rg_pu = str($rg_param("PU"))
- #else
- #set $rg_pu = ''
- #end if
-#end if
-
-
-#set $use_rg = str($rg.rg_selector) != "do_not_set"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- \*|[ACMGRSVTWYHKDBN]+$
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff -r 937aa69e715f -r 43d12513224b test-data/bowtie2-fq_il.fq
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bowtie2-fq_il.fq Thu Jun 01 06:47:03 2017 -0400
@@ -0,0 +1,24 @@
+@M01368:8:000000000-A3GHV:1:1101:6911:8255/1
+ATCTGGTTCCTACTTCAGGGCCATAAAACCTAAATAGCCCACACGTTCCCCTTAAATAAGACATCACGATGGATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTTCGTCTGGGGGGTGTGCACGCGATAGCATTGCGAGACGCTGGAGCCGGAGCACCCTATGTCGCAGTATCTGTCTTTGATTCCTGCCTCATCCTATTATTTATCGCACCTACGTTCAATATT
++
+BCCCCFFFFFFFGGGGGGGGGGGHHHHGHGHHHHHHHHHGGGGGGHHHHGHHHHHHHHHHGHHHHHHGGHGGHHHGHHHHFHHGHHHHHHHHHGHEHEFFGHHEGGCEFGGFHHHBGHHGHHHHGHFHHHGHGHGHGGCDFDDACGGGGGGGAAFFFFFFFFFBAFFFFFB;FFFFFFADDFFFFFFFFFFEFFFFFFFFFFBFFFFFFFFFFFFFFEFFFFFFFFBFEFFFFEFE;DFFFDFBFF/9BFB
+@M01368:8:000000000-A3GHV:1:1101:6911:8255/2
+TCGCCTTACCGCTACTCACCCACGGCGGCCATCAGCCGATACTAAGTTTGGGGTATGGTGGGGGGGATAATGAATTAGGTTGTGGGGGAGGGTTTGTGGTTGAGAGAAACACAAAAAACAATCTTATATATGGGTAGTCGTTTTGTATTGGTTTTTTGTTTTGTTTGTGTTTTGAGTGTCGGTTTAGTTCGGTGTACTAGGGGGGGTGGATGGGGTCGGCTGGTGAGGGGGTCTTAGTGTATTGAGTGTGG
++
+1>11111@11111A111A100000000////011110//>>/12@1@22B/////1@>21/>>/-----9/;////9////--;-;-;-----;--------9/-/-///9-;-------9//////9/////-//-/9-;-;9--/////99-;--9-:-;----/---/-----////---9-/////--;A-//////---------9/-----;-----/-/-----;--;//////////9;///-
+@M01368:8:000000000-A3GHV:1:1101:14518:9998/1
+GTTATTATTATGTCCTACAAGCATTAATTAATTAACACACTTTAGTAAGTATGTTCGCCTGTAATATTGAACGTAGGTGCGATAAATAATAGGATGAGGCAGGAATCAAAGACAGATACTGCGACATAGGGTGCTCCGGCTCCAGCGTCTCGCAATGCTATCGCGTGCACACCCCCCAGACGAAAATACCAAATGCATGGAGAGCTCCCGTGAGTGGTTAATAGGGGGATAGACCTGTGATCCATCGTGAT
++
+AAAAAFFFFFFFGGGGGGGGGGHGGHHHHGHHHHHHHGCGHHHHHHHHHHHHHHHGGGGGHHHHHHHHHGHHGFHFE5BGEEHFGGGHHHHHHHHFBHHGGGGFHGHHFGHHHHGHHHHHHGEGGGGFHFHGEGHHGGCDGDGHGGGDGGHGGCGGGHGHHH/ACDG?.1FGCDCCGCA.CC@CDCHFHGFFGGGEBFGAB//CEFBFGG.:;D;;A0AFFFFFB..:@ABFF//;BFFFFFBF/9D:A//
+@M01368:8:000000000-A3GHV:1:1101:14518:9998/2
+CATCACGATGGATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTTCGTCTGGGGGGTGTGCACGCGATAGCATTGCGAGACGCTGGAGCCGGAGCACCCTATGTCGCAGTATCTGTCTTTGATTCCTGCCTCATCCTATTATTTATCGCACCTACGTTCAATATTACAGGCGAACATACTTACTAAAGTGTGTTAATTAATTAATGCTTGTAGGACATAATAATAA
++
+CCCCCFCCCCCFGGGGGGGGGGHHHHHHHHHHHHHHHHGFHHHHGGGGGHGFHHHHHHHHHHHHHHHHHHHGHGGEHGGGGCGGGHHGGCGGGGGHHGHHHGGGGGGGG.BFFFGAGADFGAFDGFGGCFFF;DDFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFBFFFFFFFFFFFFFFFFFFF09FFFE00;BE@;DABBFFFFFBBFB00;F:9;FFBFFF9BFFFFFFFFFFFFF90/::BFFFBF0
+@M01368:8:000000000-A3GHV:1:1101:18422:19051/1
+GTATCCGACATCTGGTTCCTACTTCAGGGTCATAAAACCTAAATAGCCCACACGTTCCCCTTAAATAAGACATCACGATGGATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTTCGTCTGGGGGGTGTGCACGCGATAGCATTGCGAGACGCTGGAGCCGGAGCACCCTATGTCGCAGTATCTGTCTTTGATTCCTGCCTCATCCTATTATTTATCGCACCTACG
++
+CCCCCFDDDDDFGGGGGGGGGGHHHHHHHHHHHHHHHHGHHHHHHFHHHHGGGGHHHHHHHHHGHHHHHHHHHHHHGGHGGHHHHHHHHHHHHHHHHHHHHHHHHHHHGHHHHHGCGGGHHHHHHHHHHHHHHHHHHHHHHGFDHGFHCFGGGGFGGFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;FFFFFFFFFFFFFFFFFFFFFFFFFFFFEFBFFFFFFFFFF:FFF.
+@M01368:8:000000000-A3GHV:1:1101:18422:19051/2
+CTACAAGCATTAATTAATTAACACACTTTAGTAAGTATGTTCGCCTGTAATATTGAACGTAGGTGCGATAAATAATAGGATGAGGCAGGAATCAAAGACAGATACTGCGACATAGGGTGCTCCGGCTCCAGCGTCTCGCAATGCTATCGCGTGCACACCCCCCAGACGAAAATACCAAATGCATGGAGAGCTCCCGTGAGTGGTTAATAGGGGGATAGACCTGTGATCCATCGTGATGTCTTATTTAAGGG
++
+BCCCCFFCFFFFGGGGGGGGGGHHHGHHHHHHHHHHHHHHHHGGGGHHHHHHHHEHHHHHHHGGHHGGHGGHHHHHHHGHGGHHHGGGGGHGHHHHGGGHFHFHHHHHGGGGGHBFFCGDHHHGGGGGGHGGGGGGHHGCGGGFGHHBGGGGGFFFHEGGGGGCDCCE@EFGHHHHFHEGHGFFHHGB;ECBFGGGEFEFFGF0AFGFGFFG.;;DFFFFFFFFFF090BFFFE?FEFBBFBFFFB990BF
\ No newline at end of file
diff -r 937aa69e715f -r 43d12513224b test-data/bowtie2-stats.out
--- a/test-data/bowtie2-stats.out Wed Apr 12 17:09:42 2017 -0400
+++ b/test-data/bowtie2-stats.out Thu Jun 01 06:47:03 2017 -0400
@@ -1,3 +1,5 @@
+bowtie2-align-s(30685,0x7fffceb5b3c0) malloc: *** malloc_zone_unregister() failed for 0x7fffceb51000
+bowtie2-align-s(30686,0x7fffceb5b3c0) malloc: *** malloc_zone_unregister() failed for 0x7fffceb51000
100 reads; of these:
100 (100.00%) were paired; of these:
97 (97.00%) aligned concordantly 0 times
diff -r 937aa69e715f -r 43d12513224b test-data/bowtie2-test1.bam
Binary file test-data/bowtie2-test1.bam has changed
diff -r 937aa69e715f -r 43d12513224b test-data/bowtie2-test2.bam
Binary file test-data/bowtie2-test2.bam has changed
diff -r 937aa69e715f -r 43d12513224b test-data/bowtie2-test_il.bam
Binary file test-data/bowtie2-test_il.bam has changed