changeset 0:dcc82e999439 draft

"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/qc/fastq_utils commit 3922947623a7f343e3d0475e82b72bba75c794e7"
author ebi-gxa
date Tue, 15 Feb 2022 07:54:15 +0000
parents
children ebca4912eabe
files fastq_trim_poly_at.xml get_test_data.sh
diffstat 2 files changed, 99 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fastq_trim_poly_at.xml	Tue Feb 15 07:54:15 2022 +0000
@@ -0,0 +1,56 @@
+<tool id="fastq_trim_poly_at" name="FASTQ poly-A|T trimmer" profile="18.01" version="0.25.1+galaxy0">
+    <description>Trims poly-A stretches at the 3'-end and poly-T at 5'-end of each read, optionally discarding reads with a length below the given threshold.</description>
+    <requirements>
+        <requirement type="package" version="0.25.1">fastq_utils</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+    fastq_trim_poly_at --file '$file' --outfile '$outfile'
+
+    #if '$min_poly_at_len':
+        --min_poly_at_len '$min_poly_at_len'
+    #end if
+
+    #if '$min_len':
+        --min_len '$min_len'
+    #end if
+    ]]></command>
+    <inputs>
+        <param name="file" label="Input file"  argument="--file" type="data" format="fastqsanger.gz" optional="false" help="Fastq (optional gzipped) file name"/>
+        <param name="min_poly_at_len" label="Minimum Poly-AT Length" argument="--min_poly_at_len" optional="true" type="integer" min="0" help="Minimum length of poly-A|T sequence to remove"/>
+        <param name="min_len" label="Minimum Quality" optional="true" value="" argument="--min_qual" type="integer" help="Minimum read length"/>
+    </inputs>
+    <outputs>
+        <data label="${tool.name} on ${on_string}: Output file" name="outfile" format="fastqsanger.gz" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="file" value="poly_at.fastq.gz"/>
+            <param name="min_poly_at_len" value="3"/>
+            <output name="outfile" file="poly_at_len3.fastq.gz" compare="sim_size" delta_frac="0.1"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+=======================================================
+FASTQ poly-A|T trimmer (fastq_trim_poly_at)
+=======================================================
+
+Minimum Poly-AT Length - The terminal poly-A|T sequence
+    should be at least this long to be removed
+
+Minimum Length - Reads with post-trimming length less
+    than this setting will be removed
+
+     ]]></help>
+    <citations>
+        <citation type="bibtex"><![CDATA[
+            @ARTICLE{Fonseca2017,
+            author = {Fonseca, N.},
+            title = {fastq_utils},
+            year = {2017},
+            publisher = {GitHub},
+            journal = {GitHub repository},
+            howpublished = {\url{https://github.com/nunofonseca/fastq_utils}},
+            commit = {c6cf3f954c5286e62fbe36bb9ffecd89d7823b07}
+            }]]></citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/get_test_data.sh	Tue Feb 15 07:54:15 2022 +0000
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+
+BASE_LINK="https://raw.githubusercontent.com/nunofonseca/fastq_utils/master/tests"
+
+BAR11_FILE="barcode_test_1.fastq.gz"
+BAR12_FILE="barcode_test_2.fastq.gz"
+BAR21_FILE="barcode_test2_1.fastq.gz"
+BAR22_FILE="barcode_test2_2.fastq.gz"
+INTER_FILE="inter.fastq.gz"
+A1_FILE="a_1.fastq.gz"
+POLYAT_FILE="poly_at.fastq.gz"
+POLYAT3_FILE="poly_at_len3.fastq.gz"
+
+BAR11_LINK=$BASE_LINK"/"$BAR11_FILE
+BAR12_LINK=$BASE_LINK"/"$BAR12_FILE
+BAR21_LINK=$BASE_LINK"/"$BAR21_FILE
+BAR22_LINK=$BASE_LINK"/"$BAR22_FILE
+INTER_LINK=$BASE_LINK"/"$INTER_FILE
+A1_LINK=$BASE_LINK"/"$A1_FILE
+POLYAT_LINK=$BASE_LINK"/"$POLYAT_FILE
+POLYAT3_LINK=$BASE_LINK"/"$POLYAT3_FILE
+
+function get_data {
+  local link=$1
+  local fname=$2
+
+  if [ ! -f $fname ]; then
+    echo "$fname not available locally, downloading.."
+    wget -O $fname --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 3 $link
+  fi
+}
+
+# Get test data
+pushd test-data
+
+get_data $BAR11_LINK $BAR11_FILE
+get_data $BAR12_LINK $BAR12_FILE
+get_data $BAR21_LINK $BAR21_FILE
+get_data $BAR22_LINK $BAR22_FILE
+get_data $INTER_LINK $INTER_FILE
+get_data $A1_LINK $A1_FILE
+get_data $POLYAT_LINK $POLYAT_FILE
+get_data $POLYAT3_LINK $POLYAT3_FILE