Mercurial > repos > devteam > fastqtofasta
changeset 2:4844c1810c16 draft
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/galaxy_sequence_utils/fastqtofasta commit f2582539542b33240234e8ea6093e25d0aee9b6a
author | devteam |
---|---|
date | Sat, 30 Sep 2017 13:56:09 -0400 |
parents | 723b5b38d88a |
children | a64c24430f5e |
files | fastq_to_fasta.py fastq_to_fasta.xml tool_dependencies.xml |
diffstat | 3 files changed, 36 insertions(+), 66 deletions(-) [+] |
line wrap: on
line diff
--- a/fastq_to_fasta.py Wed Nov 11 12:43:11 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -#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()
--- a/fastq_to_fasta.xml Wed Nov 11 12:43:11 2015 -0500 +++ b/fastq_to_fasta.xml Sat Sep 30 13:56:09 2017 -0400 @@ -1,42 +1,40 @@ -<tool id="fastq_to_fasta_python" name="FASTQ to FASTA" version="1.0.0"> - <description>converter</description> - <requirements> - <requirement type="package" version="1.0.0">galaxy_sequence_utils</requirement> - </requirements> - <command interpreter="python">fastq_to_fasta.py '$input_file' '$output_file' '${input_file.extension[len( 'fastq' ):]}'</command> - <inputs> - <param name="input_file" type="data" format="fastq" label="FASTQ file to convert" /> - </inputs> - <outputs> - <data name="output_file" format="fasta" /> - </outputs> - <tests> - <!-- basic test --> - <test> - <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> - <output name="output_file" file="fastq_to_fasta_python_1.out" /> - </test> - <!-- color space test --> - <test> - <param name="input_file" value="sanger_full_range_as_cssanger.fastqcssanger" ftype="fastqcssanger" /> - <output name="output_file" file="fastq_to_fasta_python_2.out" /> - </test> - <!-- test of ignoring invalid score values: this input has ascii characters falling outside of illumina range, but they should not matter --> - <test> - <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqillumina" /> - <output name="output_file" file="fastq_to_fasta_python_1.out" /> - </test> - </tests> - <help> +<tool id="fastq_to_fasta_python" name="FASTQ to FASTA" version="1.1.1"> + <description>converter</description> + <requirements> + <requirement type="package" version="1.1.1">galaxy_sequence_utils</requirement> + </requirements> + <command><![CDATA[ +gx-fastq-to-fasta '$input_file' '$output_file' '${input_file.extension[len('fastq'):]}' + ]]></command> + <inputs> + <param name="input_file" type="data" format="fastq,fastq.gz,fastq.bz2" label="FASTQ file to convert" /> + </inputs> + <outputs> + <data name="output_file" format="fasta" /> + </outputs> + <tests> + <!-- basic test --> + <test> + <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> + <output name="output_file" file="fastq_to_fasta_python_1.out" /> + </test> + <!-- color space test --> + <test> + <param name="input_file" value="sanger_full_range_as_cssanger.fastqcssanger" ftype="fastqcssanger" /> + <output name="output_file" file="fastq_to_fasta_python_2.out" /> + </test> + <!-- test of ignoring invalid score values: this input has ascii characters falling outside of illumina range, but they should not matter --> + <test> + <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqillumina" /> + <output name="output_file" file="fastq_to_fasta_python_1.out" /> + </test> + </tests> + <help><![CDATA[ **What it does** This tool converts FASTQ sequencing reads to FASTA sequences. - - - </help> - - <citations> - <citation type="doi">10.1093/bioinformatics/btq281</citation> - </citations> - + ]]></help> + <citations> + <citation type="doi">10.1093/bioinformatics/btq281</citation> + </citations> </tool>
--- a/tool_dependencies.xml Wed Nov 11 12:43:11 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -<?xml version="1.0"?> -<tool_dependency> - <package name="galaxy_sequence_utils" version="1.0.0"> - <repository changeset_revision="0643676ad5f7" name="package_galaxy_utils_1_0" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" /> - </package> -</tool_dependency>