comparison htseq-count.xml @ 22:55ed198f2c1c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/htseq_count commit 03f64004f90ac0a7be67ecfc355a7b361f3c3314
author iuc
date Tue, 20 Sep 2016 17:51:06 -0400
parents a6dcb86af112
children 6e5c95760ab1
comparison
equal deleted inserted replaced
21:a6dcb86af112 22:55ed198f2c1c
1 <tool id="htseq_count" name="htseq-count" version="0.6.1galaxy1"> 1 <tool id="htseq_count" name="htseq-count" version="0.6.1galaxy2">
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 <requirements> 3 <requirements>
4 <requirement type="package" version="0.6.1">htseq</requirement> 4 <requirement type="package" version="0.6.1.post1">htseq</requirement>
5 <requirement type="package" version="1.7.1">numpy</requirement>
6 <requirement type="package" version="0.1.19">samtools</requirement> 5 <requirement type="package" version="0.1.19">samtools</requirement>
7 <requirement type="package" version="0.7.7">pysam</requirement>
8 </requirements> 6 </requirements>
9 7
10 <stdio> 8 <stdio>
11 <exit_code range="1:" level="fatal" description="Unknown error occurred" /> 9 <exit_code range="1:" level="fatal" description="Unknown error occurred" />
12 <regex match="htseq-count: (command ){0,1}not found" source="stderr" level="fatal" description="The HTSeq python package is not properly installed, contact Galaxy administrators" /> 10 <regex match="htseq-count: (command ){0,1}not found" source="stderr" level="fatal" description="The HTSeq python package is not properly installed, contact Galaxy administrators" />
20 <version_command>htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/'</version_command> 18 <version_command>htseq-count -h | grep version | sed 's/^\(.*\)*\(version .*\)\./\2/'</version_command>
21 19
22 <command><![CDATA[ 20 <command><![CDATA[
23 ##set up input files 21 ##set up input files
24 #set $reference_fasta_filename = "localref.fa" 22 #set $reference_fasta_filename = "localref.fa"
25 #if $samout_conditional.samout: 23 #if $samout_conditional.samout == "Yes":
26 #if str( $samout_conditional.reference_source.reference_source_selector ) == "history": 24 #if str( $samout_conditional.reference_source.reference_source_selector ) == "history":
27 ln -s "${samout_conditional.reference_source.ref_file}" "${reference_fasta_filename}" && 25 ln -s "${samout_conditional.reference_source.ref_file}" "${reference_fasta_filename}" &&
28 samtools faidx "${reference_fasta_filename}" 2>&1 || echo "Error running samtools faidx for htseq-count" >&2 && 26 samtools faidx "${reference_fasta_filename}" 2>&1 || echo "Error running samtools faidx for htseq-count" >&2 &&
29 #else: 27 #else:
30 #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path ) 28 #set $reference_fasta_filename = str( $samout_conditional.reference_source.ref_file.fields.path )
31 #end if 29 #end if
32 #end if 30 #end if
33 #if $force_sort: 31 #if $force_sort == "True":
34 #if $samfile.extension == 'bam': 32 #if $samfile.extension == 'bam':
35 samtools sort -n "$samfile" "name_sorted_alignment" && 33 samtools sort -n "$samfile" "name_sorted_alignment" &&
36 #else 34 #else
37 samtools view -Su -t ${reference_fasta_filename}.fai "$samfile" | samtools sort -n - "name_sorted_alignment" && 35 samtools view -Su -t "${reference_fasta_filename}.fai" "$samfile" | samtools sort -n - "name_sorted_alignment" &&
38 #end if 36 #end if
39 #end if 37 #end if
40 htseq-count 38 htseq-count
41 --mode=$mode 39 --mode=$mode
42 --stranded=$stranded 40 --stranded=$stranded
43 --minaqual=$minaqual 41 --minaqual=$minaqual
44 --type="$featuretype" 42 --type="$featuretype"
45 --idattr="$idattr" 43 --idattr="$idattr"
46 #if $samout_conditional.samout: 44 #if $samout_conditional.samout == "Yes":
47 --samout=$__new_file_path__/${samoutfile.id}_tmp 45 --samout=$__new_file_path__/${samoutfile.id}_tmp
48 #end if 46 #end if
49 #if $force_sort: 47 #if $force_sort == "True":
50 --order=name 48 --order=name
51 --format=bam 49 --format=bam
52 name_sorted_alignment.bam 50 name_sorted_alignment.bam
53 #else 51 #else
54 --order=pos 52 --order=pos
55 --format=$samfile.extension 53 --format=$samfile.extension
56 $samfile 54 $samfile
57 #end if 55 #end if
58 "$gfffile" 56 "$gfffile"
59 | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&2"; else print $0}' > $counts 2>$othercounts 57 | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&2"; else print $0}' > $counts 2>$othercounts
60 #if $samout_conditional.samout: 58 #if $samout_conditional.samout == "Yes":
61 && samtools view -Su -t ${reference_fasta_filename}.fai $__new_file_path__/${samoutfile.id}_tmp | samtools sort -o - sorted > $samoutfile 59 && samtools view -Su -t "${reference_fasta_filename}.fai" "$__new_file_path__/${samoutfile.id}_tmp" | samtools sort -o - sorted > "$samoutfile"
62 #end if 60 #end if
63 ]]> 61 ]]>
64 </command> 62 </command>
65 63
66 <inputs> 64 <inputs>
67 <param format="sam,bam" name="samfile" type="data" label="Aligned SAM/BAM File"/> 65 <param format="sam,bam" name="samfile" type="data" label="Aligned SAM/BAM File"/>
68 <param format="gff" name="gfffile" type="data" label="GFF File"/> 66 <param format="gff" name="gfffile" type="data" label="GFF File"/>
69 <param name="mode" type="select" label="Mode" help="(--mode)"> 67 <param name="mode" type="select" label="Mode" argument="(--mode)">
70 <help>Mode to handle reads overlapping more than one feature.</help> 68 <help>Mode to handle reads overlapping more than one feature.</help>
71 <option value="union" selected="true">Union</option> 69 <option value="union" selected="True">Union</option>
72 <option value="intersection-strict">Intersection (strict)</option> 70 <option value="intersection-strict">Intersection (strict)</option>
73 <option value="intersection-nonempty">Intersection (nonempty)</option> 71 <option value="intersection-nonempty">Intersection (nonempty)</option>
74 </param> 72 </param>
75 <param name="stranded" type="select" label="Stranded" help="(--stranded)"> 73 <param name="stranded" type="select" label="Stranded" argument="(--stranded)">
76 <help>Specify whether the data is from a strand-specific assay. 'Reverse' means yes with reversed strand interpretation.</help> 74 <help>Specify whether the data is from a strand-specific assay. 'Reverse' means yes with reversed strand interpretation.</help>
77 <option value="yes" selected="true">Yes</option> 75 <option value="yes" selected="True">Yes</option>
78 <option value="no">No</option> 76 <option value="no">No</option>
79 <option value="reverse">Reverse</option> 77 <option value="reverse">Reverse</option>
80 </param> 78 </param>
81 <param name="minaqual" type="integer" value="10" label="Minimum alignment quality"> 79 <param name="minaqual" type="integer" value="10" label="Minimum alignment quality" argument="--minaqual">
82 <help>Skip all reads with alignment quality lower than the given minimum value. (-minaqual)</help> 80 <help>Skip all reads with alignment quality lower than the given minimum value.</help>
83 </param> 81 </param>
84 <param name="featuretype" type="text" value="exon" label="Feature type"> 82 <param name="featuretype" type="text" value="exon" label="Feature type" argument="--type">
85 <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. (--type)</help> 83 <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>
86 </param> 84 </param>
87 <param name="idattr" type="text" value="gene_id" label="ID Attribute"> 85 <param name="idattr" type="text" value="gene_id" label="ID Attribute" argument="--idattr">
88 <help>GFF attribute to be used as feature ID. Several GFF lines with the same feature ID will be considered as parts of the same feature. The feature ID is used to identity the counts in the output table. All features of the specified type MUST have a value for this attribute. The default, suitable for RNA-Seq and Ensembl GTF files, is gene_id.</help> 86 <help>GFF attribute to be used as feature ID. Several GFF lines with the same feature ID will be considered as parts of the same feature. The feature ID is used to identity the counts in the output table. All features of the specified type MUST have a value for this attribute. The default, suitable for RNA-Seq and Ensembl GTF files, is gene_id.</help>
89 </param> 87 </param>
90 <conditional name="samout_conditional"> 88 <conditional name="samout_conditional">
91 <param name="samout" type="boolean" value="False" truevalue="True" falsevalue="False" label="Additional BAM Output"> 89 <param name="samout" type="select" label="Additional BAM Output">
92 <help>Write out all SAM alignment records into an output BAM file, annotating each line with its assignment to a feature or a special counter (as an optional field with tag ‘XF’).</help> 90 <help>Write out all SAM alignment records into an output BAM file, annotating each line with its assignment to a feature or a special counter (as an optional field with tag ‘XF’).</help>
91 <option value="No" selected="True">Do not output additional BAM file</option>
92 <option value="Yes">Output additional BAM file</option>
93 </param> 93 </param>
94 <when value="True"> 94 <when value="Yes">
95 <conditional name="reference_source"> 95 <conditional name="reference_source">
96 <param name="reference_source_selector" type="select" label="Choose the source for the reference list"> 96 <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
97 <option value="cached">Locally cached</option> 97 <option value="cached">Locally cached</option>
98 <option value="history">History</option> 98 <option value="history">History</option>
99 </param> 99 </param>
108 <when value="history"> <!-- FIX ME!!!! --> 108 <when value="history"> <!-- FIX ME!!!! -->
109 <param name="ref_file" type="data" format="fasta" label="Using reference file" /> 109 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
110 </when> 110 </when>
111 </conditional> 111 </conditional>
112 </when> 112 </when>
113 <when value="No">
114 <!-- Do nothing -->
115 </when>
113 </conditional> 116 </conditional>
114 <param name="force_sort" type="boolean" value="False" truevalue="True" falsevalue="False" label="Force sorting of SAM/BAM file by NAME"> 117 <param name="force_sort" type="boolean" value="False" truevalue="True" falsevalue="False" label="Force sorting of SAM/BAM file by NAME">
115 <help>This option can be used for for paired-end data that has many unmapped mates. Use this if you get the warning about paired end data missing or not being properly sorted.</help> 118 <help>This option can be used for for paired-end data that has many unmapped mates. Use this if you get the warning about paired end data missing or not being properly sorted.</help>
116 </param> 119 </param>
117 </inputs> 120 </inputs>
118 121
119 <outputs> 122 <outputs>
120 <data format="tabular" name="counts" metadata_source="samfile" label="${tool.name} on ${on_string}"/> 123 <data format="tabular" name="counts" metadata_source="samfile" label="${tool.name} on ${on_string}"/>
121 <data format="tabular" name="othercounts" metadata_source="samfile" label="${tool.name} on ${on_string} (no feature)"/> 124 <data format="tabular" name="othercounts" metadata_source="samfile" label="${tool.name} on ${on_string} (no feature)"/>
122 <data format="bam" name="samoutfile" metadata_source="samfile" label="${tool.name} on ${on_string} (BAM)"> 125 <data format="bam" name="samoutfile" metadata_source="samfile" label="${tool.name} on ${on_string} (BAM)">
123 <filter>samout_conditional['samout']</filter> 126 <filter>samout_conditional['samout'] == "Yes"</filter>
124 </data> 127 </data>
125 </outputs> 128 </outputs>
126 129
127 <tests> 130 <tests>
128 <test> 131 <test>
129 <param name="samfile" value="htseq-test.sam" /> 132 <param name="samfile" value="htseq-test.sam" />
130 <param name="gfffile" value="htseq-test.gff" /> 133 <param name="gfffile" value="htseq-test.gff" />
131 <param name="samout" value="False" /> 134 <param name="samout" value="No" />
132 <output name="counts" file="htseq-test_counts.tsv" /> 135 <output name="counts" file="htseq-test_counts.tsv" />
133 <output name="othercounts" file="htseq-test_othercounts.tsv" /> 136 <output name="othercounts" file="htseq-test_othercounts.tsv" />
134 </test> 137 </test>
135 <test> 138 <test>
136 <param name="samfile" value="htseq-test.sam" /> 139 <param name="samfile" value="htseq-test.sam" />
137 <param name="gfffile" value="htseq-test.gff" /> 140 <param name="gfffile" value="htseq-test.gff" />
138 <param name="samout" value="False" /> 141 <param name="samout" value="No" />
139 <param name="force_sort" value="True" /> 142 <param name="force_sort" value="True" />
140 <output name="counts" file="htseq-test_counts.tsv" /> 143 <output name="counts" file="htseq-test_counts.tsv" />
141 <output name="othercounts" file="htseq-test_othercounts.tsv" /> 144 <output name="othercounts" file="htseq-test_othercounts.tsv" />
142 </test> 145 </test>
143 <test> 146 <test>
144 <param name="samfile" value="htseq-test.bam" /> 147 <param name="samfile" value="htseq-test.bam" />
145 <param name="gfffile" value="htseq-test.gff" /> 148 <param name="gfffile" value="htseq-test.gff" />
146 <param name="samout" value="False" /> 149 <param name="samout" value="No" />
147 <output name="counts" file="htseq-test_counts.tsv" /> 150 <output name="counts" file="htseq-test_counts.tsv" />
148 <output name="othercounts" file="htseq-test_othercounts.tsv" /> 151 <output name="othercounts" file="htseq-test_othercounts.tsv" />
149 </test> 152 </test>
150 <test> 153 <test>
151 <param name="samfile" value="htseq-test-paired.bam" /> 154 <param name="samfile" value="htseq-test-paired.bam" />
152 <param name="singlepaired" value="paired" /> 155 <param name="singlepaired" value="paired" />
153 <param name="gfffile" value="htseq-test.gff" /> 156 <param name="gfffile" value="htseq-test.gff" />
154 <param name="samout" value="False" /> 157 <param name="samout" value="No" />
155 <output name="counts" file="htseq-test-paired_counts.tsv" /> 158 <output name="counts" file="htseq-test-paired_counts.tsv" />
156 <output name="othercounts" file="htseq-test-paired_othercounts.tsv" /> 159 <output name="othercounts" file="htseq-test-paired_othercounts.tsv" />
157 </test> 160 </test>
158 <test> 161 <test>
159 <param name="samfile" value="htseq-test-paired.bam" /> 162 <param name="samfile" value="htseq-test-paired.bam" />
160 <param name="singlepaired" value="paired" /> 163 <param name="singlepaired" value="paired" />
161 <param name="gfffile" value="htseq-test.gff" /> 164 <param name="gfffile" value="htseq-test.gff" />
162 <param name="samout" value="False" /> 165 <param name="samout" value="No" />
163 <param name="force_sort" value="True" /> 166 <param name="force_sort" value="True" />
164 <output name="counts" file="htseq-test-paired_counts.tsv" /> 167 <output name="counts" file="htseq-test-paired_counts.tsv" />
165 <output name="othercounts" file="htseq-test-paired_othercounts.tsv" /> 168 <output name="othercounts" file="htseq-test-paired_othercounts.tsv" />
166 </test> 169 </test>
167 170
292 author = {Anders, Simon and Pyl, Paul Theodor and Huber, Wolfgang}, 295 author = {Anders, Simon and Pyl, Paul Theodor and Huber, Wolfgang},
293 month = jan, 296 month = jan,
294 year = {2015}, 297 year = {2015},
295 pmid = {25260700}, 298 pmid = {25260700},
296 pages = {166--169}, 299 pages = {166--169},
297 file = {Full Text PDF:/Users/lparsons/Library/Application Support/Firefox/Profiles/thd2t4je.default/zotero/storage/84XQB8V6/Anders et al. - 2015 - HTSeq—a Python framework to work with high-through.pdf:application/pdf;Snapshot:/Users/lparsons/Library/Application Support/Firefox/Profiles/thd2t4je.default/zotero/storage/JKUAUCKB/166.html:text/html} 300 }
298 } 301 }
299 </citation> 302 </citation>
300 </citations> 303 </citations>
301 </tool> 304 </tool>