Repository 'fastq_filter_by_id'
hg clone https://toolshed.g2.bx.psu.edu/repos/peterjc/fastq_filter_by_id

Changeset 1:b79caa511ba2 (2011-06-07)
Previous changeset 0:10e963c79a45 (2011-06-07) Next changeset 2:d570cc324779 (2011-06-07)
Commit message:
Migrated tool version 0.0.3 from old tool shed archive to new tool shed repository
modified:
tools/fastq/fastq_filter_by_id.xml
added:
tools/fastq/fastq_filter_by_id.xml~
b
diff -r 10e963c79a45 -r b79caa511ba2 tools/fastq/fastq_filter_by_id.xml
--- a/tools/fastq/fastq_filter_by_id.xml Tue Jun 07 17:23:26 2011 -0400
+++ b/tools/fastq/fastq_filter_by_id.xml Tue Jun 07 17:23:49 2011 -0400
b
@@ -1,4 +1,4 @@
-<tool id="fastq_filter_by_id" name="Filter FASTQ by ID" version="0.0.2">
+<tool id="fastq_filter_by_id" name="Filter FASTQ by ID" version="0.0.3">
  <description>from a tabular file</description>
  <command interpreter="python">
 fastq_filter_by_id.py $input_tabular $columns $input_fastq
@@ -60,16 +60,14 @@
 ID present in the tabular file column(s) specified. You can opt to have a
 single output file of just the matching records, or just the non-matching ones.
 
-Note that the order of sequences in the original FASTA file is preserved.
+Note that the order of sequences in the original FASTQ file is preserved.
 Also, if any sequences share an identifier, duplicates are not removed.
 
 **Example Usage**
 
-You may have performed some kind of contamination search, for example running
-BLASTN against a database of cloning vectors or bacteria, giving you a tabular
-file containing read identifiers. You could use this tool to extract only the
-reads without BLAST matches (i.e. those which do not match your contaminant
-database).
+You may have mapped your reads against a reference genome, and thus generated
+a tabular file of the mapped reads. You could use this tool to divide the reads
+into those which map onto the genome, and those which don't.
 
  </help>
 </tool>
b
diff -r 10e963c79a45 -r b79caa511ba2 tools/fastq/fastq_filter_by_id.xml~
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/fastq/fastq_filter_by_id.xml~ Tue Jun 07 17:23:49 2011 -0400
[
@@ -0,0 +1,75 @@
+<tool id="fastq_filter_by_id" name="Filter FASTQ by ID" version="0.0.2">
+ <description>from a tabular file</description>
+ <command interpreter="python">
+fastq_filter_by_id.py $input_tabular $columns $input_fastq
+#if $output_choice_cond.output_choice=="both"
+ $output_pos $output_neg
+#elif $output_choice_cond.output_choice=="pos"
+ $output_pos -
+#elif $output_choice_cond.output_choice=="neg"
+ - $output_neg
+#end if
+ </command>
+ <inputs>
+ <param name="input_fastq" type="data" format="fastq" label="FASTQ file to filter on the identifiers"/>
+ <param name="input_tabular" type="data" format="tabular" label="Tabular file containing FASTQ identifiers"/>
+ <param name="columns" type="data_column" data_ref="input_tabular" multiple="True" numerical="False" label="Column(s) containing FASTA identifiers" help="Multi-select list - hold the appropriate key while clicking to select multiple columns">
+ <validator type="no_options" message="Pick at least one column"/>
+ </param>
+ <conditional name="output_choice_cond">
+ <param name="output_choice" type="select" label="Output positive matches, negative matches, or both?">
+ <option value="both">Both positive matches (ID on list) and negative matches (ID not on list), as two FASTA files</option>
+ <option value="pos">Just positive matches (ID on list), as a single FASTA file</option>
+ <option value="neg">Just negative matches (ID not on list), as a single FASTA file</option>
+ </param>
+ <!-- Seems need these dummy entries here, compare this to indels/indel_sam2interval.xml -->
+ <when value="both" />
+ <when value="pos" />
+ <when value="neg" />
+ </conditional>
+ </inputs>
+ <outputs>
+ <data name="output_pos" format="fastq" label="With matched ID">
+            <!-- TODO - Replace this with format="input:input_fastq" if/when that works -->
+            <change_format>
+                <when input_dataset="input_fastq" attribute="extension" value="fastqsanger" format="fastqsanger" />
+                <when input_dataset="input_fastq" attribute="extension" value="fastqsolexa" format="fastqsolexa" />
+                <when input_dataset="input_fastq" attribute="extension" value="fastqillumina" format="fastqillumina" />
+                <when input_dataset="input_fastq" attribute="extension" value="fastqcssanger" format="fastqcssanger" />
+            </change_format>
+ <filter>output_choice_cond["output_choice"] != "neg"</filter>
+ </data>
+ <data name="output_neg" format="fastq" label="Without matched ID">
+            <!-- TODO - Replace this with format="input:input_fastq" if/when that works -->
+            <change_format>
+                <when input_dataset="input_fastq" attribute="extension" value="fastqsanger" format="fastqsanger" />
+                <when input_dataset="input_fastq" attribute="extension" value="fastqsolexa" format="fastqsolexa" />
+                <when input_dataset="input_fastq" attribute="extension" value="fastqillumina" format="fastqillumina" />
+                <when input_dataset="input_fastq" attribute="extension" value="fastqcssanger" format="fastqcssanger" />
+            </change_format>
+ <filter>output_choice_cond["output_choice"] != "pos"</filter>
+ </data>
+ </outputs>
+ <tests>
+ </tests>
+ <help>
+
+**What it does**
+
+By default it divides a FASTQ file in two, those sequences with or without an
+ID present in the tabular file column(s) specified. You can opt to have a
+single output file of just the matching records, or just the non-matching ones.
+
+Note that the order of sequences in the original FASTA file is preserved.
+Also, if any sequences share an identifier, duplicates are not removed.
+
+**Example Usage**
+
+You may have performed some kind of contamination search, for example running
+BLASTN against a database of cloning vectors or bacteria, giving you a tabular
+file containing read identifiers. You could use this tool to extract only the
+reads without BLAST matches (i.e. those which do not match your contaminant
+database).
+
+ </help>
+</tool>