# HG changeset patch # User lparsons # Date 1435006865 14400 # Node ID 3b3601a2a7c7276fd6311f0cd92d7abd8f02d7ac # Parent 6f920f33c5eb2916f7c0660a79d855516196f281 planemo upload for repository https://github.com/lparsons/galaxy_tools/tree/master/tools/htseq_count commit 8a40cf16ce0b48cdfda88a505869e77e8826cb23 diff -r 6f920f33c5eb -r 3b3601a2a7c7 README.md --- a/README.md Mon Oct 13 14:07:30 2014 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -htseq-count wrapper for Galaxy -============================== - -Galaxy wrapper for -[htseq-count](http://www-huber.embl.de/users/anders/HTSeq/doc/count.html) -script from python -[HTSeq](http://www-huber.embl.de/users/anders/HTSeq/doc/index.html) package. - -Installation ------------- - -Installation directly from the [Galaxy -Toolshed](http://toolshed.g2.bx.psu.edu/view/lparsons/htseq_count) is -recommended. - -Development ------------ - -Repository-Maintainer: Lance Parsons - -Repository-Development: - - -License -------- - -Copyright (c) 2012-2014, Lance R. Parsons -All rights reserved. - -Licensed under the BSD 2-Clause License: - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -r 6f920f33c5eb -r 3b3601a2a7c7 README.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.rst Mon Jun 22 17:01:05 2015 -0400 @@ -0,0 +1,49 @@ +htseq-count wrapper for Galaxy +============================== + +Galaxy wrapper for +`htseq-count `_ +script from python +`HTSeq `_ package. + +Installation +------------ + +Installation directly from the `Galaxy Toolshed `_ is +recommended. + +Development +----------- + +Repository-Maintainer: Lance Parsons + +Repository-Development: `https://bitbucket.org/lance_parsons/htseq_count_galaxy_wrapper `_ + +License +------- + +Copyright (c) 2012-2014, Lance R. Parsons +All rights reserved. + +Licensed under the BSD 2-Clause License: + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -r 6f920f33c5eb -r 3b3601a2a7c7 htseq-count.xml --- a/htseq-count.xml Mon Oct 13 14:07:30 2014 -0400 +++ b/htseq-count.xml Mon Jun 22 17:01:05 2015 -0400 @@ -1,69 +1,96 @@ - + - Count aligned reads in a BAM file that overlap features in a GFF file - htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/' - numpy htseq samtools pysam - + + + + + + + + + + + + htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/' + + &1 || echo "Error running samtools faidx for htseq-count" >&2 && #else: #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path ) #end if #end if - htseq-count - --format=$samfile.extension - --order=pos - --mode=$mode - --stranded=$stranded - --minaqual=$minaqual - --type=$featuretype - --idattr=$idattr + #if $force_sort: + #if $samfile.extension == 'bam': + samtools sort -n "$samfile" "name_sorted_alignment" && + #else + samtools view -Su -t ${reference_fasta_filename}.fai "$samfile" | samtools sort -n - "name_sorted_alignment" && + #end if + #end if + htseq-count + --mode=$mode + --stranded=$stranded + --minaqual=$minaqual + --type="$featuretype" + --idattr="$idattr" #if $samout_conditional.samout: --samout=$__new_file_path__/${samoutfile.id}_tmp #end if - $samfile - $gfffile - | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&2"; else print $0}' > $counts 2>$othercounts + #if $force_sort: + --order=name + --format=bam + name_sorted_alignment.bam + #else + --order=pos + --format=$samfile.extension + $samfile + #end if + "$gfffile" + | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&2"; else print $0}' > $counts 2>$othercounts #if $samout_conditional.samout: - && samtools view -Su -t ${reference_fasta_filename}.fai $__new_file_path__/${samoutfile.id}_tmp | samtools sort -o - sorted > $samoutfile - #end if + && samtools view -Su -t ${reference_fasta_filename}.fai $__new_file_path__/${samoutfile.id}_tmp | samtools sort -o - sorted > $samoutfile + #end if + ]]> + + - + Mode to handle reads overlapping more than one feature. - + Specify whether the data is from a strand-specific assay. 'Reverse' means yes with reversed strand interpretation. - Skip all reads with alignment quality lower than the given minimum value + Skip all reads with alignment quality lower than the given minimum value. (-minaqual) - Feature type (3rd column in GFF file) to be used. All features of other types are ignored. The default, suitable for RNA-Seq and Ensembl GTF files, is exon. + Feature type (3rd column in GFF file) to be used. All features of other types are ignored. The default, suitable for RNA-Seq and Ensembl GTF files, is exon. (--type) - GFF attribute to be used as feature ID. Several GFF lines with the same feature ID will be considered as parts of the same feature. The feature ID is used to identity the counts in the output table. All features of the specified type MUST have a value for this attribute. The default, suitable for RNA-SEq and Ensembl GTF files, is gene_id. + GFF attribute to be used as feature ID. Several GFF lines with the same feature ID will be considered as parts of the same feature. The feature ID is used to identity the counts in the output table. All features of the specified type MUST have a value for this attribute. The default, suitable for RNA-Seq and Ensembl GTF files, is gene_id. Write out all SAM alignment records into an output BAM file, annotating each line with its assignment to a feature or a special counter (as an optional field with tag ‘XF’). - + @@ -83,6 +110,9 @@ + + This option can be used for for paired-end data that has many unmapped mates. Use this if you get the warning about paired end data missing or not being properly sorted. + @@ -93,16 +123,6 @@ - - - - - - - - - - @@ -112,6 +132,14 @@ + + + + + + + + @@ -126,6 +154,16 @@ + + + + + + + + + + - - - - - - $INSTALL_DIR/lib/python - $INSTALL_DIR/lib64/python - export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python:$INSTALL_DIR/lib64/python && python setup.py install --home $INSTALL_DIR --install-scripts $INSTALL_DIR/bin - - $INSTALL_DIR/lib/python:$INSTALL_DIR/lib64/python - $INSTALL_DIR/bin - - - - - Installation of HTSeq requires Python 2.5+ (does not yet work with Python 3), and the Nympy Python package. - +