# HG changeset patch # User devteam # Date 1506797861 14400 # Node ID 56389130cb6383e5adc514655d04b151fccb8c8e # Parent e711d52c7509e62634747c050b0eb29f25a4fc2e planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/galaxy_sequence_utils/fastq_combiner commit f2582539542b33240234e8ea6093e25d0aee9b6a diff -r e711d52c7509 -r 56389130cb63 fastq_combiner.py --- a/fastq_combiner.py Wed Nov 11 12:40:28 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -#Dan Blankenberg -import sys, os, shutil -from galaxy_utils.sequence.fastq import fastqWriter, fastqSequencingRead, fastqCombiner, fastqFakeFastaScoreReader -from galaxy_utils.sequence.fasta import fastaReader, fastaNamedReader - -def main(): - #Read command line arguments - fasta_filename = sys.argv[1] - fasta_type = sys.argv[2] or 'fasta' #should always be fasta or csfasta? what if txt? - qual_filename = sys.argv[3] - qual_type = sys.argv[4] or 'qualsanger' #qual454 qualsolid - output_filename = sys.argv[5] - force_quality_encoding = sys.argv[6] - if force_quality_encoding == 'None': - force_quality_encoding = None - - format = 'sanger' - if fasta_type == 'csfasta' or qual_type == 'qualsolid': - format = 'cssanger' - elif qual_type == 'qualsolexa': - format = 'solexa' - elif qual_type == 'qualillumina': - format = 'illumina' - - out = fastqWriter( open( output_filename, 'wb' ), format = format, force_quality_encoding = force_quality_encoding ) - if qual_filename == 'None': - qual_input = fastqFakeFastaScoreReader( format, quality_encoding = force_quality_encoding ) - else: - qual_input = fastaNamedReader( open( qual_filename, 'rb' ) ) - - fastq_combiner = fastqCombiner( format ) - i = None - skip_count = 0 - for i, sequence in enumerate( fastaReader( open( fasta_filename, 'rb' ) ) ): - quality = qual_input.get( sequence ) - if quality: - fastq_read = fastq_combiner.combine( sequence, quality ) - out.write( fastq_read ) - else: - skip_count += 1 - out.close() - if i is None: - print "Your file contains no valid FASTA sequences." - else: - print qual_input.has_data() - print 'Combined %s of %s sequences with quality scores (%.2f%%).' % ( i - skip_count + 1, i + 1, float( i - skip_count + 1 ) / float( i + 1 ) * 100.0 ) - -if __name__ == "__main__": - main() diff -r e711d52c7509 -r 56389130cb63 fastq_combiner.xml --- a/fastq_combiner.xml Wed Nov 11 12:40:28 2015 -0500 +++ b/fastq_combiner.xml Sat Sep 30 14:57:41 2017 -0400 @@ -1,67 +1,69 @@ - - into FASTQ - - galaxy_sequence_utils - - fastq_combiner.py '$fasta_file' '${fasta_file.extension}' '$qual_file' '${qual_file.extension}' '$output_file' '$force_quality_encoding' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + into FASTQ + + galaxy_sequence_utils + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - 10.1093/bioinformatics/btq281 - - + ]]> + + 10.1093/bioinformatics/btq281 + diff -r e711d52c7509 -r 56389130cb63 tool_dependencies.xml --- a/tool_dependencies.xml Wed Nov 11 12:40:28 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - -