Repository 'fastq_paired_end_interlacer'
hg clone https://toolshed.g2.bx.psu.edu/repos/devteam/fastq_paired_end_interlacer

Changeset 2:effda79f510c (2017-09-30)
Previous changeset 1:ec6ddf449651 (2016-03-19) Next changeset 3:ef49268ee579 (2017-10-07)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/galaxy_sequence_utils/fastq_paired_end_interlacer commit f2582539542b33240234e8ea6093e25d0aee9b6a
modified:
fastq_paired_end_interlacer.xml
removed:
fastq_paired_end_interlacer.py
tool_dependencies.xml
b
diff -r ec6ddf449651 -r effda79f510c fastq_paired_end_interlacer.py
--- a/fastq_paired_end_interlacer.py Sat Mar 19 09:41:17 2016 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,59 +0,0 @@
-#Florent Angly
-import sys
-from galaxy_utils.sequence.fastq import fastqReader, fastqWriter, fastqNamedReader, fastqJoiner
-
-def main():
-    mate1_filename   = sys.argv[1]
-    mate1_type       = sys.argv[2] or 'sanger'
-    mate2_filename   = sys.argv[3]
-    mate2_type       = sys.argv[4] or 'sanger'
-    outfile_pairs    = sys.argv[5]
-    outfile_singles = sys.argv[6]
-
-    if mate1_type != mate2_type:
-        print "WARNING: You are trying to interlace files of two different types: %s and %s." % ( mate1_type, mate2_type )
-        return
-
-    type = mate1_type
-    joiner = fastqJoiner( type )
-    out_pairs = fastqWriter( open( outfile_pairs, 'wb' ), format = type )
-    out_singles = fastqWriter( open( outfile_singles, 'wb' ), format = type )
-
-    # Pairs + singles present in mate1
-    nof_singles = 0
-    nof_pairs   = 0
-    mate2_input = fastqNamedReader( open( mate2_filename, 'rb' ), format = type )
-    i = None
-    for i, mate1 in enumerate( fastqReader( open( mate1_filename, 'rb' ), format = type ) ):
-        mate2 = mate2_input.get( joiner.get_paired_identifier( mate1 ) )
-        if mate2:
-            out_pairs.write( mate1 )
-            out_pairs.write( mate2 )
-            nof_pairs += 1
-        else:
-            out_singles.write( mate1 )
-            nof_singles += 1
-
-    # Singles present in mate2
-    mate1_input = fastqNamedReader( open( mate1_filename, 'rb' ), format = type )
-    j = None
-    for j, mate2 in enumerate( fastqReader( open( mate2_filename, 'rb' ), format = type ) ):
-        mate1 = mate1_input.get( joiner.get_paired_identifier( mate2 ) )
-        if not mate1:
-            out_singles.write( mate2 )
-            nof_singles += 1
-
-    if (i is None) and (j is None):
-        print "Your input files contained no valid FASTQ sequences."
-    else:
-        print 'There were %s single reads.' % ( nof_singles )
-        print 'Interlaced %s pairs of sequences.' % ( nof_pairs )
-
-    mate1_input.close()
-    mate2_input.close()
-    out_pairs.close()
-    out_singles.close()
-

