comparison rmarkdown_feature_counts.xml @ 0:5af86972b408 draft

planemo upload
author mingchen0919
date Fri, 29 Dec 2017 15:03:18 -0500
parents
children 8519371cc6d1
comparison
equal deleted inserted replaced
-1:000000000000 0:5af86972b408
1 <tool id="feature_counts" name="featureCounts" version="1.0.0">
2 <requirements>
3 <requirement type="package" version="1.15.0.6-0">pandoc</requirement>
4 <requirement type="package" version="1.20.0">r-getopt</requirement>
5 <requirement type="package" version="1.3">r-rmarkdown</requirement>
6 <requirement type="package" version="0.3.5">r-htmltools</requirement>
7 <requirement type="package" version="0.5.0">r-dplyr</requirement>
8 <requirement type="package" version="0.2">r-dt</requirement>
9 <requirement type="package" version="1.25.2">bioconductor-rsubread</requirement>
10 </requirements>
11 <description>This function assigns mapped sequencing reads to genomic features</description>
12 <stdio>
13 <regex source="stderr" match="XXX" level="warning"
14 description="Check the warnings_and_errors.txt file for more details."/>
15 </stdio>
16 <command><![CDATA[
17 Rscript '${__tool_directory__}/rmarkdown_feature_counts_render.R'
18 -e $echo
19 ##----- code chunk to get file paths and raw file names for a multiple inputs data field ----
20 #set $sep = ''
21 #set $input_bam_paths = ''
22 #set $input_bam_names = ''
23 #for $input_bam in $input_bams:
24 #set $input_bam_paths += $sep + str($input_bam)
25 #set $input_bam_names += $sep + str($input_bam.name)
26 #set $sep = ','
27 #end for
28 ##----------------- end for getting file names and file paths ------------------------------
29 -a '$input_bam_paths'
30 -N '$input_bam_names'
31 -b $annot_inbuilt
32 -c '$annot_ext'
33 -f $isGTFAnnotationFile
34 -g $gtf_feature_type
35 -h $gtf_attr_type
36 -i $chr_aliases
37 -j $use_meta_features
38 -k $allow_multi_overlap
39 -l $min_overlap
40 -m $largest_overlap
41 -n $read_extension_5
42 -o $read_extension_3
43 -p $read_2_pos
44 -q $count_multi_mapping_reads
45 -u $fraction
46 -v $min_mqs
47 -w $split_only
48 -x $non_split_only
49 -y $primary_only
50 -z $ignore_dup
51 -A $strand_specific
52 -B $junc_counts
53 -C $genome
54 -D $is_paired_end
55 -E $require_both_ends_mapped
56 -F $check_frag_length
57 -G $min_frag_length
58 -H $max_frag_length
59 -I $count_chimeric_fragments
60 -J $auto_sort
61 -K $n_threads
62 -L $max_mop
63 -M $report_reads
64 -r $report
65 -d $report.files_path
66 -s $sink_message
67 -t '${__tool_directory__}/rmarkdown_feature_counts.Rmd'
68 ]]></command>
69 <inputs>
70 <param type="boolean" name="echo" label="Display analysis code in report?" optional="False" checked="False"
71 truevalue="TRUE" falsevalue="FALSE"/>
72 <param type="data" name="input_bams" label="BAM/SAM files"
73 help="The files can be in either SAM format or BAM format. The file format is automatically detected by the function"
74 optional="False" format="bam,sam" multiple="True"/>
75 <param type="text" name="annot_inbuilt" label="annot.inbuilt"
76 help="a character string specifying an in-built annotation used for read summarization. It has four possible values including mm10, mm9, hg38 and hg19, corresponding to the NCBI RefSeq annotations for genomes 'mm10', 'mm9', 'hg38' and 'hg19', respectively. mm10 by default. The in-built annotation has a SAF format (see below)."
77 optional="False" value="mm10"/>
78 <param type="data" name="annot_ext" label="External annotation (GTF)"
79 help="A character string giving name of a user-provided annotation file or a data frame including user-provided annotation data"
80 optional="False" format="gtf,saf" multiple="False"/>
81 <param type="boolean" name="isGTFAnnotationFile" optional="False" checked="False" truevalue="TRUE"
82 falsevalue="FALSE"/>
83 <param type="text" name="gtf_feature_type" label="GTF.featureType"
84 help="a character string giving the feature type used to select rows in the GTF annotation which will be used for read summarization. exon by default. This argument is only applicable when isGTFAnnotationFile is TRUE"
85 optional="False" value="exon"/>
86 <param type="text" name="gtf_attr_type" label="GTF.attrType"
87 help="a character string giving the attribute type in the GTF annotation which will be used to group features (eg. exons) into meta-features (eg. genes). gene_id by default. This argument is only applicable when isGTFAnnotationFile is TRUE"
88 optional="False" value="gene_id"/>
89 <param type="data" name="chr_aliases" label="chrAliases"
90 help="a character string giving the name of a file that contains aliases of chromosome names. The file should be a comma delimited text file that includes two columns. The first column gives the chromosome names used in the annotation and the second column gives the chromosome names used by reads. This file should not contain header lines. Names included in this file are case sensitive."
91 optional="True" format="csv"/>
92 <param type="boolean" name="use_meta_features" label="useMetaFeatures"
93 help="logical indicating whether the read summarization should be performed at the feature level (eg. exons) or meta-feature level (eg genes). If TRUE, features in the annotation (each row is a feature) will be grouped into meta-features using their values in the &quot;GeneID&quot; column in the SAF-format annotation file or using the &quot;gene_id&quot; attribute in the GTF-format annotation file, and reads will assiged to the meta-features instead of the features. See below for more details."
94 optional="False" truevalue="TRUE" falsevalue="FALSE"/>
95 <param type="boolean" name="allow_multi_overlap" label="allowMultiOverlap"
96 help="logical indicating if a read is allowed to be assigned to more than one feature (or meta-feature) if it is found to overlap with more than one feature (or meta-feature). FALSE by default."
97 optional="False" truevalue="TRUE" falsevalue="FALSE"/>
98 <param type="integer" name="min_overlap" label="minOverlap"
99 help="integer giving the minimum number of overlapped bases required for assigning a read to a feature (or a meta-feature). For assignment of read pairs (fragments), numbers of overlapping bases from each read in the same pair will be summed. If a negative value is provided, the read will be extended from both ends. 1 by default."
100 optional="False" value="1"/>
101 <param type="boolean" name="largest_overlap" label="largestOverlap"
102 help="If TRUE, a read (or read pair) will be assigned to the feature (or meta-feature) that has the largest number of overlapping bases, if the read (or read pair) overlaps with multiple features (or meta-features)."
103 optional="False" checked="True" truevalue="TRUE" falsevalue="FALSE"/>
104 <param type="integer" name="read_extension_5" label="readExtension5"
105 help="integer giving the number of bases extended upstream from 5' end of each read. 0 by default."
106 optional="False" value="1"/>
107 <param type="integer" name="read_extension_3" label="readExtension3"
108 help="integer giving the number of bases extended downstream from 3' end of each read. 0 by default."
109 optional="False" value="1"/>
110 <param type="text" name="read_2_pos" label="read2pos"
111 help="Specifying whether each read should be reduced to its 5' most base or 3' most base. It has three possible values: NULL, 5 (denoting 5' most base) and 3 (denoting 3' most base). The default value is NULL. With the default value, the whole read is used for summarization. When read2pos is set to 5 (or 3), read summarization will be performed based on the 5' (or 3') most base position. read2pos can be used together with readExtension5 and readExtension3 parameters to set any desired length for reads."
112 optional="False" value="NULL"/>
113 <param type="boolean" name="count_multi_mapping_reads" label="countMultiMappingReads"
114 help="logical indicating if multi-mapping reads/fragments should be counted, FALSE by default. If TRUE, a multi-mapping read will be counted up to N times if it has N reported mapping locations. This function uses the 'NH' tag to find multi-mapping reads."
115 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
116 <param type="boolean" name="fraction" label="fraction"
117 help="logical indicating if fractional counts will be produced for multi-mapping reads. If TRUE, a fractional count, 1/n, will be generated for each reported alignment of a multi-mapping read, where n is the total number of alignments reported for that read. countMultiMappingReads must be set to TRUE when fraction is TRUE."
118 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
119 <param type="integer" name="min_mqs" label="minMQS"
120 help="integer giving the minimum mapping quality score a read must satisfy in order to be counted. For paired-end reads, at least one end should satisfy this criteria. 0 by default."
121 optional="False" value="0"/>
122 <param type="boolean" name="split_only" label="splitOnly"
123 help="logical indicating whether only split alignments (their CIGAR strings contain letter 'N') should be included for summarization. FALSE by default. Example split alignments are exon-spanning reads from RNA-seq data. useMetaFeatures should be set to FALSE and allowMultiOverlap should be set to TRUE, if the purpose of summarization is to assign exon-spanning reads to all their overlapping exons."
124 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
125 <param type="boolean" name="non_split_only" label="nonSplitOnly"
126 help="logical indicating whether only non-split alignments (their CIGAR strings do not contain letter 'N') should be included for summarization. FALSE by default."
127 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
128 <param type="boolean" name="primary_only" label="primaryOnly"
129 help="logical indicating if only primary alignments should be counted. Primary and secondary alignments are identified using bit 0x100 in the Flag field of SAM/BAM files. If TRUE, all primary alignments in a dataset will be counted no matter they are from multi-mapping reads or not (ie. countMultiMappingReads is ignored)."
130 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
131 <param type="boolean" name="ignore_dup" label="ignoreDup"
132 help="logical indicating whether reads marked as duplicates should be ignored. FALSE by default. Read duplicates are identified using bit Ox400 in the FLAG field in SAM/BAM files. The whole fragment (read pair) will be ignored if paired end."
133 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
134 <param type="integer" name="strand_specific" label="strandSpecific"
135 help="integer indicating if strand-specific read counting should be performed. It has three possible values: 0 (unstranded), 1 (stranded) and 2 (reversely stranded). 0 by default."
136 optional="False" value="0"/>
137 <param type="boolean" name="junc_counts" label="juncCounts"
138 help="integer indicating if strand-specific read counting should be performed. It has three possible values: 0 (unstranded), 1 (stranded) and 2 (reversely stranded). 0 by default."
139 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
140 <param type="data" name="genome" label="genome"
141 help="a character string giving the name of a FASTA-format file that includes the reference genome sequences. The reference genome provided here should be the same as the one used in read mapping. NULL by default."
142 optional="False" format="fasta"/>
143 <param type="boolean" name="is_paired_end" label="isPairedEnd"
144 help="logical indicating if paired-end reads are used. If TRUE, fragments (templates or read pairs) will be counted instead of individual reads. FALSE by default."
145 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
146 <param type="boolean" name="require_both_ends_mapped" label="requireBothEndsMapped"
147 help="logical indicating if both ends from the same fragment are required to be successfully aligned before the fragment can be assigned to a feature or meta-feature. This parameter is only appliable when isPairedEnd is TRUE."
148 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
149 <param type="boolean" name="check_frag_length" label="checkFragLength"
150 help="logical indicating if the two ends from the same fragment are required to satisify the fragment length criteria before the fragment can be assigned to a feature or meta-feature. This parameter is only appliable when isPairedEnd is TRUE. The fragment length criteria are specified via minFragLength and maxFragLength."
151 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
152 <param type="integer" name="min_frag_length" label="minFragLength"
153 help="integer giving the minimum fragment length for paired-end reads. 50 by default." optional="False"
154 value="50"/>
155 <param type="integer" name="max_frag_length" label="maxFragLength"
156 help="integer giving the maximum fragment length for paired-end reads. 600 by default. minFragLength and maxFragLength are only applicable when isPairedEnd is TRUE. Note that when a fragment spans two or more exons, the observed fragment length might be much bigger than the nominal fragment length."
157 optional="False" value="600"/>
158 <param type="boolean" name="count_chimeric_fragments" label="countChimericFragments"
159 help="logical indicating whether a chimeric fragment, which has its two reads mapped to different chromosomes, should be counted or not. TRUE by default."
160 optional="False" checked="True" truevalue="TRUE" falsevalue="FALSE"/>
161 <param type="boolean" name="auto_sort" label="autosort"
162 help="logical specifying if the automatic read sorting is enabled. This option is only applicable for paired-end reads. If TRUE, reads will be automatically sorted by their names if reads from the same pair are found not to be located next to each other in the input. No read sorting will be performed if there are no such reads found."
163 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
164 <param type="integer" name="n_threads" label="nthreads"
165 help="integer giving the number of threads used for running this function. 1 by default."
166 optional="False" value="1" min="1"/>
167 <param type="integer" name="max_mop" label="maxMOp"
168 help="integer giving the maximum number of 'M' operations (matches or mis-matches) allowed in a CIGAR string. 10 by default. Both 'X' and '=' operations are treated as 'M' and adjacent 'M' operations are merged in the CIGAR string."
169 optional="False" value="10"/>
170 <param type="boolean" name="report_reads" label="reportReads"
171 help="logical indicating if read counting result for each read/fragment is saved to a file. If TRUE, read counting results for reads/fragments will be saved to a tab-delimited file that contains four columns including name of read/fragment, status(assigned or the reason if not assigned), name of target feature/meta-feature and number of hits if the read/fragment is counted multiple times. Name of the file is the same as name of the input read file except a suffix '.featureCounts' is added. Multiple files will be generated if there is more than one input read file."
172 optional="False" checked="False" truevalue="TRUE" falsevalue="FALSE"/>
173 </inputs>
174 <outputs>
175 <data name="report" format="html" label="tool name report" hidden="false"/>
176 <data name="sink_message" format="txt" label="Warnings and Errors" from_work_dir="warnings_and_errors.txt"
177 hidden="false"/>
178 <data name="feature_counts" format="rdata" label="feature counts" from_work_dir="feature_counts.RData"
179 hidden="false"/>
180 <data name="feature_counts_csv" format="tabular" label="feature counts (.txt)"
181 from_work_dir="feature_counts.txt"
182 hidden="false"/>
183 </outputs>
184 <help><![CDATA[some help text]]></help>
185 <citations>
186 <citation type="bibtex"><![CDATA[
187 @article{allaire2016rmarkdown,
188 title={rmarkdown: Dynamic Documents for R, 2016},
189 author={Allaire, J and Cheng, Joe and Xie, Yihui and McPherson, Jonathan and Chang, Winston and Allen, Jeff
190 and Wickham, Hadley and Atkins, Aron and Hyndman, Rob},
191 journal={R package version 0.9},
192 volume={6},
193 year={2016}
194 ]]></citation>
195 <citation type="bibtex"><![CDATA[@article{liao2013featurecounts,
196 title={featureCounts: an efficient general purpose program for assigning sequence reads to genomic features},
197 author={Liao, Yang and Smyth, Gordon K and Shi, Wei},
198 journal={Bioinformatics},
199 volume={30},
200 number={7},
201 pages={923--930},
202 year={2013},
203 publisher={Oxford University Press}
204 }]]></citation>
205 </citations>
206 </tool>