changeset 4:f7947c5a18b8 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/yac_clipper commit 48768de9d682fb80c4981cd52ef724fdf8f6961e
author artbio
date Mon, 08 Apr 2019 07:26:41 -0400
parents 94d67b195acd
children 6bfb7e333280
files test-data/out_with_empty_reads.fasta.gz test-data/yac_with_empty_reads.fastqsanger.gz yac.py yac.xml
diffstat 4 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
Binary file test-data/out_with_empty_reads.fasta.gz has changed
Binary file test-data/yac_with_empty_reads.fastqsanger.gz has changed
--- a/yac.py	Mon Jan 21 18:46:04 2019 -0500
+++ b/yac.py	Mon Apr 08 07:26:41 2019 -0400
@@ -111,8 +111,11 @@
                 else:
                     read = line.rstrip()
                     continue
-                trimmed_read, trimmed_qscore = self.scanadapt(
-                    self.adaptmotifs, read, qscore)
+                try:
+                    trimmed_read, trimmed_qscore = self.scanadapt(
+                        self.adaptmotifs, read, qscore)
+                except ValueError:
+                    continue
                 if self.minsize <= len(trimmed_read) <= self.maxsize:
                     if (self.Nmode == "reject") and ("N" in trimmed_read):
                         continue
--- a/yac.xml	Mon Jan 21 18:46:04 2019 -0500
+++ b/yac.xml	Mon Apr 08 07:26:41 2019 -0400
@@ -1,4 +1,4 @@
-<tool id="yac" name="Clip adapter" version="2.2.0">
+<tool id="yac" name="Clip adapter" version="2.3.0">
     <description />
     <command detect_errors="exit_code"><![CDATA[
         python $__tool_directory__/yac.py
@@ -19,7 +19,7 @@
             #else
                 mv clip.tmp $output
             #end if
-            
+
     ]]></command>
     <inputs>
         <param format="fasta,fastq" label="Source file" name="input" type="data" />
@@ -125,6 +125,16 @@
             <param name="out_format" value="fastagz" />
             <output file="out.fasta.gz" name="output" decompress="True" />
         </test>
+        <test>
+            <param ftype="fastqsanger.gz" name="input" value="yac_with_empty_reads.fastqsanger.gz" />
+            <param name="min" value="18" />
+            <param name="max" value="30" />
+            <param name="clip_source_list" value="prebuilt" />
+            <param name="clip_sequence" value="TGGAATTCTCGGGTGCCAAG" />
+            <param name="Nmode" value="accept" />
+            <param name="out_format" value="fastagz" />
+            <output file="out_with_empty_reads.fasta.gz" name="output" decompress="True" />
+        </test>
     </tests>
     <help>