Mercurial > repos > fubar > bbgbigwig_dev
annotate bam_bed_gff_to_bigwig.xml @ 7:9625f4fffac6 draft
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
author | fubar |
---|---|
date | Sat, 15 Jun 2024 09:52:04 +0000 |
parents | 4043d4155909 |
children | 3f519a0ca30c |
rev | line source |
---|---|
7
9625f4fffac6
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
6
diff
changeset
|
1 <tool id="bbgtobigwig" name="BAM BED GFF coverage bigWigs" version="0.3" profile="22.05"> |
3
3899b3091d4a
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
2
diff
changeset
|
2 <xrefs> |
3899b3091d4a
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
2
diff
changeset
|
3 <xref type="bio.tools">UCSC_Genome_Browser_Utilities</xref> |
3899b3091d4a
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
2
diff
changeset
|
4 </xrefs> |
1
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
5 <requirements> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
6 <requirement type="package" version="455">ucsc-bedgraphtobigwig</requirement> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
7 <requirement type="package" version="2.31.1">bedtools</requirement> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
8 <requirement type="package" version="9.5">coreutils</requirement> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
9 <requirement type="package" version="3.12.3">python</requirement> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
10 </requirements> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
11 <required_files> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
12 <include path="gff_to_bed_converter.py"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
13 </required_files> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
14 <command detect_errors="aggressive"><![CDATA[ |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
15 #if $hist_or_builtin.genosrc == "indexed": |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
16 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
|
17 #else: |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
18 ln -s '$chromfile' ./CHROMFILE && |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
19 #end if |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
20 #if $input1.ext in ['gff', 'gff3']: |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
21 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
|
22 #else: |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
23 ln -s '$input1' input2 && |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
24 #end if |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
25 #if $input1.ext == "bam": |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
26 bedtools genomecov -bg -split -ibam input2 | |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
27 #else |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
28 bedtools genomecov -bg -i input2 -g ./CHROMFILE | |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
29 #end if |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
30 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
|
31 bedGraphToBigWig temp.bg ./CHROMFILE '$output' |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
32 ]]></command> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
33 <inputs> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
34 <conditional name="hist_or_builtin"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
35 <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
|
36 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
|
37 <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
|
38 <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
|
39 </param> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
40 <when value="indexed"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
41 <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
|
42 <validator type="unspecified_build" /> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
43 </param> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
44 <param name="chromfile" type="select" label="Source Genome Build"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
45 <options from_data_table="__dbkeys__"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
46 <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
|
47 </options> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
48 <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
|
49 </param> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
50 </when> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
51 <when value="history"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
52 <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
|
53 <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
|
54 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
|
55 </when> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
56 </conditional> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
57 </inputs> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
58 <outputs> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
59 <data name="output" format="bigwig"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
60 </outputs> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
61 <tests> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
62 <test expect_num_outputs="1"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
63 <conditional name="hist_or_builtin"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
64 <param name="genosrc" value="indexed"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
65 <param name="input1" value="featureCounts_input1.bam" dbkey="hg38"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
66 <param name="chromfile" value="hg38"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
67 </conditional> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
68 <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
|
69 </test> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
70 <test expect_num_outputs="1"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
71 <conditional name="hist_or_builtin"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
72 <param name="genosrc" value="history"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
73 <param name="input1" value="srma_out2.bam"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
74 <param name="chromfile" value="testing.len"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
75 </conditional> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
76 <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
|
77 </test> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
78 <test expect_num_outputs="1"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
79 <conditional name="hist_or_builtin"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
80 <param name="genosrc" value="history"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
81 <param name="input1" value="test5.gff3"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
82 <param name="chromfile" value="testing.len"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
83 </conditional> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
84 <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
|
85 </test> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
86 <test expect_num_outputs="1"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
87 <conditional name="hist_or_builtin"> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
88 <param name="genosrc" value="history"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
89 <param name="input1" value="test5.bed"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
90 <param name="chromfile" value="testing.len"/> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
91 </conditional> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
92 <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
|
93 </test> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
94 </tests> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
95 <help> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
96 |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
97 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
|
98 |
5
f132065ac170
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
3
diff
changeset
|
99 A chromosome lengths file must be provided if the input has a missing dbkey (='?') on the pencil (edit attributes) form. |
2
460f523c8ff4
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
1
diff
changeset
|
100 |
460f523c8ff4
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
1
diff
changeset
|
101 The actual reference is not needed. The Compute sequence length tool can generate the lengths file. |
1
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
102 |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
103 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
|
104 |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
105 </help> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
106 <citations> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
107 <citation type="doi">10.1093/bioinformatics/btq351</citation> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
108 </citations> |
49c6f715bc82
planemo upload for repository https://www.encodeproject.org/software/bedgraphtobigwig/
fubar
parents:
diff
changeset
|
109 </tool> |