comparison htseq-count.xml @ 24:620d5603d1a8 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/htseq_count commit 89e3a62dd6cbc8bcec84d08c1710bfb4e7f5938f-dirty
author iuc
date Fri, 20 Jan 2017 15:46:13 -0500
parents 6e5c95760ab1
children f1368427a79c
comparison
equal deleted inserted replaced
23:6e5c95760ab1 24:620d5603d1a8
1 <tool id="htseq_count" name="htseq-count" version="0.6.1galaxy2"> 1 <tool id="htseq_count" name="htseq-count" version="0.6.1galaxy3" profile="16.04">
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.post1">htseq</requirement> 4 <requirement type="package" version="0.6.1.post1">htseq</requirement>
5 <requirement type="package" version="0.1.19">samtools</requirement> 5 <requirement type="package" version="1.3.1">samtools</requirement>
6 </requirements> 6 </requirements>
7 7
8 <stdio> 8 <stdio>
9 <exit_code range="1:" level="fatal" description="Unknown error occurred" /> 9 <exit_code range="1:" level="fatal" description="Unknown error occurred" />
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" /> 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" />
21 ##set up input files 21 ##set up input files
22 #set $reference_fasta_filename = "localref.fa" 22 #set $reference_fasta_filename = "localref.fa"
23 #if $samout_conditional.samout == "Yes": 23 #if $samout_conditional.samout == "Yes":
24 #if str( $samout_conditional.reference_source.reference_source_selector ) == "history": 24 #if str( $samout_conditional.reference_source.reference_source_selector ) == "history":
25 ln -s "${samout_conditional.reference_source.ref_file}" "${reference_fasta_filename}" && 25 ln -s "${samout_conditional.reference_source.ref_file}" "${reference_fasta_filename}" &&
26 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 &&
27 #else: 27 #else:
28 #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 )
29 #end if 29 #end if
30 #end if 30 #end if
31 31
32 #if $force_sort == "True": 32 #if $force_sort == "True":
33 #if $samfile.extension == 'bam': 33 #if $samfile.extension == 'bam':
34 samtools sort -n "$samfile" "name_sorted_alignment" && 34 samtools sort -n -o 'name_sorted_alignment.bam' '$samfile' &&
35 #else 35 #else
36 samtools view -Su -t "${reference_fasta_filename}.fai" "$samfile" | samtools sort -n - "name_sorted_alignment" && 36 samtools view -Su -t '${reference_fasta_filename}.fai' '$samfile' | samtools sort -n -o 'name_sorted_alignment.bam' - &&
37 #end if 37 #end if
38 #end if 38 #end if
39 39
40 htseq-count 40 htseq-count
41 --mode=$mode 41 --mode=$mode
42 --stranded=$stranded 42 --stranded=$stranded
43 --minaqual=$minaqual 43 --minaqual=$minaqual
44 --type="$featuretype" 44 --type='$featuretype'
45 --idattr="$idattr" 45 --idattr='$idattr'
46 #if $samout_conditional.samout == "Yes": 46 #if $samout_conditional.samout == "Yes":
47 --samout='$__new_file_path__/${samoutfile.id}_tmp' 47 --samout='$__new_file_path__/${samoutfile.id}_tmp'
48 #end if 48 #end if
49 #if $force_sort == "True": 49 #if $force_sort == "True":
50 --order=name 50 --order=name
53 #else 53 #else
54 --order=pos 54 --order=pos
55 --format=$samfile.extension 55 --format=$samfile.extension
56 '$samfile' 56 '$samfile'
57 #end if 57 #end if
58 58
59 "$gfffile" | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&2"; else print $0}' 59 "$gfffile" | awk '{if ($1 ~ "no_feature|ambiguous|too_low_aQual|not_aligned|alignment_not_unique") print $0 | "cat 1>&2"; else print $0}'
60 > '$counts' 60 > '$counts'
61 2> '$othercounts' 61 2> '$othercounts'
62 62
63 #if $samout_conditional.samout == "Yes": 63 #if $samout_conditional.samout == "Yes":
64 && samtools view -Su 64 && samtools view -Su
65 -t "${reference_fasta_filename}.fai" 65 -t '${reference_fasta_filename}.fai'
66 "$__new_file_path__/${samoutfile.id}_tmp" 66 '$__new_file_path__/${samoutfile.id}_tmp'
67 | samtools sort -o - name_sorted_alignment > "$samoutfile" 67 | samtools sort -o '$samoutfile' -
68 #end if 68 #end if
69 ]]> 69 ]]>
70 </command> 70 </command>
71 71
72 <inputs> 72 <inputs>
177 <param name="samout" value="No" /> 177 <param name="samout" value="No" />
178 <param name="force_sort" value="True" /> 178 <param name="force_sort" value="True" />
179 <output name="counts" file="htseq-test-paired_counts.tsv" /> 179 <output name="counts" file="htseq-test-paired_counts.tsv" />
180 <output name="othercounts" file="htseq-test-paired_othercounts.tsv" /> 180 <output name="othercounts" file="htseq-test-paired_othercounts.tsv" />
181 </test> 181 </test>
182
183 <test> 182 <test>
184 <param name="samfile" value="htseq-test.sam" /> 183 <param name="samfile" value="htseq-test.sam" />
185 <param name="gfffile" value="htseq-test.gff" /> 184 <param name="gfffile" value="htseq-test.gff" />
186 <param name="samout" value="Yes" /> 185 <param name="samout" value="Yes" />
187 <param name="reference_source_selector" value="history" /> 186 <param name="reference_source_selector" value="history" />
283 Written by Simon Anders (sanders@fs.tum.de), European Molecular Biology 282 Written by Simon Anders (sanders@fs.tum.de), European Molecular Biology
284 Laboratory (EMBL). (c) 2010. Released under the terms of the GNU General 283 Laboratory (EMBL). (c) 2010. Released under the terms of the GNU General
285 Public License v3. Part of the 'HTSeq' framework. 284 Public License v3. Part of the 'HTSeq' framework.
286 ]]> 285 ]]>
287 </help> 286 </help>
288
289 <citations> 287 <citations>
290 <citation type="doi">10.1093/bioinformatics/btu638</citation> 288 <citation type="doi">10.1093/bioinformatics/btu638</citation>
291 </citations> 289 </citations>
292 </tool> 290 </tool>