changeset 1:92b1c7935d72 draft

"planemo upload for repository https://github.com/jvolkening/galaxy-tools/tree/master/tools/krakentools commit d826242ef2f4e846d51c6879768ebe19562dd237-dirty"
author jdv
date Thu, 01 Apr 2021 16:38:42 +0000
parents 97270150a938
children 5b17dec256d6
files extract_kraken_reads.xml
diffstat 1 files changed, 48 insertions(+), 156 deletions(-) [+]
line wrap: on
line diff
--- a/extract_kraken_reads.xml	Thu Apr 01 04:31:48 2021 +0000
+++ b/extract_kraken_reads.xml	Thu Apr 01 16:38:42 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="krakentools_extract_kraken_reads" name="Extract Kraken Reads By ID" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
+<tool id="krakentools_extract_kraken_reads" name="Extract Kraken Reads By ID" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="17.09">
     <description>Extract reads that were classified by the Kraken family at specified taxonomic IDs</description>
     <macros>
         <import>macros.xml</import>
@@ -203,145 +203,57 @@
 
 -------------------
 
-**Cutadapt** finds and removes adapter sequences, primers, poly-A tails and other types of unwanted sequence from your high-throughput sequencing reads.
-
-Cleaning your data in this way is often required: Reads from small-RNA sequencing contain the 3’ sequencing adapter because the read is longer than the molecule that is sequenced, such as in microRNA, or CRISPR data, or Poly-A tails that are useful for pulling out RNA from your sample but often you don’t want them to be in your reads.
-
-Cutadapt_ helps with these trimming tasks by finding the adapter or primer sequences in an error-tolerant way. It can also modify and filter reads in various ways. Cutadapt searches for the adapter in all reads and removes it when it finds it. Unless you use a filtering option, all reads that were present in the input file will also be present in the output file, some of them trimmed, some of them not. Even reads that were trimmed entirely (because the adapter was found in the very beginning) are output. All of this can be changed with options in the tool form above.
-
-The tool is based on the **Open Source** Cutadapt_ tool. See the complete `Cutadapt documentation`_ for additional details. If you use Cutadapt, please cite *Marcel, 2011* under **Citations** below.
-
--------------------
-
-**Inputs**
+After running Kraken, Kraken2, or KrakenUniq, users may use the
+`extract_kraken_reads.py` program to extract the FASTA or FASTQ reads
+classified as a specific taxonomy ID. For example, this program can be used to
+extract all bacterial reads or only reads assigned to Escherichia coli. Users
+must provide (at minimum) the original sequence file(s), at least one taxonomy
+ID, and the Kraken output file.
 
 -------------------
 
-Input files for Cutadapt need to be:
-
-- FASTQ.GZ, FASTQ.BZ2, FASTQ or FASTA
-
-To trim an adapter, input the ADAPTER sequence in plain text or in a FASTA file e.g. AACCGGTT (with the characters: **$**, **^**, **...**, if anchored or linked).
-
-    =============================================   ===================
-    **Option**                                      **Sequence**
-    ---------------------------------------------   -------------------
-    3’ (End) Adapter                                ADAPTER
-    Anchored 3’ Adapter                             ADAPTER$
-
-    5’ (Front) Adapter                              ADAPTER
-    Anchored 5’ Adapter                             ^ADAPTER
-
-    5’ or 3’ (Both possible)                        ADAPTER
-
-    Linked Adapter - 3' (End) only                  ADAPTER1...ADAPTER2
-    Non-anchored Linked Adapter - 5' (Front) only   ADAPTER1...ADAPTER2
-    =============================================   ===================
-
-Below is an illustration of the allowed adapter locations relative to the read and depending on the adapter type:
-
-.. image:: $PATH_TO_IMAGES/adapters.svg
-
-
--------------------
-
-*Example: Illumina TruSeq Adapters*
+**Command-line arguments**
 
 -------------------
 
-If you have reads containing Illumina TruSeq adapters, for example, follow these steps.
-
-
-For Single-end reads as well as the first reads of Paired-end data:
-
-**Read 1**
-
-In the **3' (End) Adapters** option above, insert A + the “TruSeq Indexed Adapter” prefix that is common to all Indexed Adapter sequences, e.g insert:
-
-AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC
-
-
-For the second reads of Paired-end data:
-
-**Read 2**
-
-In the **3' (End) Adapters** option above, insert the reverse complement of the “TruSeq Universal Adapter”:
-
-AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT
-
-The adapter sequences can be found in the document `Illumina TruSeq Adapters De-Mystified`_.
+The following command-line usage corresponds with the Galaxy wrapper
+parameters::
 
