comparison telescope_assign.xml @ 0:66ff74923224 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/telescope commit 2ad29725263c29d7612d2e150801c212eb9a2463"
author iuc
date Tue, 03 Sep 2019 18:12:09 -0400
parents
children 2d8c943f3e8d
comparison
equal deleted inserted replaced
-1:000000000000 0:66ff74923224
1 <?xml version="1.0"?>
2 <tool id="telescope_assign" name="Reassign reads" version="@VERSION@">
3 <description>with TELESCOPE using a statistical model</description>
4 <macros>
5 <token name="@VERSION@">1.0.3</token>
6 </macros>
7 <requirements>
8 <requirement type="package" version="@VERSION@">telescope</requirement>
9 <requirement type="package" version="1.9">samtools</requirement>
10 </requirements>
11 <command detect_errors="exit_code"><![CDATA[
12 mkdir tempdir &&
13 mkdir outdir &&
14 telescope assign '$input_alignment' '$input_gtf'
15 --tempdir tempdir
16 --outdir outdir
17 --ncpu \${GALAXY_SLOTS:-1}
18 $updated_sam
19 #if str($advanced.advanced_options) == 'select':
20 --reassign_mode $advanced.reassign_mode
21 --conf_prob $advanced.conf_prob
22 --overlap_mode $advanced.overlap_mode
23 --overlap_threshold $advanced.overlap_threshold
24 --annotation_class $advanced.annotation_class
25 --pi_prior $advanced.pi_prior
26 --theta_prior $advanced.theta_prior
27 --em_epsilon $advanced.em_epsilon
28 --max_iter $advanced.max_iter
29 $advanced.use_likelihood
30 #end if
31 #if $updated_sam
32 &&
33 if [ -f outdir/telescope-updated.bam ] ; then
34 samtools sort outdir/telescope-updated.bam > '$updated_alignment' ;
35 else
36 echo 'Updated alignment file not found.' ;
37 exit 1 ;
38 fi
39 #end if
40 ]]></command>
41 <inputs>
42 <param name="input_alignment" type="data" format="sam,bam" label="Input SAM or BAM file" />
43 <param name="input_gtf" type="data" format="gtf" label="Input annotation" />
44 <param argument="--updated_sam" type="boolean" truevalue="--updated_sam" falsevalue="" label="Also output an updated BAM file with reassigned reads" />
45 <conditional name="advanced">
46 <param name="advanced_options" type="select" label="Advanced options">
47 <option value="defaults">Use defaults</option>
48 <option value="select">Select values</option>
49 </param>
50 <when value="defaults" />
51 <when value="select">
52 <param argument="--reassign_mode" type="select" label="Reassignment mode"
53 help="After EM is complete, each fragment is reassigned according to the expected value of its membership weights. The reassignment method is the method for resolving the &quot;best&quot; reassignment for fragments that have multiple possible reassignments. Available modes are: &quot;exclude&quot; - fragments with multiple best assignments are excluded from the final counts; &quot;choose&quot; - the best assignment is randomly chosen from among the set of best assignments; &quot;average&quot; - the fragment is divided evenly among the best assignments; &quot;conf&quot; - only assignments that exceed a certain threshold (see --conf_prob) are accepted; &quot;unique&quot; - only uniquely aligned reads are included. NOTE: Results using all assignment modes are included in the Telescope report by default. This argument determines what mode will be used for the &quot;final counts&quot; column. (default: exclude)">
54 <option value="exclude">Exclude</option>
55 <option value="choose">Choose</option>
56 <option value="average">Average</option>
57 <option value="conf">Conf</option>
58 <option value="unique">Unique</option>
59 </param>
60 <param argument="--conf_prob" type="float" value="0.9" min="0" max="1" label="Minimum probability for high confidence assignment" />
61 <param argument="--overlap_mode" type="select" label="Overlap mode" help="The method used to determine whether a fragment overlaps feature">
62 <option value="threshold">Threshold</option>
63 <option value="intersection-strict">Strict intersection</option>
64 <option value="union">Union</option>
65 </param>
66 <param argument="--overlap_threshold" type="float" value="0.2" min="0" max="1" label="Fraction of fragment that must be contained within a feature to be assigned to that locus" help="Ignored unless overlap mode is 'threshold'" />
67 <param argument="--annotation_class" type="select" label="Annotation class" help="Both htseq and intervaltree appear to yield identical results. Performance differences are TBD.">
68 <option value="intervaltree">Interval tree</option>
69 <option value="htseq">HTSeq</option>
70 </param>
71 <param argument="--pi_prior" type="integer" value="0" label="Prior on &#960;" help="Equivalent to adding n unique reads." />
72 <param argument="--theta_prior" type="integer" value="0" label="Prior on &#952;" help="Equivalent to adding n non-unique reads." />
73 <param argument="--em_epsilon" type="float" value="0.0000001" label="EM Algorithm &#965; cutoff" help="Default: 1e-7" />
74 <param argument="--max_iter" type="integer" value="100" label="EM Algorithm maximum iterations" help="Default: 100" />
75 <param argument="--use_likelihood" type="boolean" truevalue="--use_likelihood" falsevalue="" label="Use difference in log-likelihood as convergence criteria" />
76 </when>
77 </conditional>
78 </inputs>
79 <outputs>
80 <data name="output" format="tabular" from_work_dir="outdir/telescope-telescope_report.tsv" />
81 <data name="updated_alignment" format="bam">
82 <filter>updated_sam</filter>
83 </data>
84 </outputs>
85 <tests>
86 <test>
87 <param name="input_alignment" value="telescope-in1.bam" />
88 <param name="input_gtf" value="telescope-in1.gtf" />
89 <param name="updated_sam" value="true" />
90 <output name="output" file="telescope-out1.tabular" />
91 <output name="updated_alignment" file="telescope-out1.bam" />
92 </test>
93 </tests>
94 <help><![CDATA[
95 Output
96 ------
97
98 Telescope has two main output files: the telescope report and an updated
99 SAM file (optional). The report file is most important for downstream
100 differential expression analysis since it contains the fragment count
101 estimates. The updated SAM file is useful for downstream locus-specific
102 analyses.
103
104 Telescope report
105 ~~~~~~~~~~~~~~~~
106
107 The first line in the telescope report is a comment (starting with a
108 “#”) that contains information about the run such as the number of
109 fragments processed, number of mapped fragments, number of uniquely and
110 ambiguously mapped fragments, and number of fragments mapping to the
111 annotation. The total number of mapped fragments may be useful for
112 normalization.
113
114 The rest of the report is a table with calculated expression values for
115 individual transposable element locations. The columns of the table are:
116
117 - ``transcript`` - Transcript ID, by default from "locus" field. See
118 --attribute argument to use a different attribute.
119 - ``transcript_length`` - Approximate length of transcript. This is
120 calculated from the annotation, not the data, and is equal to the
121 spanning length of the annotation minus any non-model regions.
122 - ``final_count`` - Total number of fragments assigned to transcript
123 after fitting the Telescope model. This is the column to use for
124 downstream analysis that models data as negative binomial, i.e.
125 DESeq2.
126 - ``final_conf`` - Final confident fragments. The number of fragments
127 assigned to transcript whose posterior probability exceeds a cutoff,
128 0.9 by default. Set this using the --conf_prob argument.
129 - ``final_prop`` - Final proportion of fragments represented by
130 transcript. This is the final estimate of the π parameter.
131 - ``init_aligned`` - Initial number of fragments aligned to transcript.
132 A given fragment will contribute +1 to each transcript that it is
133 aligned to, thus the sum of this will be greater than the number of
134 fragments if there are multimapped reads.
135 - ``unique_count`` - Unique count. Number of fragments aligning
136 uniquely to this transcript.
137 - ``init_best`` - Initial number of fragments aligned to transcript
138 that have the "best" alignment score for that fragment. Fragments
139 that have the same best alignment score to multiple transcripts will
140 contribute +1 to each transcript.
141 - ``init_best_random`` - Initial number of fragments aligned to
142 transcript that have the "best" alignment score for that fragment.
143 Fragments that have the same best alignment score to multiple
144 transcripts will be randomly assigned to one transcript.
145
146 Updated BAM file
147 ~~~~~~~~~~~~~~~~
148
149 The updated BAM file contains those fragments that has at least 1
150 initial alignment to a transposable element. The final assignment and
151 probabilities are encoded in the SAM tags:
152
153 - ``ZF:Z`` Assigned Feature - The name of the feature that alignment is
154 assigned to.
155 - ``ZT:Z`` Telescope tag - A value of ``PRI`` indicates that this
156 alignment is the best hit for the feature and is used in the
157 likelihood calculations. Otherwise the value will be ``SEC``, meaning
158 that another alignment to the same feature has a higher score.
159 - ``ZB:Z`` Best Feature = The name(s) of the highest scoring feature(s)
160 for the fragment.
161 - ``YC:Z`` Specifies color for alignment as R,G,B. UCSC sanctioned tag,
162 see documentation `here.`_
163 - ``XP:Z`` Alignment probability - estimated posterior probability for
164 this alignment.
165
166 .. _here.: http://genome.ucsc.edu/goldenpath/help/hgBamTrackHelp.html
167
168 ]]>
169 </help>
170 <citations>
171 <citation type="doi">10.1101/398172</citation>
172 </citations>
173 </tool>