Mercurial > repos > yhoogstrate > fastq_replace_dots_for_n
changeset 6:a776dd3b437c draft
Uploaded
author | yhoogstrate |
---|---|
date | Thu, 13 Nov 2014 11:22:13 -0500 |
parents | c3a676a14734 |
children | 89b13f88bbef |
files | FASTQ_replace_dots_for_N FASTQ_replace_dots_for_N.py FASTQ_replace_dots_for_N.xml README tool_dependencies.xml |
diffstat | 5 files changed, 122 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FASTQ_replace_dots_for_N Thu Nov 13 11:22:13 2014 -0500 @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +__version_info__ = ('1', '0', '0', 'alpha') +__version__ = '.'.join(__version_info__) if (len(__version_info__) == 3) else '.'.join(__version_info__[0:3])+"-"+__version_info__[3] +__author__ = 'Youri Hoogstrate' +__homepage__ = 'https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools' +__license__ = 'GNU General Public License v3 (GPLv3)' + +import sys +from Bio import Seq, SeqRecord, SeqIO + +if(len(sys.argv) < 2): + input_stream = sys.stdin +else: + input_stream = open(sys.argv[1],"r") + +for record in SeqIO.parse(input_stream,"fastq-sanger"): + SeqIO.write(SeqRecord.SeqRecord(seq=Seq.Seq(str(record.seq).replace(".","N")),letter_annotations=record.letter_annotations,id=record.id,name=record.name,description=record.description),sys.stdout,"fastq-sanger")
--- a/FASTQ_replace_dots_for_N.py Thu Dec 19 11:10:29 2013 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -#!/usr/bin/env python - -import sys -from Bio import Seq, SeqRecord, SeqIO - -if(len(sys.argv) < 2): - input_stream = sys.stdin -else: - input_stream = open(sys.argv[1],"r") - -for record in SeqIO.parse(input_stream,"fastq-sanger"): - SeqIO.write(SeqRecord.SeqRecord(seq=Seq.Seq(str(record.seq).replace(".","N")),letter_annotations=record.letter_annotations,id=record.id,name=record.name,description=record.description),sys.stdout,"fastq-sanger")
--- a/FASTQ_replace_dots_for_N.xml Thu Dec 19 11:10:29 2013 -0500 +++ b/FASTQ_replace_dots_for_N.xml Thu Nov 13 11:22:13 2014 -0500 @@ -1,6 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<tool id="FASTQ_replace_dots_for_N" name="FASTQ_replace_dots_for_N"> +<tool id="FASTQ_replace_dots_for_N" name="FASTQ_replace_dots_for_N" version="1.0.0.a"> <description>Replace DOTs for Ns in sequences in FASTQ files.</description> + + <requirements> + <requirement type="package" version="1.0.0">FASTQ_replace_dots_for_N</requirement> + </requirements> + <command interpreter="python"> FASTQ_replace_dots_for_N.py $input > $output </command> @@ -14,6 +19,22 @@ </outputs> <help> - FASTQ_replace_dots_for_N +Contact +------- + +The tool wrapper has been written by Youri Hoogstrate from the Erasmus +Medical Center (Rotterdam, Netherlands) on behalf of the Translational +Research IT (TraIT) project: + +http://www.ctmm.nl/en/programmas/infrastructuren/traitprojecttranslationeleresearch + +More tools by the Translational Research IT (TraIT) project can be found +in the following toolsheds: + +http://toolshed.dtls.nl/ + +http://toolshed.g2.bx.psu.edu/ + +http://testtoolshed.g2.bx.psu.edu/ </help> -</tool> +</tool> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Thu Nov 13 11:22:13 2014 -0500 @@ -0,0 +1,60 @@ +FASTQ_replace_dots_for_N wrapper for Galaxy +=========================================== + +Some FASTQ files contain dots (ASCII char 46) instead of N to indicate +an unknown called base. Replacing these dots back to N often prevents +programs from crashing. + +Development +----------- + +* Repository-Maintainer: Youri Hoogstrate + +* Repository-Development: <https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools> + +The tool wrapper has been written by Youri Hoogstrate from the Erasmus +Medical Center (Rotterdam, Netherlands) on behalf of the Translational +Research IT (TraIT) project: + +<http://www.ctmm.nl/en/programmas/infrastructuren/traitprojecttranslationeleresearch> + +More tools by the Translational Research IT (TraIT) project can be found in the following repository: + +<http://toolshed.dtls.nl/> + +License +------- + +**FASTQ_replace_dots_for_N**: + + Copyright (C) 2013-2014 Youri Hoogstrate + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +**This wrapper**: + + Copyright (C) 2013-2014 Youri Hoogstrate + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Thu Nov 13 11:22:13 2014 -0500 @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<tool_dependency> + <!-- @todo: Add dependency of BioPython :: SeqIO --> + <package name="FASTQ_replace_dots_for_N" version="1.0.0"> + <install version="1.0"> + <actions> + <action type="move_file"> + <source>$REPOSITORY_INSTALL_DIR/FASTQ_replace_dots_for_N</source> + <destination>$INSTALL_DIR/bin/</destination> + </action> + <action type="chmod"> + <file mode="755">$INSTALL_DIR/bin/FASTQ_replace_dots_for_N</file> + </action> + <action type="set_environment"> + <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable> + </action> + </actions> + </install> + </package> +</tool_dependency>