------------
-
-**Outputs**
-
------------
-
-- Trimmed reads
-
-Optionally, under **Output Options** you can choose to output
-
-    * Report
-    * Info file
-
-
-**Report**
-
-Cutadapt can output per-adapter statistics if you select to output the report above.
-
-Example:
-
-        *This is cutadapt 1.16 with Python 3.6.4*
+    usage: extract_kraken_reads.py [-h] -k KRAKEN_FILE -s SEQ_FILE1
+                                [-s2 SEQ_FILE2] -t TAXID [TAXID ...] -o
+                                OUTPUT_FILE [-o2 OUTPUT_FILE2] [--append]
+                                [--noappend] [--max MAX_READS] [-r REPORT_FILE]
+                                [--include-parents] [--include-children]
+                                [--exclude] [--fastq-output]
 
-        *Command line parameters: -j 1 --format=fastq -a AGATCGGAAGAGC --info-file=/tmp/tmpX0DlY1/files/000/dataset_21.dat --output=out1.fq --error-rate=0.1 --times=1 --overlap=3 input_f.fastq*
-        *Running on 1 core*
-        *Trimming 1 adapter with at most 10.0% errors in single-end mode ...*
-        *Finished in 0.00 s (1426 us/read; 0.04 M reads/minute).*
-
-        *=== Summary ===*
-
-        * Total reads processed:                       3*
-        * Reads with adapters:                         0 (0.0%)*
-        * Reads written (passing filters):             3 (100.0%)*
-
-        * Total basepairs processed:           102 bp*
-        * Total written (filtered):            102 bp (100.0%)*
-
-        *=== Adapter 1 ===*
-
-        *Sequence: AGATCGGAAGAGC; Type: regular 3'; Length: 13; Trimmed: 0 times.*
-
-
-**Info file**
-
-The info file contains information about the found adapters. The output is a tab-separated text file. Each line corresponds to one read of the input file.
-
-Columns contain the following data:
-
-    * **1st**:   Read name
-    * **2nd**:   Number of errors
-    * **3rd**:   0-based start coordinate of the adapter match
-    * **4th**:   0-based end coordinate of the adapter match
-    * **5th**:   Sequence of the read to the left of the adapter match (can be empty)
-    * **6th**:   Sequence of the read that was matched to the adapter
-    * **7th**:   Sequence of the read to the right of the adapter match (can be empty)
-    * **8th**:   Name of the found adapter
-    * **9th**:   Quality values corresponding to sequence left of the adapter match (can be empty)
-    * **10th**:  Quality values corresponding to sequence matched to the adapter (can be empty)
-    * **11th**:  Quality values corresponding to sequence to the right of the adapter (can be empty)
-
-The concatenation of columns 5-7 yields the full read sequence. Column 8 identifies the found adapter. Adapters without a name are numbered starting from 1. Fields 9-11 are empty if quality values are not available. Concatenating them yields the full sequence of quality values.
-
-If no adapter was found, the format is as follows:
-
-     #. Read name
-     #. The value -1
-     #. The read sequence
-     #. Quality values
-
-When parsing the file, be aware that additional columns may be added in the future. Note also that some fields can be empty, resulting in consecutive tabs within a line.
-
-If the --times option is used and greater than 1, each read can appear more than once in the info file. There will be one line for each found adapter, all with identical read names. Only for the first of those lines will the concatenation of columns 5-7 be identical to the original read sequence (and accordingly for columns 9-11). For subsequent lines, the shown sequence are the ones that were used in subsequent rounds of adapter trimming, that is, they get successively shorter.
+    optional arguments:
+    -h, --help            show this help message and exit
+    -k KRAKEN_FILE        Kraken output file to parse
+    -s SEQ_FILE1, -s1 SEQ_FILE1, -1 SEQ_FILE1, -U SEQ_FILE1
+                            FASTA/FASTQ File containing the raw sequence letters.
+    -s2 SEQ_FILE2, -2 SEQ_FILE2
+                            2nd FASTA/FASTQ File containing the raw sequence
+                            letters (paired).
+    -t TAXID [TAXID ...], --taxid TAXID [TAXID ...]
+                            Taxonomy ID[s] of reads to extract (space-delimited)
+    -o OUTPUT_FILE, --output OUTPUT_FILE
+                            Output FASTA/Q file containing the reads and sample
+                            IDs
+    -o2 OUTPUT_FILE2, --output2 OUTPUT_FILE2
+                            Output FASTA/Q file containig the second pair of reads
+                            [required for paired input]
+    --max MAX_READS       Maximum number of reads to save [default: 100,000,000]
+    -r REPORT_FILE, --report REPORT_FILE
+                            Kraken report file. [required only if --include-
+                            parents/children is specified]
+    --include-parents     Include reads classified at parent levels of the
+                            specified taxids
+    --include-children    Include reads classified more specifically than the
+                            specified taxids
+    --exclude             Instead of finding reads matching specified taxids,
+                            finds all reads NOT matching specified taxids
+    --fastq-output        Print output FASTQ reads [requires input FASTQ,
+                            default: output is FASTA]
 
 --------------------
 