-if __name__ == "__main__":
-    main()
b
diff -r ec6ddf449651 -r effda79f510c fastq_paired_end_interlacer.xml
--- a/fastq_paired_end_interlacer.xml Sat Mar 19 09:41:17 2016 -0400
+++ b/fastq_paired_end_interlacer.xml Sat Sep 30 14:59:00 2017 -0400
[
b'@@ -1,67 +1,78 @@\n-<tool id="fastq_paired_end_interlacer" name="FASTQ interlacer" version="1.2">\n-  <description>on paired end reads</description>\n-  <requirements>\n-    <requirement type="package" version="1.0.1">galaxy_sequence_utils</requirement>\n-  </requirements>\n-  <command>\n-python $__tool_directory__/fastq_paired_end_interlacer.py\n+<tool id="fastq_paired_end_interlacer" name="FASTQ interlacer" version="1.2.0">\n+    <description>on paired end reads</description>\n+    <requirements>\n+        <requirement type="package" version="1.1.1">galaxy_sequence_utils</requirement>\n+    </requirements>\n+    <command><![CDATA[\n+gx-fastq-paired-end-interlacer\n #if $reads.reads_selector == \'paired\'\n     \'${reads.input1_file}\' ${reads.input1_file.extension[len(\'fastq\'):]} \'${reads.input2_file}\' ${reads.input2_file.extension[len(\'fastq\'):]}\n+    \'$outfile_pairs\' \'$outfile_singles\'\n #else\n     \'${reads.reads_coll.forward}\' ${reads.reads_coll.forward.extension[len(\'fastq\'):]} \'${reads.reads_coll.reverse}\' ${reads.reads_coll.reverse.extension[len(\'fastq\'):]}\n+    \'$outfile_pairs_from_coll\' \'$outfile_singles_from_coll\'\n #end if\n-\'$outfile_pairs\' \'$outfile_singles\'\n-  </command>\n-  <inputs>\n-    <conditional name="reads">\n-      <param name="reads_selector" type="select" label="Type of paired-end datasets">\n-        <option value="paired">2 separate datasets</option>\n-        <option value="paired_collection">1 paired dataset collection</option>\n-      </param>\n-      <when value="paired">\n-        <param name="input1_file" type="data" format="fastqsanger,fastqcssanger" label="Left-hand mates" />\n-        <param name="input2_file" type="data" format="fastqsanger,fastqcssanger" label="Right-hand mates" />\n-      </when>\n-      <when value="paired_collection">\n-        <param name="reads_coll" type="data_collection" collection_type="paired" format="fastqsanger,fastqcssanger" label="Paired-end reads collection" />\n-      </when>\n-    </conditional>\n-  </inputs>\n-  <outputs>\n-    <!-- $input1_file.name = filename  , e.g. paired_end_2_errors.fastqsanger -->\n-    <!-- $input1_file.id   = ID        , e.g. 10 -->\n-    <!-- $input1_file.hid  = history ID, e.g. 5  -->\n-    <data name="outfile_pairs" format="input" label="FASTQ interlacer pairs from ${on_string}"/>\n-    <data name="outfile_singles" format="input" label="FASTQ interlacer singles from ${on_string}"/>\n-  </outputs>\n-  <tests>\n-    <test>\n-      <param name="reads_selector" value="paired" />\n-      <param name="input1_file" value="paired_end_1.fastqsanger" ftype="fastqsanger" />\n-      <param name="input2_file" value="paired_end_2.fastqsanger" ftype="fastqsanger" />\n-      <output name="outfile_pairs" file="paired_end_merged.fastqsanger" ftype="fastqsanger" />\n-      <output name="outfile_singles" file="paired_end_merged_singles.fastqsanger" ftype="fastqsanger" />\n-    </test>\n-    <test>\n-      <param name="reads_selector" value="paired" />\n-      <param name="input1_file" value="paired_end_1_errors.fastqsanger" ftype="fastqsanger" />\n-      <param name="input2_file" value="paired_end_2_errors.fastqsanger" ftype="fastqsanger" />\n-      <output name="outfile_pairs" file="paired_end_merged_cleaned.fastqsanger" ftype="fastqsanger" />\n-      <output name="outfile_singles" file="paired_end_merged_cleaned_singles.fastqsanger" ftype="fastqsanger" />\n-    </test>\n-    <test>\n-      <param name="reads_selector" value="paired_collection" />\n-      <param name="reads_coll">\n-        <collection type="paired">\n-          <element name="forward" value="paired_end_1.fastqsanger" ftype="fastqsanger" />\n-          <element name="reverse" value="paired_end_2.fastqsanger" ftype="fastqsanger" />\n-        </collection>\n-      </param>\n-      <output name="outfile_pairs" file="paired_end_merged.fastqsanger" ftype="fastqsanger" />\n-      <output name="outfile_singles" file="paired_end_merged_singles.fastqsanger" ftype="fastqsanger" />\n-    </test>\n-  </tests>\n-  <help>\n+    ]]></command>\n+    <inputs>\n+       '..b'hand mates" />\n+            </when>\n+            <when value="paired_collection">\n+                <param name="reads_coll" type="data_collection" collection_type="paired" format="fastqsanger,fastqcssanger,fastqsanger.gz,fastqcssanger.gz,fastqsanger.bz2,fastqcssanger.bz2" label="Paired-end reads collection" />\n+            </when>\n+        </conditional>\n+    </inputs>\n+    <outputs>\n+        <!-- $input1_file.name = filename  , e.g. paired_end_2_errors.fastqsanger -->\n+        <!-- $input1_file.id   = ID        , e.g. 10 -->\n+        <!-- $input1_file.hid  = history ID, e.g. 5  -->\n+        <data name="outfile_pairs" format_source="input1_file" label="FASTQ interlacer pairs from ${on_string}">\n+            <filter>reads[\'reads_selector\'] == \'paired\'</filter>\n+        </data>\n+        <data name="outfile_singles" format_source="input1_file" label="FASTQ interlacer singles from ${on_string}">\n+            <filter>reads[\'reads_selector\'] == \'paired\'</filter>\n+        </data>\n+        <data name="outfile_pairs_from_coll" format_source="reads_coll[\'forward\']" label="FASTQ interlacer pairs from ${on_string}">\n+            <filter>reads[\'reads_selector\'] == \'paired_collection\'</filter>\n+        </data>\n+        <data name="outfile_singles_from_coll" format_source="reads_coll[\'forward\']" label="FASTQ interlacer singles from ${on_string}">\n+            <filter>reads[\'reads_selector\'] == \'paired_collection\'</filter>\n+        </data>\n+    </outputs>\n+    <tests>\n+        <test>\n+            <param name="reads_selector" value="paired" />\n+            <param name="input1_file" value="paired_end_1.fastqsanger" ftype="fastqsanger" />\n+            <param name="input2_file" value="paired_end_2.fastqsanger" ftype="fastqsanger" />\n+            <output name="outfile_pairs" file="paired_end_merged.fastqsanger" ftype="fastqsanger" />\n+            <output name="outfile_singles" file="paired_end_merged_singles.fastqsanger" ftype="fastqsanger" />\n+        </test>\n+        <test>\n+            <param name="reads_selector" value="paired" />\n+            <param name="input1_file" value="paired_end_1_errors.fastqsanger" ftype="fastqsanger" />\n+            <param name="input2_file" value="paired_end_2_errors.fastqsanger" ftype="fastqsanger" />\n+            <output name="outfile_pairs" file="paired_end_merged_cleaned.fastqsanger" ftype="fastqsanger" />\n+            <output name="outfile_singles" file="paired_end_merged_cleaned_singles.fastqsanger" ftype="fastqsanger" />\n+        </test>\n+        <test>\n+            <param name="reads_selector" value="paired_collection" />\n+            <param name="reads_coll">\n+                <collection type="paired">\n+                    <element name="forward" value="paired_end_1.fastqsanger" ftype="fastqsanger" />\n+                    <element name="reverse" value="paired_end_2.fastqsanger" ftype="fastqsanger" />\n+                </collection>\n+            </param>\n+            <output name="outfile_pairs_from_coll" file="paired_end_merged.fastqsanger" ftype="fastqsanger" />\n+            <output name="outfile_singles_from_coll" file="paired_end_merged_singles.fastqsanger" ftype="fastqsanger" />\n+        </test>\n+    </tests>\n+    <help><![CDATA[\n **What it does**\n \n This tool joins paired end FASTQ reads from two separate files, one with the left mates and one with the right mates, into a single files where left mates alternate with their right mates. The join is performed using sequence identifiers, allowing the two files to contain differing ordering. If a sequence identifier does not appear in both files, it is included in a separate file.\n@@ -102,8 +113,8 @@\n     WNUUZ\\P^`BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n \n A multiple-fastq file containing reads that have no mate is also produced.\n-  </help>\n-  <citations>\n-    <citation doi="10.1093/bioinformatics/btq281" />\n-  </citations>\n+    ]]></help>\n+    <citations>\n+        <citation type="doi">10.1093/bioinformatics/btq281</citation>\n+    </citations>\n </tool>\n'
b
diff -r ec6ddf449651 -r effda79f510c tool_dependencies.xml
--- a/tool_dependencies.xml Sat Mar 19 09:41:17 2016 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-  <package name="galaxy_sequence_utils" version="1.0.1">
-      <repository changeset_revision="c1ab450748ba" name="package_galaxy_sequence_utils_1_0_1" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-</tool_dependency>