changeset 3:9fe1a922353b draft

v0.0.5 option to discard unmapped read; env var bugfix
author peterjc
date Wed, 11 May 2016 06:49:58 -0400
parents 139b6f0a0bb5
children 46a667b5e19e
files test-data/SRR639755_mito_pairs_vs_NC_010642_clc.bam test-data/SRR639755_mito_pairs_vs_NC_010642_clc_u.bam tools/clc_assembly_cell/README.rst tools/clc_assembly_cell/clc_mapper.xml
diffstat 4 files changed, 25 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
Binary file test-data/SRR639755_mito_pairs_vs_NC_010642_clc.bam has changed
Binary file test-data/SRR639755_mito_pairs_vs_NC_010642_clc_u.bam has changed
--- a/tools/clc_assembly_cell/README.rst	Tue Sep 01 06:55:13 2015 -0400
+++ b/tools/clc_assembly_cell/README.rst	Wed May 11 06:49:58 2016 -0400
@@ -89,6 +89,10 @@
         - Added citation tags.
         - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
 v0.0.4  - Bug fix for ``<version_command>`` to capture tool version.
+v0.0.5  - Support the ``-u`` or ``--discardunmapped`` option to discard
+          unmapped reads in the CLC Mapper wrapper.
+        - Bug fix to use the ``$CLC_ASSEMBLY_CELL`` environment variable when
+          calling ``clc_cas_to_sam`` in the CLC MApper wrapper.
 ======= ======================================================================
 
 
--- a/tools/clc_assembly_cell/clc_mapper.xml	Tue Sep 01 06:55:13 2015 -0400
+++ b/tools/clc_assembly_cell/clc_mapper.xml	Wed May 11 06:49:58 2016 -0400
@@ -1,4 +1,4 @@
-<tool id="clc_mapper" name="CLC Mapper" version="0.0.4">
+<tool id="clc_mapper" name="CLC Mapper" version="0.0.5">
     <description>Maps reads giving a SAM/BAM file</description>
     <requirements>
         <requirement type="binary">clc_mapper</requirement>    
@@ -48,7 +48,11 @@
 ## use the offset 33, rather then the CLCbio default of 64 which is only for
 ## obsolete Illumina FASTQ files. Really need this option per input file...
 &amp;&amp; echo Converting CAS file to BAM with clc_cas_to_sam...
-&amp;&amp; /mnt/apps/clcBio/clc-assembly-cell-4.1.0-linux_64/clc_cas_to_sam --cas "temp_job.cas" -o "temp_job.bam" --no-progress --qualityoffset 33
+&amp;&amp; \${CLC_ASSEMBLY_CELL:-/mnt/apps/clcBio/clc-assembly-cell-4.1.0-linux_64/}clc_cas_to_sam --cas "temp_job.cas" -o "temp_job.bam" --no-progress --qualityoffset 33
+#if $discard_unmapped:
+## -u / --discardunmapped: Discard the unmapped reads
+-u
+#end if
 &amp;&amp; rm "temp_job.cas"
 ##===========================================
 &amp;&amp; echo Sorting BAM file with samtools...
@@ -125,7 +129,7 @@
         </repeat>
         <!-- Length fraction (-l), default 0.5 -->
         <!-- Similarity (-s), default 0.8 -->
-        <!-- Option for unmapped reads via clc_unmapped_reads ? -->
+        <param name="discard_unmapped" type="boolean" label="Discard unmappped reads" />
     </inputs>
     <outputs>
         <data name="out_bam" format="bam" label="CLCbio mapping (BAM)" />
@@ -142,8 +146,22 @@
             <param name="read_group_0|segments|max_size" value="1000" />
             <param name="read_group_0|segments|dist_mode" value="ss" />
             <param name="read_group_0|segments|filename" value="SRR639755_mito_pairs.fastq.gz" ftype="fastqsanger" />
+            <param name="discard_unmapped" value="false" />
             <output name="out_fasta" file="SRR639755_mito_pairs_vs_NC_010642_clc.bam" ftype="bam" lines_diff="4"/>
         </test>
+        <test>
+            <param name="ref_file" value="NC_010642.fna" ftype="fasta" />
+            <param name="ref_type" value="circular" />
+            <param name="read_group_0|segments|type" value="interleaved" />
+            <param name="read_group_0|segments|placement" value="fb" />
+            <param name="read_group_0|segments|dist_mode" value="ss" />
+            <param name="read_group_0|segments|min_size" value="1" />
+            <param name="read_group_0|segments|max_size" value="1000" />
+            <param name="read_group_0|segments|dist_mode" value="ss" />
+            <param name="read_group_0|segments|filename" value="SRR639755_mito_pairs.fastq.gz" ftype="fastqsanger" />
+            <param name="discard_unmapped" value="true" />
+            <output name="out_fasta" file="SRR639755_mito_pairs_vs_NC_010642_clc_u.bam" ftype="bam" lines_diff="4"/>
+        </test>
     </tests>
     <help>