Mercurial > repos > fubar > bbgbigwig_dev
annotate bam_bed_gff_to_bigwig.xml @ 1:49c6f715bc82 draft
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
author | fubar |
---|---|
date | Fri, 14 Jun 2024 06:47:20 +0000 |
parents | |
children | 460f523c8ff4 |
rev | line source |
---|---|
1
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
1 <tool id="bbgtobigwig" name="Convert BAM/BED/GFF to BigWig" version="0.1" profile="22.05"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
2 <requirements> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
3 <requirement type="package" version="455">ucsc-bedgraphtobigwig</requirement> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
4 <requirement type="package" version="2.31.1">bedtools</requirement> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
5 <requirement type="package" version="9.5">coreutils</requirement> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
6 <requirement type="package" version="3.12.3">python</requirement> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
7 </requirements> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
8 <required_files> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
9 <include path="gff_to_bed_converter.py"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
10 </required_files> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
11 <command detect_errors="aggressive"><![CDATA[ |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
12 #if $hist_or_builtin.genosrc == "indexed": |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
13 ln -s '$hist_or_builtin.chromfile.fields.len_path' ./CHROMFILE && |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
14 #else: |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
15 ln -s '$chromfile' ./CHROMFILE && |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
16 #end if |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
17 #if $input1.ext in ['gff', 'gff3']: |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
18 python '$__tool_directory__/gff_to_bed_converter.py' < '$input1' > input2 && |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
19 #else: |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
20 ln -s '$input1' input2 && |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
21 #end if |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
22 #if $input1.ext == "bam": |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
23 bedtools genomecov -bg -split -ibam input2 | |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
24 #else |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
25 bedtools genomecov -bg -i input2 -g ./CHROMFILE | |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
26 #end if |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
27 LC_COLLATE=C sort -k1,1 -k2,2n > temp.bg && |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
28 bedGraphToBigWig temp.bg ./CHROMFILE '$output' |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
29 ]]></command> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
30 <inputs> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
31 <conditional name="hist_or_builtin"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
32 <param name="genosrc" type="select" label="Is the input assigned to a built-in or custom reference genome?" |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
33 help="If the input has no dbkey, supply a chromosome lengths file"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
34 <option selected="True" value="indexed">Input data was made with a built-in genome or already has a custom genome dbkey</option> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
35 <option value="history">Input data mapped on a genome from the current history. The chromosome lengths file is also in the history</option> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
36 </param> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
37 <when value="indexed"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
38 <param name="input1" type="data" format="bam,unsorted.bam,bed,gff,gff3" label="bam/bed/gff to convert"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
39 <validator type="unspecified_build" /> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
40 </param> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
41 <param name="chromfile" type="select" label="Source Genome Build"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
42 <options from_data_table="__dbkeys__"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
43 <filter type="data_meta" column="0" key="dbkey" ref="input1"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
44 </options> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
45 <validator type="no_options" message="The chosen genome build is not available."/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
46 </param> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
47 </when> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
48 <when value="history"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
49 <param name="input1" type="data" format="bam,unsorted.bam,bed,gff,gff3" label="bam/bed/gff to convert"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
50 <param name="chromfile" type="data" format="len,txt,tabular" label="Chromosome length file" |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
51 help="Sequence lengths for the history reference are required to make a bigwig. Compute sequence length tool makes these from fasta files"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
52 </when> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
53 </conditional> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
54 </inputs> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
55 <outputs> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
56 <data name="output" format="bigwig"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
57 </outputs> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
58 <tests> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
59 <test expect_num_outputs="1"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
60 <conditional name="hist_or_builtin"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
61 <param name="genosrc" value="indexed"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
62 <param name="input1" value="featureCounts_input1.bam" dbkey="hg38"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
63 <param name="chromfile" value="hg38"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
64 </conditional> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
65 <output name="output" value="featureCounts_input1.bigwig" compare="sim_size"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
66 </test> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
67 <test expect_num_outputs="1"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
68 <conditional name="hist_or_builtin"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
69 <param name="genosrc" value="history"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
70 <param name="input1" value="srma_out2.bam"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
71 <param name="chromfile" value="testing.len"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
72 </conditional> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
73 <output name="output" value="srma_out2.bigwig" compare="sim_size"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
74 </test> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
75 <test expect_num_outputs="1"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
76 <conditional name="hist_or_builtin"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
77 <param name="genosrc" value="history"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
78 <param name="input1" value="test5.gff3"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
79 <param name="chromfile" value="testing.len"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
80 </conditional> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
81 <output name="output" value="test5.gff.bigwig" compare="sim_size"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
82 </test> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
83 <test expect_num_outputs="1"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
84 <conditional name="hist_or_builtin"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
85 <param name="genosrc" value="history"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
86 <param name="input1" value="test5.bed"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
87 <param name="chromfile" value="testing.len"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
88 </conditional> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
89 <output name="output" value="test5.bed.bigwig" compare="sim_size"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
90 </test> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
91 </tests> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
92 <help> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
93 |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
94 Estimates coverage of a reference genome for bam, bed or gff as a bigwig, suitable for viewing in JBrowse2 or other browser. |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
95 |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
96 If the input does not have a dbkey, a chromosome lengths file must be provided. The actual reference is not needed. |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
97 |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
98 This can be useful in workflows with assemblies in progress before a stable reference is available for a custom or built in reference dbkey. |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
99 |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
100 </help> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
101 <citations> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
102 <citation type="doi">10.1093/bioinformatics/btq351</citation> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
103 </citations> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
104 </tool> |