# HG changeset patch # User peterjc # Date 1618612575 0 # Node ID 8cbc866b72ced6ed8277bc3903d48a359ed1cb18 # Parent 2709a0f065c9b5ebbdc301c03b3de2877655b539 "Update all the pico_galaxy tools on main Tool Shed" diff -r 2709a0f065c9 -r 8cbc866b72ce tools/fastq_paired_unpaired/README.rst --- a/tools/fastq_paired_unpaired/README.rst Tue May 16 08:53:57 2017 -0400 +++ b/tools/fastq_paired_unpaired/README.rst Fri Apr 16 22:36:15 2021 +0000 @@ -105,7 +105,7 @@ $ planemo shed_upload --tar_only tools/fastq_paired_unpaired/ ... - $ tar -tzf shed_upload.tar.gz + $ tar -tzf shed_upload.tar.gz test-data/sanger-pairs-forward.fastq test-data/sanger-pairs-interleaved.fastq test-data/sanger-pairs-mixed.fastq diff -r 2709a0f065c9 -r 8cbc866b72ce tools/fastq_paired_unpaired/fastq_paired_unpaired.py --- a/tools/fastq_paired_unpaired/fastq_paired_unpaired.py Tue May 16 08:53:57 2017 -0400 +++ b/tools/fastq_paired_unpaired/fastq_paired_unpaired.py Fri Apr 16 22:36:15 2021 +0000 @@ -4,7 +4,7 @@ The input file should be a valid FASTQ file which has been sorted so that any partner forward+reverse reads are consecutive. The output files all preserve this sort order. Pairing are recognised based on standard name -suffices. See below or run the tool with no arguments for more details. +suffixes. See below or run the tool with no arguments for more details. Note that the FASTQ variant is unimportant (Sanger, Solexa, Illumina, or even Color Space should all work equally well). @@ -122,8 +122,12 @@ re_illumina_r = re.compile(r"^[a-zA-Z0-9_:-]+ 2:.*$") assert re_illumina_f.match("HWI-ST916:79:D04M5ACXX:1:1101:10000:100326 1:N:0:TGNCCA") assert re_illumina_r.match("HWI-ST916:79:D04M5ACXX:1:1101:10000:100326 2:N:0:TGNCCA") -assert not re_illumina_f.match("HWI-ST916:79:D04M5ACXX:1:1101:10000:100326 2:N:0:TGNCCA") -assert not re_illumina_r.match("HWI-ST916:79:D04M5ACXX:1:1101:10000:100326 1:N:0:TGNCCA") +assert not re_illumina_f.match( + "HWI-ST916:79:D04M5ACXX:1:1101:10000:100326 2:N:0:TGNCCA" +) +assert not re_illumina_r.match( + "HWI-ST916:79:D04M5ACXX:1:1101:10000:100326 1:N:0:TGNCCA" +) FASTQ_TEMPLATE = "@%s\n%s\n+\n%s\n" @@ -147,7 +151,7 @@ # ============ # Forward read # ============ - template = name[:suffix.start()] + template = name[: suffix.start()] is_forward = True elif re_illumina_f.match(title): template = name # No suffix @@ -172,7 +176,7 @@ # ============ # Reverse read # ============ - template = name[:suffix.start()] + template = name[: suffix.start()] is_reverse = True elif re_illumina_r.match(title): template = name # No suffix @@ -226,12 +230,25 @@ pairs_r_handle.close() if neither: - print("%i reads (%i forward, %i reverse, %i neither), %i in pairs, %i as singles" - % (count, forward, reverse, neither, pairs, singles)) + print( + "%i reads (%i forward, %i reverse, %i neither), %i in pairs, %i as singles" + % (count, forward, reverse, neither, pairs, singles) + ) else: - print("%i reads (%i forward, %i reverse), %i in pairs, %i as singles" - % (count, forward, reverse, pairs, singles)) + print( + "%i reads (%i forward, %i reverse), %i in pairs, %i as singles" + % (count, forward, reverse, pairs, singles) + ) -assert count == pairs + singles == forward + reverse + neither, \ - "%i vs %i+%i=%i vs %i+%i+%i=%i" \ - % (count, pairs, singles, pairs + singles, forward, reverse, neither, forward + reverse + neither) +assert ( + count == pairs + singles == forward + reverse + neither +), "%i vs %i+%i=%i vs %i+%i+%i=%i" % ( + count, + pairs, + singles, + pairs + singles, + forward, + reverse, + neither, + forward + reverse + neither, +) diff -r 2709a0f065c9 -r 8cbc866b72ce tools/fastq_paired_unpaired/fastq_paired_unpaired.xml --- a/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml Tue May 16 08:53:57 2017 -0400 +++ b/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml Fri Apr 16 22:36:15 2021 +0000 @@ -1,5 +1,5 @@ - using the read name suffices + using the read name suffixes galaxy_sequence_utils biopython @@ -17,7 +17,7 @@ $output_singles - + @@ -65,7 +65,7 @@ The input file should be a valid FASTQ file which has been sorted so that any partner forward+reverse reads are consecutive. The output files all preserve this sort order. Pairing are recognised based on standard name -suffices. See below or run the tool with no arguments for more details. +suffixes. See below or run the tool with no arguments for more details. Any reads where the forward/reverse naming suffix used is not recognised are treated as orphan reads. The tool supports the /1 and /2 convention @@ -75,7 +75,7 @@ with the fragment number in the description, for example: * @HWI-ST916:79:D04M5ACXX:1:1101:10000:100326 1:N:0:TGNCCA - * @HWI-ST916:79:D04M5ACXX:1:1101:10000:100326 2:N:0:TGNCCA + * @HWI-ST916:79:D04M5ACXX:1:1101:10000:100326 2:N:0:TGNCCA Note that this does support multiple forward and reverse reads per template (which is quite common with Sanger sequencing), e.g. this which is sorted @@ -106,7 +106,7 @@ Peter J.A. Cock, Björn A. Grüning, Konrad Paszkiewicz and Leighton Pritchard (2013). Galaxy tools and workflows for sequence analysis with applications in molecular plant pathology. PeerJ 1:e167 -http://dx.doi.org/10.7717/peerj.167 +https://doi.org/10.7717/peerj.167 This tool is available to install into other Galaxy Instances via the Galaxy Tool Shed at http://toolshed.g2.bx.psu.edu/view/peterjc/fastq_paired_unpaired diff -r 2709a0f065c9 -r 8cbc866b72ce tools/fastq_paired_unpaired/tool_dependencies.xml --- a/tools/fastq_paired_unpaired/tool_dependencies.xml Tue May 16 08:53:57 2017 -0400 +++ b/tools/fastq_paired_unpaired/tool_dependencies.xml Fri Apr 16 22:36:15 2021 +0000 @@ -1,9 +1,9 @@ - + - + - + - + \ No newline at end of file