Repository 'samtool_filter2'
hg clone https://toolshed.g2.bx.psu.edu/repos/devteam/samtool_filter2

Changeset 7:56c31114ad4a (2018-06-06)
Previous changeset 6:dc6ff68ea5e8 (2017-10-05) Next changeset 8:a7add3e93cc5 (2019-07-31)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/samtool_filter2 commit 24d5defd0880276f60d3d2f6abed9a00fa57eb0e
modified:
samtool_filter2.xml
removed:
tool_dependencies.xml
b
diff -r dc6ff68ea5e8 -r 56c31114ad4a samtool_filter2.xml
--- a/samtool_filter2.xml Thu Oct 05 10:31:42 2017 -0400
+++ b/samtool_filter2.xml Wed Jun 06 18:43:29 2018 -0400
[
b'@@ -1,182 +1,175 @@\n-<tool id="samtool_filter2" name="Filter SAM or BAM, output SAM or BAM" version="1.1.2">\n-  <description>files on FLAG MAPQ RG LN or by region</description>\n-  <requirements>\n-    <requirement type="package" version="1.2">samtools</requirement>\n-  </requirements>\n-  <stdio>\n-    <exit_code range="1:" />\n-  </stdio>\n-  <command>\n-<![CDATA[\n+<tool id="samtool_filter2" name="Filter SAM or BAM, output SAM or BAM" version="1.8">\n+    <description>files on FLAG MAPQ RG LN or by region</description>\n+    <requirements>\n+        <requirement type="package" version="1.8">samtools</requirement>\n+    </requirements>\n+    <command detect_errors="exit_code"><![CDATA[\n ##set up input files, regions requires input.bam and input.bai\n #if $input1.is_of_type(\'bam\')\n-  #set $input = \'input.bam\'\n-  ln -s \'$input1\' $input &&\n-  ln -s \'$input1.metadata.bam_index\' input.bai &&\n+    #set $input = \'input.bam\'\n+    ln -s \'$input1\' $input &&\n+    ln -s \'$input1.metadata.bam_index\' input.bai &&\n #elif $input1.is_of_type(\'sam\')\n-  #set $input = \'input.sam\'\n-  ln -s \'$input1\' $input &&\n+    #set $input = \'input.sam\'\n+    ln -s \'$input1\' $input &&\n #end if\n-samtools view $possibly_select_inverse \'$output1\' $header\n+samtools view\n+$possibly_select_inverse \'$output1\'\n+$header\n \n-  #if $input1.is_of_type(\'sam\')\n+#if $input1.is_of_type(\'sam\')\n    -S\n-  #end if\n+#end if\n \n-  #if str($outputtype) == \'bam\'\n-      -b\n-  #end if\n+#if str($outputtype) == \'bam\'\n+    -b\n+#end if\n \n-  #if str($mapq)\n-   -q $mapq\n-  #end if\n-  #if $flag.filter == \'yes\'\n-   #if str($flag.reqBits) != \'None\'\n-     #set $reqs = str($flag.reqBits).split(\',\')\n-     #set $reqFlag = 0\n-     #for $xn in $reqs:\n-       #set $reqFlag += int($xn, 16)\n-     #end for\n-     -f $hex($reqFlag)\n-   #end if\n-   #if str($flag.skipBits) != \'None\'\n-     #set $skips = str($flag.skipBits).split(\',\')\n-     #set $skipFlag = 0\n-     #for $xn in $skips:\n-       #set $skipFlag += int(xn,16)\n-     #end for\n-     -F $hex($skipFlag)\n-   #end if\n-  #end if\n-  #if str($read_group).strip()\n+#if str($mapq)\n+    -q $mapq\n+#end if\n+#if $flag.filter == \'yes\'\n+    #if str($flag.reqBits) != \'None\'\n+        #set $reqs = str($flag.reqBits).split(\',\')\n+        #set $reqFlag = 0\n+        #for $xn in $reqs:\n+            #set $reqFlag += int($xn, 16)\n+        #end for\n+        -f $hex($reqFlag)\n+    #end if\n+    #if str($flag.skipBits) != \'None\'\n+        #set $skips = str($flag.skipBits).split(\',\')\n+        #set $skipFlag = 0\n+        #for $xn in $skips:\n+            #set $skipFlag += int(xn,16)\n+        #end for\n+        -F $hex($skipFlag)\n+    #end if\n+#end if\n+#if str($read_group).strip()\n     -r \'$read_group\'\n-  #end if\n-  #if str($library).strip()\n+#end if\n+#if str($library).strip()\n     -l \'$library\'\n-  #end if\n-  #if $bed_file\n+#end if\n+#if $bed_file\n     -L \'$bed_file\'\n-  #end if\n-  $input\n-  #if str($regions).strip() and $input1.is_of_type(\'bam\')\n+#end if\n+$input\n+#if str($regions).strip() and $input1.is_of_type(\'bam\')\n     #for region in str($regions).split():\n-      \'$region\'\n+        \'$region\'\n     #end for\n-  #end if\n-  ## need to redirect stderr message so galaxy does not think this failed\n-  2>&1\n-]]>\n-  </command>\n-  <inputs>\n-    <param name="input1" type="data" format="sam,bam" label="SAM or BAM file to filter" />\n-    <param name="header" type="select" label="Header in output">\n-      <option value="-h">Include Header</option>\n-      <option value="">Exclude Header</option>\n-      <option value="-H">Only the Header</option>\n-    </param>\n-    <param name="mapq" type="integer" value="" optional="true" label="Minimum MAPQ quality score" help="(-q)">\n-      <validator type="in_range" message="The MAPQ quality score can\'t be negative" min="0"/>\n-    </param>\n-    <conditional name="flag">\n-      <param name="filter" type="select" label="Filter on bitwise flag">\n-        <option value="no">no</option>\n-        <option value="yes">yes</option>\n-      </param>\n-      <when value="no"/>\n-      <when va'..b'       <option value="0x0200">The read fails platform/vendor quality checks</option>\n+                    <option value="0x0400">The read is a PCR or optical duplicate</option>\n+                    <option value="0x0800">Supplementary alignment</option>\n+                </param>\n+            </when>\n+        </conditional>\n+        <param name="library" type="text" value="" label="Select alignments from Library"\n+            help="(-l) Requires headers in the input SAM or BAM, otherwise no alignments will be output"/>\n+        <param name="read_group" type="text" value="" label="Select alignments from Read Group"\n+            help="(-r) Requires headers in the input SAM or BAM, otherwise no alignments will be output"/>\n+        <param name="bed_file" type="data" format="bed" optional="true" label="Output alignments overlapping the regions in the BED file" help="(-L)"/>\n+        <param name="possibly_select_inverse" type="boolean" truevalue="-U" falsevalue="-o" checked="false" label="Use inverse selection" help="Select the opposite of the listed chromosomes" />\n+        <param name="regions" type="text" value="" label="Select regions (only used when the input is in BAM format)"\n+            help="region should be presented in one of the following formats: `chr1\', `chr2:1,000\' and `chr3:1000-2,000\'"/>\n+        <param name="outputtype" type="select" label="Select the output format">\n+            <option value="bam">BAM (-b)</option>\n+            <option value="sam">SAM</option>\n+        </param>\n+    </inputs>\n+    <outputs>\n+        <data name="output1" format="sam" label="${tool.name} on ${on_string}: ${outputtype}">\n+            <change_format>\n+                <when input="outputtype" value="bam" format="bam" />\n+            </change_format>\n+        </data>\n+    </outputs>\n+    <tests>\n+        <test>\n+            <param name="input1" value="bam_to_sam_in2.sam" ftype="sam" />\n+            <param name="header" value=""/>\n+            <param name="filter" value="yes"/>\n+            <param name="reqBits" value="0x0080"/>\n+            <param name="outputtype" value="sam"/>\n+            <output name="output1">\n+                <assert_contents>\n+                    <has_text text="141" />\n+                    <not_has_text text="77" />\n+                </assert_contents>\n+            </output>\n+        </test>\n+        <test>\n+            <param name="input1" value="bam_to_sam_in2.sam" ftype="sam" />\n+            <param name="header" value=""/>\n+            <param name="filter" value="no"/>\n+            <param name="read_group" value="rg1"/>\n+            <param name="outputtype" value="sam"/>\n+            <output name="output1">\n+                <assert_contents>\n+                    <has_text text="rg1" />\n+                    <not_has_text text="rg2" />\n+                </assert_contents>\n+            </output>\n+        </test>\n+        <test>\n+            <param name="input1" value="bam_to_sam_in1.sam" ftype="sam" />\n+            <param name="header" value=""/>\n+            <param name="filter" value="yes"/>\n+            <param name="skipBits" value="0x0008"/>\n+            <param name="mapq" value="250"/>\n+            <param name="outputtype" value="sam"/>\n+            <output name="output1">\n+                <assert_contents>\n+                    <has_text text="both_reads_align_clip_marked" />\n+                    <not_has_text text="both_reads_present_only_first_aligns" />\n+                </assert_contents>\n+            </output>\n+        </test>\n+    </tests>\n+    <help><![CDATA[\n **What it does**\n \n This tool uses the samtools view command in SAMtools_ toolkit to filter a SAM or BAM file on the MAPQ (mapping quality), FLAG bits, Read Group, Library, or region.\n@@ -206,9 +199,9 @@\n \n   chr2:1000000-2000000 chr2:1,000,000-2,000,000 chrX\n \n-\n-\n .. _SAMtools: http://www.htslib.org/\n-\n-  </help>\n+    ]]></help>\n+    <citations>\n+        <citation type="doi">10.1093/bioinformatics/btp352</citation>\n+    </citations>\n </tool>\n'
b
diff -r dc6ff68ea5e8 -r 56c31114ad4a tool_dependencies.xml
--- a/tool_dependencies.xml Thu Oct 05 10:31:42 2017 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-  <package name="samtools" version="1.2">
-    <repository changeset_revision="f6ae3ba3f3c1" name="package_samtools_1_2" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
-  </package>
-</tool_dependency>