# HG changeset patch
# User devteam
# Date 1390832842 18000
# Node ID 3571553aeb2024d024dd4fc30c1bbced75acabef
Imported from capsule None
diff -r 000000000000 -r 3571553aeb20 fastq_to_fasta.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fastq_to_fasta.py Mon Jan 27 09:27:22 2014 -0500
@@ -0,0 +1,22 @@
+#Dan Blankenberg
+import sys
+from galaxy_utils.sequence.fastq import fastqReader
+from galaxy_utils.sequence.fasta import fastaWriter
+
+def main():
+ input_filename = sys.argv[1]
+ output_filename = sys.argv[2]
+ input_type = sys.argv[3] or 'sanger' #input type should ordinarily be unnecessary
+
+ num_reads = None
+ fastq_read = None
+ out = fastaWriter( open( output_filename, 'wb' ) )
+ for num_reads, fastq_read in enumerate( fastqReader( open( input_filename ), format = input_type ) ):
+ out.write( fastq_read )
+ out.close()
+ if num_reads is None:
+ print "No valid FASTQ reads could be processed."
+ else:
+ print "%i FASTQ reads were converted to FASTA." % ( num_reads + 1 )
+
+if __name__ == "__main__": main()
diff -r 000000000000 -r 3571553aeb20 fastq_to_fasta.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fastq_to_fasta.xml Mon Jan 27 09:27:22 2014 -0500
@@ -0,0 +1,43 @@
+
+ converter
+
+ galaxy_sequence_utils
+
+ fastq_to_fasta.py '$input_file' '$output_file' '${input_file.extension[len( 'fastq' ):]}'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**What it does**
+
+This tool converts FASTQ sequencing reads to FASTA sequences.
+
+------
+
+**Citation**
+
+If you use this tool, please cite `Blankenberg D, Gordon A, Von Kuster G, Coraor N, Taylor J, Nekrutenko A; Galaxy Team. Manipulation of FASTQ data with Galaxy. Bioinformatics. 2010 Jul 15;26(14):1783-5. <http://www.ncbi.nlm.nih.gov/pubmed/20562416>`_
+
+
+
+
diff -r 000000000000 -r 3571553aeb20 test-data/fastq_to_fasta_python_1.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fastq_to_fasta_python_1.out Mon Jan 27 09:27:22 2014 -0500
@@ -0,0 +1,4 @@
+>FAKE0001 Original version has PHRED scores from 0 to 93 inclusive (in that order)
+ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTAC
+>FAKE0002 Original version has PHRED scores from 93 to 0 inclusive (in that order)
+CATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCA
diff -r 000000000000 -r 3571553aeb20 test-data/fastq_to_fasta_python_2.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fastq_to_fasta_python_2.out Mon Jan 27 09:27:22 2014 -0500
@@ -0,0 +1,4 @@
+>FAKE0001 Original version has PHRED scores from 0 to 93 inclusive (in that order)
+G2131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131
+>FAKE0002 Original version has PHRED scores from 93 to 0 inclusive (in that order)
+G3131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131
diff -r 000000000000 -r 3571553aeb20 test-data/sanger_full_range_as_cssanger.fastqcssanger
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sanger_full_range_as_cssanger.fastqcssanger Mon Jan 27 09:27:22 2014 -0500
@@ -0,0 +1,8 @@
+@FAKE0001 Original version has PHRED scores from 0 to 93 inclusive (in that order)
+G2131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131
++
+!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
+@FAKE0002 Original version has PHRED scores from 93 to 0 inclusive (in that order)
+G3131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131
++
+~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!
diff -r 000000000000 -r 3571553aeb20 test-data/sanger_full_range_masked_N.fastqsanger
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sanger_full_range_masked_N.fastqsanger Mon Jan 27 09:27:22 2014 -0500
@@ -0,0 +1,8 @@
+@FAKE0001 Original version has PHRED scores from 0 to 93 inclusive (in that order)
+NNNNNNNNNNNNNNNNNNNNNCGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTAC
++
+!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
+@FAKE0002 Original version has PHRED scores from 93 to 0 inclusive (in that order)
+CATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCNNNNNNNNNNNNNNNNNNNNN
++
+~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!
diff -r 000000000000 -r 3571553aeb20 test-data/sanger_full_range_masked_lowercase.fastqsanger
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sanger_full_range_masked_lowercase.fastqsanger Mon Jan 27 09:27:22 2014 -0500
@@ -0,0 +1,8 @@
+@FAKE0001 Original version has PHRED scores from 0 to 93 inclusive (in that order)
+acgtacgtacgtacgtacgtaCGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTAC
++
+!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
+@FAKE0002 Original version has PHRED scores from 93 to 0 inclusive (in that order)
+CATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCatgcatgcatgcatgcatgca
++
+~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!
diff -r 000000000000 -r 3571553aeb20 test-data/sanger_full_range_original_sanger.fastqsanger
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sanger_full_range_original_sanger.fastqsanger Mon Jan 27 09:27:22 2014 -0500
@@ -0,0 +1,8 @@
+@FAKE0001 Original version has PHRED scores from 0 to 93 inclusive (in that order)
+ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTAC
++
+!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
+@FAKE0002 Original version has PHRED scores from 93 to 0 inclusive (in that order)
+CATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCA
++
+~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!
diff -r 000000000000 -r 3571553aeb20 tool_dependencies.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml Mon Jan 27 09:27:22 2014 -0500
@@ -0,0 +1,6 @@
+
+
+
+
+
+