comparison htseq-count.xml @ 16:227f9d3f0e32 draft

Updated HTSeq package to version 0.6.1, fixed input format string, updated dependency definitions
author lparsons
date Fri, 11 Apr 2014 15:05:28 -0400
parents 3ffe4e2572a7
children d5edaf8dc974
comparison
equal deleted inserted replaced
15:3ffe4e2572a7 16:227f9d3f0e32
1 <tool id="htseq_count" name="htseq-count" version="0.3.2"> 1 <tool id="htseq_count" name="htseq-count" version="0.4">
2 <description> - Count aligned reads in a BAM file that overlap features in a GFF file</description> 2 <description> - Count aligned reads in a BAM file that overlap features in a GFF file</description>
3 <version_command>htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/'</version_command> 3 <version_command>htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/'</version_command>
4 <requirements> 4 <requirements>
5 <requirement type="package" version="1.7.1">numpy</requirement> 5 <requirement type="package" version="1.7.1">numpy</requirement>
6 <requirement type="package" version="0.5.4p5">htseq</requirement> 6 <requirement type="package" version="0.6.1">htseq</requirement>
7 <requirement type="package" version="0.1.19">samtools</requirement> 7 <requirement type="package" version="0.1.19">samtools</requirement>
8 <requirement type="package" version="1.56.0">picard</requirement>
9 </requirements> 8 </requirements>
10 <command> 9 <command>
11 ##set up input files 10 ##set up input files
12 #set $reference_fasta_filename = "localref.fa" 11 #set $reference_fasta_filename = "localref.fa"
13 #if $samout_conditional.samout: 12 #if $samout_conditional.samout:
16 samtools faidx "${reference_fasta_filename}" 2&gt;&amp;1 || echo "Error running samtools faidx for htseq-count" &gt;&amp;2 &amp;&amp; 15 samtools faidx "${reference_fasta_filename}" 2&gt;&amp;1 || echo "Error running samtools faidx for htseq-count" &gt;&amp;2 &amp;&amp;
17 #else: 16 #else:
18 #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path ) 17 #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path )
19 #end if 18 #end if
20 #end if 19 #end if
21 #if str($singlepaired) == "paired":
22 ln -s $samfile local_input.sam &amp;&amp;
23 java -Xmx2G -jar "\$JAVA_JAR_PATH/SortSam.jar" VALIDATION_STRINGENCY=LENIENT SORT_ORDER=queryname O=prepared_input.sam I=local_input.sam TMP_DIR="${__new_file_path__}"
24 || echo "Error running Picard MergeSamFiles" &gt;&amp;2 &amp;&amp;
25 #else:
26 #if $samfile.extension == "bam":
27 samtools view $samfile |
28 #else
29 ln -s $samfile prepared_input.sam &amp;&amp;
30 #end if
31 #end if
32 htseq-count 20 htseq-count
21 --format=$samfile.extension
22 --order=pos
33 --mode=$mode 23 --mode=$mode
34 --stranded=$stranded 24 --stranded=$stranded
35 --minaqual=$minaqual 25 --minaqual=$minaqual
36 --type=$featuretype 26 --type=$featuretype
37 --idattr=$idattr 27 --idattr=$idattr
38 #if $samout_conditional.samout: 28 #if $samout_conditional.samout:
39 --samout=$__new_file_path__/${samoutfile.id}_tmp 29 --samout=$__new_file_path__/${samoutfile.id}_tmp
40 #end if 30 #end if
41 #if str($singlepaired) == "paired": 31 $samfile
42 prepared_input.sam
43 #else:
44 #if $samfile.extension == "bam":
45 -
46 #else:
47 prepared_input.sam
48 #end if
49 #end if
50 $gfffile 32 $gfffile
51 | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&amp;2"; else print $0}' &gt; $counts 2&gt;$othercounts 33 | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&amp;2"; else print $0}' &gt; $counts 2&gt;$othercounts
52 #if $samout_conditional.samout: 34 #if $samout_conditional.samout:
53 &amp;&amp; samtools view -Su -t ${reference_fasta_filename}.fai $__new_file_path__/${samoutfile.id}_tmp | samtools sort -o - sorted > $samoutfile 35 &amp;&amp; samtools view -Su -t ${reference_fasta_filename}.fai $__new_file_path__/${samoutfile.id}_tmp | samtools sort -o - sorted > $samoutfile
54 #end if</command> 36 #end if</command>
55 <inputs> 37 <inputs>
56 <param format="sam, bam" name="samfile" type="data" label="Aligned SAM/BAM File"/> 38 <param format="sam,bam" name="samfile" type="data" label="Aligned SAM/BAM File"/>
57 <param name="singlepaired" type="select" label="Is this library mate-paired?">
58 <help>Paired libraries will be sorted by read name prior to counting.</help>
59 <option value="single" selected="true">single-end</option>
60 <option value="paired">paired-end</option>
61 </param>
62 <param format="gff" name="gfffile" type="data" label="GFF File"/> 39 <param format="gff" name="gfffile" type="data" label="GFF File"/>
63 <param name="mode" type="select" label="Mode"> 40 <param name="mode" type="select" label="Mode">
64 <help>Mode to handle reads overlapping more than one feature.</help> 41 <help>Mode to handle reads overlapping more than one feature.</help>
65 <option value="union" selected="true">Union</option> 42 <option value="union" selected="true">Union</option>
66 <option value="intersection-strict">Intersection (strict)</option> 43 <option value="intersection-strict">Intersection (strict)</option>
70 <help>Specify whether the data is from a strand-specific assay. 'Reverse' means yes with reversed strand interpretation.</help> 47 <help>Specify whether the data is from a strand-specific assay. 'Reverse' means yes with reversed strand interpretation.</help>
71 <option value="yes" selected="true">Yes</option> 48 <option value="yes" selected="true">Yes</option>
72 <option value="no">No</option> 49 <option value="no">No</option>
73 <option value="reverse">Reverse</option> 50 <option value="reverse">Reverse</option>
74 </param> 51 </param>
75 <param name="minaqual" type="integer" value="0" label="Minimum alignment quality"> 52 <param name="minaqual" type="integer" value="10" label="Minimum alignment quality">
76 <help>Skip all reads with alignment quality lower than the given minimum value</help> 53 <help>Skip all reads with alignment quality lower than the given minimum value</help>
77 </param> 54 </param>
78 <param name="featuretype" type="text" value="exon" label="Feature type"> 55 <param name="featuretype" type="text" value="exon" label="Feature type">
79 <help>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.</help> 56 <help>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.</help>
80 </param> 57 </param>
186 163
187 The htseq-count script allows to choose between three modes: *union*, *intersection-strict*, and *intersection-nonempty*. 164 The htseq-count script allows to choose between three modes: *union*, *intersection-strict*, and *intersection-nonempty*.
188 165
189 The following figure illustrates the effect of these three modes: 166 The following figure illustrates the effect of these three modes:
190 167
191 .. image:: $PATH_TO_IMAGES/count_modes.png 168 .. image:: count_modes.png
192 :width: 500
193 169
194 170
195 Strandedness 171 Strandedness
196 ------------ 172 ------------
197 173