# HG changeset patch # User yhoogstrate # Date 1441874948 14400 # Node ID b486372c894805a4376e8be4f25b708846c78ec9 # Parent 0c78776423b692a546b04d9ed20026e931e54ea9 planemo upload for repository https://github.com/ErasmusMC-Bioinformatics/featurecounts_galaxy_wrapper commit 632991bfb9084ec1c9565bcd610f4cce563fe3a3 diff -r 0c78776423b6 -r b486372c8948 README.rst --- a/README.rst Mon Jun 01 07:13:59 2015 -0400 +++ b/README.rst Thu Sep 10 04:49:08 2015 -0400 @@ -13,7 +13,7 @@ * Repository-Maintainer: Youri Hoogstrate * Repository-Developers: Youri Hoogstrate, Marius van den Beek -* Repository-Development: https://bitbucket.org/EMCbioinf/galaxy-tool-shed-tools +* Repository-Development: https://github.com/ErasmusMC-Bioinformatics/featurecounts_galaxy_wrapper The tool wrapper has been written by Youri Hoogstrate from the Erasmus Medical Center (Rotterdam, Netherlands) on behalf of the Translational @@ -34,22 +34,22 @@ **This wrapper**: - Copyright (C) 2013-2014 Youri Hoogstrate +``Copyright (C) 2013-2015 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 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. +``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 . +``You should have received a copy of the GNU General Public License +along with this program. If not, see .`` Acknowledgements ---------------- -I would like to thank Marius van den Beek for his contributions to this project. \ No newline at end of file +I would like to thank Marius van den Beek for his contributions to this project. diff -r 0c78776423b6 -r b486372c8948 featurecounts.xml --- a/featurecounts.xml Mon Jun 01 07:13:59 2015 -0400 +++ b/featurecounts.xml Thu Sep 10 04:49:08 2015 -0400 @@ -1,211 +1,207 @@ - Measure gene expression in RNA-Seq experiments from SAM or BAM files. - - featurecounts - featurecounts2bed - - featureCounts -v - - #* - The following script is written in the "Cheetah" language: - http://www.cheetahtemplate.org/docs/users_guide_html_multipage/contents.html - *# - - ## Check 01: do the alignments have a dbkey and is the option set to using it? - #if $reference_gene_sets_source.source_select == "attribute" and len({ alignment.metadata.dbkey:True for alignment in $alignments }.keys()) != 1 - echo "Invalid number of dbkeys are found: ${ len({ alignment.metadata.dbkey:True for alignment in $alignments }.keys()) }, while only one should be used. Make sure that the alignments are done on the same reference genome and that 'tool-data/gene_sets.loc' is configured properly!" >&2 - #else - ## Check 02: are all alignments from the same type (bam || sam) - #if len({ alignment.extension:True for alignment in $alignments }.keys()) != 1 - echo "Either all files must be SAM or all files must be BAM, no mixture is allowed." >&2 - #else - featureCounts - -a - #if $reference_gene_sets_source.source_select == "indexed_filtered" - "$reference_gene_sets_source.reference_gene_sets" - #else if $reference_gene_sets_source.source_select == "indexed_all" - "$reference_gene_sets_source.reference_gene_sets" - #else if $reference_gene_sets_source.source_select == "history" - "$reference_gene_sets_source.reference_gene_sets" - #else - #* - This is a workaround to obtain the "genome.fa" file that - corresponds to the dbkey of the alignments. - Because this file is "calculated" during run-time, it can - be used in a workflow. - *# - "${ filter( lambda x: str( x[0] ) == str( { alignment.metadata.dbkey:True for alignment in $alignments }.keys()[0] ), $__app__.tool_data_tables[ 'gene_sets' ].get_fields() )[0][2] }" - #end if - - -o "$output" - -T \${GALAXY_SLOTS:-2} - - #if $extended_parameters.parameters == "extended" - -t $extended_parameters.gff_feature_type - -g $extended_parameters.gff_feature_attribute - $extended_parameters.summarization_level - $extended_parameters.contribute_to_multiple_features - $extended_parameters.protocol - $extended_parameters.multimapping_counts - -Q $extended_parameters.mapping_quality - $extended_parameters.fragment_counting - $extended_parameters.check_distance - -d $extended_parameters.minimum_fragment_length - -D $extended_parameters.maximum_fragment_length - $extended_parameters.only_both_ends - $extended_parameters.exclude_chimerics - $extended_parameters.namesort - #end if - - #for $alignment in $alignments - ${alignment} - #end for - - 2>&1 - - #set $columns = [str(i+7) for i, alignment in enumerate($alignments)] - #set $columns=",".join($columns) - - #if $format == "tabdel_default" or $format.value == "tabdel_default" - ; cp $output tmp.txt - ; egrep -v "^#" tmp.txt > tmp2.txt - ; cut -f 1,$columns tmp2.txt > tmp_left.txt - ; cut -f 6 tmp2.txt > tmp_right.txt - ; paste tmp_left.txt tmp_right.txt > $output - #elif $format == "tabdel_short" or $format.value == "tabdel_short" - ; cp $output tmp.txt - ; egrep -v "^#" tmp.txt | cut -f 1,$columns > $output - #end if - - ## For every alignment, replace its filename for: "hid: sample name" - #for $alignment in $alignments - #set $alignment_escaped = str($alignment).replace('/', '\/').replace('.', '\.') - #set $alignment_name_escaped = str(alignment.hid)+": "+str($alignment.name).replace('\t',' ').replace('\\','\\\\').replace("'","\\'").replace('/','\/') - - #if $format.value == "tabdel_default" or $format.value == "tabdel_short" - ; sed -e '1 s/$alignment_escaped/${alignment_name_escaped}/g' $output > tmp.txt - #elif $format.value == "bed": - ; featurecounts2bed.sh -f "$output" > tmp.txt - #else - ; sed -e '1,2 s/$alignment_escaped/${alignment_name_escaped}/g' $output > tmp.txt - #end if - - ; mv tmp.txt $output - - ; sed -e '1 s/$alignment_escaped/${alignment_name_escaped}/g' $output".summary" > tmp.txt - ; mv tmp.txt $output".summary" - #end for - ; mv $output".summary" $output_summary - #end if - #end if - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Measure gene expression in RNA-Seq experiments from SAM or BAM files. + + featurecounts + featurecounts2bed + + featureCounts -v + &2 + #else + ## Check 02: are all alignments from the same type (bam || sam) + #if len({ alignment.extension:True for alignment in $alignments }.keys()) != 1 + echo "Either all files must be SAM or all files must be BAM, no mixture is allowed." >&2 + #else + featureCounts + -a + #if $reference_gene_sets_source.source_select == "indexed_filtered" + "$reference_gene_sets_source.reference_gene_sets" + #else if $reference_gene_sets_source.source_select == "indexed_all" + "$reference_gene_sets_source.reference_gene_sets" + #else if $reference_gene_sets_source.source_select == "history" + "$reference_gene_sets_source.reference_gene_sets" + #else + #* + This is a workaround to obtain the "genome.fa" file that + corresponds to the dbkey of the alignments. + Because this file is "calculated" during run-time, it can + be used in a workflow. + *# + "${ filter( lambda x: str( x[0] ) == str( { alignment.metadata.dbkey:True for alignment in $alignments }.keys()[0] ), $__app__.tool_data_tables[ 'gene_sets' ].get_fields() )[0][2] }" + #end if + + -o "$output" + -T \${GALAXY_SLOTS:-2} + + #if $extended_parameters.parameters == "extended" + -t $extended_parameters.gff_feature_type + -g $extended_parameters.gff_feature_attribute + $extended_parameters.summarization_level + $extended_parameters.contribute_to_multiple_features + $extended_parameters.protocol + $extended_parameters.multimapping_counts + -Q $extended_parameters.mapping_quality + $extended_parameters.fragment_counting + $extended_parameters.check_distance + -d $extended_parameters.minimum_fragment_length + -D $extended_parameters.maximum_fragment_length + $extended_parameters.only_both_ends + $extended_parameters.exclude_chimerics + $extended_parameters.namesort + #end if + + #for $alignment in $alignments + ${alignment} + #end for + + 2>&1 + + #set $columns = [str(i+7) for i, alignment in enumerate($alignments)] + #set $columns=",".join($columns) + + #if $format == "tabdel_default" or $format.value == "tabdel_default" + ; cp $output tmp.txt + ; egrep -v "^#" tmp.txt > tmp2.txt + ; cut -f 1,$columns tmp2.txt > tmp_left.txt + ; cut -f 6 tmp2.txt > tmp_right.txt + ; paste tmp_left.txt tmp_right.txt > $output + #elif $format == "tabdel_short" or $format.value == "tabdel_short" + ; cp $output tmp.txt + ; egrep -v "^#" tmp.txt | cut -f 1,$columns > $output + #end if + + ## For every alignment, replace its filename for: "hid: sample name" + #for $alignment in $alignments + #set $alignment_escaped = str($alignment).replace('/', '\/').replace('.', '\.') + #set $alignment_name_escaped = str(alignment.hid)+": "+str($alignment.name).replace('\t',' ').replace('\\','\\\\').replace("'","\\'").replace('/','\/') + + #if $format.value == "tabdel_default" or $format.value == "tabdel_short" + ; sed -e '1 s/$alignment_escaped/${alignment_name_escaped}/g' $output > tmp.txt + #elif $format.value == "bed": + ; featurecounts2bed.sh -f "$output" > tmp.txt + #else + ; sed -e '1,2 s/$alignment_escaped/${alignment_name_escaped}/g' $output > tmp.txt + #end if + + ; mv tmp.txt $output + + ; sed -e '1 s/$alignment_escaped/${alignment_name_escaped}/g' $output".summary" > tmp.txt + ; mv tmp.txt $output".summary" + #end for + ; mv $output".summary" $output_summary + #end if + #end if + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - 10.1093/bioinformatics/btt656 - +I would like to thank Marius van den Beek for his contribution to this galaxy wrapper. + ]]> + + 10.1093/bioinformatics/btt656 + diff -r 0c78776423b6 -r b486372c8948 featurecounts2bed.sh --- a/featurecounts2bed.sh Mon Jun 01 07:13:59 2015 -0400 +++ b/featurecounts2bed.sh Thu Sep 10 04:49:08 2015 -0400 @@ -19,10 +19,6 @@ # 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/ exon_level="true" diff -r 0c78776423b6 -r b486372c8948 tool_dependencies.xml --- a/tool_dependencies.xml Mon Jun 01 07:13:59 2015 -0400 +++ b/tool_dependencies.xml Thu Sep 10 04:49:08 2015 -0400 @@ -1,21 +1,24 @@ - - - - - - - - mkdir $INSTALL_DIR/bin ; cp $REPOSITORY_INSTALL_DIR/featurecounts2bed.sh $INSTALL_DIR/bin/ - - $INSTALL_DIR/bin/featurecounts2bed.sh - - - $INSTALL_DIR/bin - $REPOSITORY_INSTALL_DIR - - - - + + + + + + + + + mkdir $INSTALL_DIR/bin && + cp $REPOSITORY_INSTALL_DIR/featurecounts2bed.sh $INSTALL_DIR/bin/ + + + $INSTALL_DIR/bin/featurecounts2bed.sh + + + $INSTALL_DIR/bin + $REPOSITORY_INSTALL_DIR + + + +