@@ -349,12 +261,11 @@
 
 --------------------
 
-See the excellent `Cutadapt documentation`_
+Author:  Jennifer Lu
 
-.. _Cutadapt: https://cutadapt.readthedocs.io/en/stable/
-.. _`Cutadapt documentation`: https://cutadapt.readthedocs.io/en/latest/index.html
-.. _`Illumina TruSeq Adapters De-Mystified`: http://tucf-genomics.tufts.edu/documents/protocols/TUCF_Understanding_Illumina_TruSeq_Adapters.pdf
+See the `online documentation`_
 
+.. _`online documentation`: https://ccb.jhu.edu/software/krakentools/index.shtml?t=extractreads
 
 --------------------
 
@@ -362,30 +273,11 @@
 
 --------------------
 
-Author: Lance Parsons <lparsons@princeton.edu>
+Author: Jeremy Volkening
 
     ]]></help>
 
     <citations>
-        <citation type="bibtex">
-@article{marcel_cutadapt_2011,
-	title = {Cutadapt removes adapter sequences from high-throughput sequencing reads},
-	volume = {17},
-	copyright = {Authors who publish with this journal agree to the following terms:     Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a  Creative Commons Attribution License  that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.   Authors  are able to enter into separate, additional contractual arrangements  for the non-exclusive distribution of the journal's published version of  the work (e.g., post it to an institutional repository or publish it in  a book), with an acknowledgement of its initial publication in this  journal.   Authors are permitted and encouraged to post their  work online (e.g., in institutional repositories or on their website)  prior to and during the submission process, as it can lead to productive  exchanges, as well as earlier and greater citation of published work  (See  The Effect of Open Access ).},
-	url = {http://journal.embnet.org/index.php/embnetjournal/article/view/200},
-	abstract = {When small RNA is sequenced on current sequencing machines, the resulting reads are usually longer than the RNA and therefore contain parts of the 3' adapter. That adapter must be found and removed error-tolerantly from each read before read mapping. Previous solutions are either hard to use or do not offer required features, in particular support for color space data. As an easy to use alternative, we developed the command-line tool cutadapt, which supports 454, Illumina and SOLiD (color space) data, offers two adapter trimming algorithms, and has other useful features.
-
-Cutadapt, including its MIT-licensed source code, is available for download at http://code.google.com/p/cutadapt/},
-	number = {1},
-	urldate = {2011-08-02},
-	journal = {EMBnet.journal},
-	author = {Marcel, Martin},
-	year = {2011},
-	note = {When small RNA is sequenced on current sequencing machines, the resulting reads are usually longer than the RNA and therefore contain parts of the 3' adapter. That adapter must be found and removed error-tolerantly from each read before read mapping. Previous solutions are either hard to use or do not offer required features, in particular support for color space data. As an easy to use alternative, we developed the command-line tool cutadapt, which supports 454, Illumina and SOLiD (color space) data, offers two adapter trimming algorithms, and has other useful features.   Cutadapt, including its MIT-licensed source code, is available for download at  http://code.google.com/p/cutadapt/},
-	keywords = {Adapter removal;, fastq, MicroRNA, Sequencing, Small RNA, software},
-	file = {Cutadapt removes adapter sequences from high-throughput sequencing reads | Martin | EMBnet.journal:/Users/lparsons/Library/Application Support/Firefox/Profiles/thd2t4je.default/zotero/storage/ZXZT4PSE/200.html:text/html}
-}
-        </citation>
     </citations>
 
 </tool>