# HG changeset patch
# User yhoogstrate
# Date 1391790497 18000
# Node ID a6665369ff4f1d74b03d4522e816160f3dd4744e
# Parent 503e4165b1fc850af51ee11692f2fc78eda52c10
Uploaded
diff -r 503e4165b1fc -r a6665369ff4f featurecounts_valid_gff.xml
--- a/featurecounts_valid_gff.xml Fri Feb 07 05:00:14 2014 -0500
+++ b/featurecounts_valid_gff.xml Fri Feb 07 11:28:17 2014 -0500
@@ -9,59 +9,106 @@
The following script is written in the "Cheetah" language:
http://www.cheetahtemplate.org/docs/users_guide_html_multipage/contents.html
-->
- featureCounts
- -a $input_annotation
- -o $output
-
- #if $alignments[0].file.extension == "bam"
- -b
+
+
+ #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
+
+ #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"
+ "$reference_gene_sets_source.reference_gene_sets"
+ #else if $reference_gene_sets_source.source_select == "history"
+ "$reference_gene_sets_source.reference_gene_sets"
+ #else
+
+ "${ 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"
+
+ #if { alignment.extension:True for alignment in $alignments }.keys()[0] == "bam"
+ -b
+ #end if
+
+ #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
+ -Q $extended_parameters.mapping_quality
+ -T $extended_parameters.threads
+ $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
+
+
+
+ #if $format == "tabdel_default" or $format.value == "tabdel_default"
+ ; cp $output tmp.txt
+ ; egrep -v "^#" tmp.txt > tmp2.txt
+ ; cut -f 1,7 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,7 > $output
+
+ #end if
#end if
-
- #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
- -Q $extended_parameters.mapping_quality
- -T $extended_parameters.threads
- $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.file}
- #end for
-
- 2>&1
-
-
-
- #if $format == "tabdel_default" or $format.value == "tabdel_default"
- ; cp $output tmp.txt
- ; egrep -v "^#" tmp.txt > tmp2.txt
- ; cut -f 1,7 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,7 > $output
-
#end if
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -114,13 +161,14 @@
-
+
featureCounts-valid-gff::
-**featureCounts Overview**
+**Overview**
+
FeatureCounts is a light-weight read counting program written entirely in the C programming language. It can be used to count both gDNA-seq and RNA-seq reads for genomic features in in SAM/BAM files.
It has a variety of advanced parameters but its major strength is its outstanding performance: analysis of a 10GB BAM file takes about 7 minutes on a single average CPU (Homo Sapiens genome)!
Liao Y, Smyth GK and Shi W. featureCounts: an efficient general-purpose program for assigning sequence reads to genomic features. Bioinformatics, Advance Access, accepted on Nov 7, 2013
@@ -152,6 +200,8 @@
Make sure you have proper GFF/GTF files (corresponding to your reference genome used for the aligment) uploaded to your history.
The source of this file should not be important since this fork can handle both ENSEMBL and UCSC variants of the GTF/GFF format.
+**Examples**
+
**License**
* featureCounts / subread: GNU General Public License version 3.0 (GPLv3)
@@ -164,5 +214,6 @@
More tools by the Translational Research IT (TraIT) project can be found in the following repository:
http://toolshed.nbic.nl/
+
-
+
\ No newline at end of file