changeset 4:d1f7ab78f7b5 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/repenrich commit 2066f507880250c0093e7353e7c18910c002b05f
author artbio
date Sun, 18 Nov 2018 12:53:01 -0500
parents 1c9810ba0638
children 02a8941da83b
files RepEnrich.py repenrich.xml test-data/Samp.fastq.gz test-data/Samp_L.fastq.gz test-data/Samp_R.fastq.gz
diffstat 5 files changed, 40 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/RepEnrich.py	Fri Sep 22 03:19:23 2017 -0400
+++ b/RepEnrich.py	Sun Nov 18 12:53:01 2018 -0500
@@ -1,10 +1,7 @@
-#!/usr/bin/env python
-
 import argparse
 import csv
 import os
 import shlex
-
 import shutil
 import subprocess
 import sys
--- a/repenrich.xml	Fri Sep 22 03:19:23 2017 -0400
+++ b/repenrich.xml	Sun Nov 18 12:53:01 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="repenrich" name="RepEnrich" version="1.4.3">
+<tool id="repenrich" name="RepEnrich" version="1.5.0">
     <description>Repeat Element Profiling</description>
     <requirements>
         <requirement type="package" version="1.2.0">bowtie</requirement>
@@ -13,11 +13,25 @@
         #import re
         #set input_base = 'Sample'
         #set baseReference = 'Genome'
+
+        ## uncompress fastq.gz or fastqsanger.gz if needed
+        #if $seq_method.seq_method_list == "single-read":
+            #if $input_fastq.is_of_type("fastq.gz", "fastqsanger.gz"):
+                gunzip < '$input_fastq' > '${input_base}.fastq' &&
+            #else:
+                ln -f -s '$input_fastq' '${input_base}.fastq' &&
+            #end if
+        #else:
+            #if $input2_fastq.is_of_type("fastq.gz", "fastqsanger.gz"):
+                gunzip < '$input_fastq' > '${input_base}.fastq' &&
+                gunzip < '$input2_fastq' > '${input_base}_2.fastq' &&                
+            #else:
+                ln -f -s '$input_fastq' '${input_base}.fastq' &&
+                ln -f -s '$input2_fastq' '${input_base}_2.fastq' &&
+            #end if
+        #end if
+        
         ln -f -s '$genome' '${baseReference}.fa' &&
-        ln -f -s '$input_fastq' '${input_base}.fastq' &&
-        #if $seq_method.seq_method_list == "paired-end":
-            ln -f -s '$input2_fastq' '${input_base}_2.fastq' &&
-        #end if
         bowtie-build '$genome' ${baseReference} &&
         python $__tool_directory__/RepEnrich_setup.py $repeatmasker ${baseReference}.fa setup_folder_${baseReference} &&
         #if $seq_method.seq_method_list == "single-read":
@@ -95,6 +109,27 @@
             <output name="family_fraction_counts" file="Samp-paired_family_fraction_counts.tab" ftype="tabular"/>
             <output name="fraction_counts" file="Samp-paired_fraction_counts.tab" ftype="tabular"/>
         </test>
+        <test>
+            <param name="seq_method_list" value="single-read"/>
+            <param name="input_fastq" value="Samp.fastq.gz" ftype="fastq.gz"/>
+            <param name="genome" value="chrM.fa" ftype="fasta"/>
+            <param name="repeatmasker" value="chrM_repeatmasker.txt" ftype="txt"/>
+            <output name="bowtie_alignments" file="aligned_reads.tab" ftype="tabular"/>
+            <output name="class_fraction_counts" file="Samp_class_fraction_counts.tabular" ftype="tabular"/>
+            <output name="family_fraction_counts" file="Samp_family_fraction_counts.tabular" ftype="tabular"/>
+            <output name="fraction_counts" file="Samp_fraction_counts.tabular" ftype="tabular"/>
+        </test>
+         <test>
+            <param name="seq_method_list" value="paired-end"/>
+            <param name="input_fastq" value="Samp_L.fastq.gz" ftype="fastq.gz"/>
+            <param name="input2_fastq" value="Samp_R.fastq.gz" ftype="fastq.gz"/>
+            <param name="genome" value="chrM.fa" ftype="fasta"/>
+            <param name="repeatmasker" value="chrM_repeatmasker.txt" ftype="txt"/>
+            <output name="bowtie_alignments" file="paired-aligned_reads.tab" ftype="tabular"/>
+            <output name="class_fraction_counts" file="Samp-paired_class_fraction_counts.tab" ftype="tabular"/>
+            <output name="family_fraction_counts" file="Samp-paired_family_fraction_counts.tab" ftype="tabular"/>
+            <output name="fraction_counts" file="Samp-paired_fraction_counts.tab" ftype="tabular"/>
+        </test>
   </tests>
 
     <help>
Binary file test-data/Samp.fastq.gz has changed
Binary file test-data/Samp_L.fastq.gz has changed
Binary file test-data/Samp_R.fastq.gz has changed