Mercurial > repos > fubar > bigwigoutlierbed
annotate bigwig_outlier_bed.xml @ 1:5c328fbb9418 draft
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
author | fubar |
---|---|
date | Mon, 01 Jul 2024 01:06:51 +0000 |
parents | 2fbbc1be6655 |
children | a8828f290a97 |
rev | line source |
---|---|
1
5c328fbb9418
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
0
diff
changeset
|
1 <tool name="bigwig_outlier_bed" id="bigwigoutlierbed" version="0.01" profile="22.05"> |
0
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
2 <!--Source in git at: https://github.com/fubar2/galaxy_tf_overlay--> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
3 <!--Created by toolfactory@galaxy.org at 30/06/2024 19:44:14 using the Galaxy Tool Factory.--> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
4 <description>Writes high and low bigwig regions as features in a bed file</description> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
5 <edam_topics> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
6 <edam_topic>topic_0157</edam_topic> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
7 <edam_topic>topic_0092</edam_topic> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
8 </edam_topics> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
9 <edam_operations> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
10 <edam_operation>operation_0337</edam_operation> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
11 </edam_operations> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
12 <requirements> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
13 <requirement version="3.12.4" type="package">python</requirement> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
14 <requirement version="2.0.0" type="package">numpy</requirement> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
15 <requirement version="0.1.4" type="package">pybigtools</requirement> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
16 </requirements> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
17 <version_command><![CDATA[pybigtools --version]]></version_command> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
18 <command><![CDATA[python |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
19 '$runme' |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
20 --bigwig |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
21 '$bigwig' |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
22 --bedouthilo |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
23 '$bedouthilo' |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
24 --minwin |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
25 '$minwin' |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
26 --qhi |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
27 '$qhi' |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
28 --qlo |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
29 '$qlo' |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
30 #if $tableout == "set" |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
31 --tableout |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
32 #end if |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
33 --bigwiglabels |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
34 '$bigwiglabels']]></command> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
35 <configfiles> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
36 <configfile name="runme"><![CDATA[#raw |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
37 """ |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
38 Bigwigs are great, but hard to reliably "see" small low coverage or small very high coverage regions. |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
39 Colouring in JB2 tracks will need a new plugin, so this code will find bigwig regions above and below a chosen percentile point. |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
40 0.99 and 0.01 work well in testing with a minimum span of 10 bp. |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
41 Multiple bigwigs **with the same reference** can be combined - bed segments will be named appropriately |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
42 Combining multiple references works but is silly because display will rely on one reference so features mapped to other references will not appear. |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
43 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
44 Tricksy numpy method from http://gregoryzynda.com/python/numpy/contiguous/interval/2019/11/29/contiguous-regions.html |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
45 takes about 95 seconds for a 17MB test wiggle |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
46 JBrowse2 bed normally displays ignore the score, so could provide separate low/high bed file outputs as an option. |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
47 Update june 30 2024: wrote a 'no-build' plugin for beds to display red/blue if >0/<0 so those are used for scores |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
48 Bed interval naming must be short for JB2 but needs input bigwig name and (lo or hi). |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
49 """ |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
50 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
51 import argparse |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
52 import numpy as np |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
53 import pybigtools |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
54 import sys |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
55 from pathlib import Path |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
56 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
57 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
58 class findOut(): |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
59 def __init__(self, args): |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
60 self.bwnames=args.bigwig |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
61 self.bwlabels=args.bigwiglabels |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
62 self.bedwin=args.minwin |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
63 self.qlo=args.qlo |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
64 self.qhi=args.qhi |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
65 self.bedouthilo=args.bedouthilo |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
66 self.bedouthi=args.bedouthi |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
67 self.bedoutlo=args.bedoutlo |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
68 self.tableout = args.tableout |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
69 self.bedwin = args.minwin |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
70 self.qhi = args.qhi |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
71 self.qlo = args.qlo |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
72 self.makeBed() |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
73 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
74 def processVals(self, bw, isTop): |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
75 # http://gregoryzynda.com/python/numpy/contiguous/interval/2019/11/29/contiguous-regions.html |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
76 if isTop: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
77 bwex = np.r_[False, bw >= self.bwtop, False] # extend with 0s |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
78 else: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
79 bwex = np.r_[False, bw <= self.bwbot, False] |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
80 bwexd = np.diff(bwex) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
81 bwexdnz = bwexd.nonzero()[0] |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
82 bwregions = np.reshape(bwexdnz, (-1,2)) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
83 return bwregions |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
84 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
85 def writeBed(self, bed, bedfname): |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
86 """ |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
87 potentially multiple |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
88 """ |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
89 bed.sort() |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
90 beds = ['%s\t%d\t%d\t%s\t%d' % x for x in bed] |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
91 with open(bedfname, "w") as bedf: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
92 bedf.write('\n'.join(beds)) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
93 bedf.write('\n') |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
94 print('Wrote %d bed regions to %s' % (len(bed), bedfname)) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
95 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
96 def makeBed(self): |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
97 bedhi = [] |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
98 bedlo = [] |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
99 bwlabels = self.bwlabels |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
100 bwnames = self.bwnames |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
101 print('bwnames=', bwnames, "bwlabs=", bwlabels) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
102 for i, bwname in enumerate(bwnames): |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
103 bwlabel = bwlabels[i].replace(" ",'') |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
104 p = Path('in.bw') |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
105 p.symlink_to( bwname ) # required by pybigtools (!) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
106 bwf = pybigtools.open('in.bw') |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
107 chrlist = bwf.chroms() |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
108 chrs = list(chrlist.keys()) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
109 chrs.sort() |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
110 restab = ["contig\tn\tmean\tstd\tmin\tmax\tqtop\tqbot"] |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
111 for chr in chrs: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
112 bw = bwf.values(chr) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
113 bw = bw[~np.isnan(bw)] # some have NaN if parts of a contig not covered |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
114 if self.qhi is not None: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
115 self.bwtop = np.quantile(bw, self.qhi) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
116 bwhi = self.processVals(bw, isTop=True) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
117 for i, seg in enumerate(bwhi): |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
118 if seg[1] - seg[0] >= self.bedwin: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
119 bedhi.append((chr, seg[0], seg[1], '%s_hi' % (bwlabel), 1)) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
120 if self.qlo is not None: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
121 self.bwbot = np.quantile(bw, self.qlo) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
122 bwlo = self.processVals(bw, isTop=False) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
123 for i, seg in enumerate(bwlo): |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
124 if seg[1] - seg[0] >= self.bedwin: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
125 bedlo.append((chr, seg[0], seg[1], '%s_lo' % (bwlabel), -1)) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
126 bwmean = np.mean(bw) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
127 bwstd = np.std(bw) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
128 bwmax = np.max(bw) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
129 nrow = np.size(bw) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
130 bwmin = np.min(bw) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
131 restab.append('%s\t%d\t%f\t%f\t%f\t%f\t%f\t%f' % (chr,nrow,bwmean,bwstd,bwmin,bwmax,self.bwtop,self.bwbot)) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
132 print('\n'.join(restab), '\n') |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
133 if self.tableout: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
134 with open(self.tableout) as t: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
135 t.write('\n'.join(restab)) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
136 t.write('\n') |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
137 if self.bedoutlo: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
138 if self.qlo: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
139 self.writeBed(bedlo, self.bedoutlo) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
140 if self.bedouthi: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
141 if self.qhi: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
142 self.writeBed(bedhi, self.bedouthi) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
143 if self.bedouthilo: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
144 allbed = bedlo + bedhi |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
145 self.writeBed(allbed, self.bedouthilo) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
146 return restab |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
147 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
148 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
149 if __name__ == "__main__": |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
150 parser = argparse.ArgumentParser() |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
151 a = parser.add_argument |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
152 a('-m', '--minwin',default=10, type=int) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
153 a('-l', '--qlo',default=None, type=float) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
154 a('-i', '--qhi',default=None, type=float) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
155 a('-w', '--bigwig', nargs='+') |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
156 a('-n', '--bigwiglabels', nargs='+') |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
157 a('-o', '--bedouthilo', default=None, help="optional high and low combined bed") |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
158 a('-u', '--bedouthi', default=None, help="optional high only bed") |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
159 a('-b', '--bedoutlo', default=None, help="optional low only bed") |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
160 a('-t', '--tableout', default=None) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
161 args = parser.parse_args() |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
162 print('args=', args) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
163 if not (args.bedouthilo or args.bedouthi or args.bedoutlo): |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
164 sys.stderr.write("bigwig_outlier_bed.py cannot usefully run - need a bed output choice - must be one of low only, high only or both combined") |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
165 sys.exit(2) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
166 if not (args.qlo or args.qhi): |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
167 sys.stderr.write("bigwig_outlier_bed.py cannot usefully run - need one or both of quantile cutpoints qhi and qlo") |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
168 sys.exit(2) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
169 restab = findOut(args) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
170 if args.tableout: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
171 with open(args.tableout, 'w') as tout: |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
172 tout.write('\n'.join(restab)) |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
173 tout.write('\n') |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
174 #end raw]]></configfile> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
175 </configfiles> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
176 <inputs> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
177 <param name="bigwig" type="data" optional="false" label="Bigwig file(s) to process. " help="If more than one, MUST all use the same reference sequence to be displayable. Feature names will include the bigwig label." format="bigwig" multiple="true"/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
178 <param name="minwin" type="integer" value="10" label="Minimum continuous bases to count as a high or low bed feature" help="Actual run length will be found and used for continuous features as long or longer."/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
179 <param name="qhi" type="float" value="0.99" label="Quantile cutoff for a high region - 0.99 will cut off at or above the 99th percentile" help=""/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
180 <param name="qlo" type="float" value="0.01" label="Quantile cutoff for a low region - 0.01 will cut off at or below the 1st percentile." help=""/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
181 <param name="tableout" type="select" label="Write a table showing contig statistics for each bigwig" help="" display="radio"> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
182 <option value="notset">Do not set this flag</option> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
183 <option value="set">Set this flag</option> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
184 </param> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
185 <param name="bigwiglabels" type="text" value="outbed" label="Label to use in bed feature names to indicate source bigwig contents - such as coverage" help=""/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
186 </inputs> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
187 <outputs> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
188 <data name="bedouthilo" format="bed" label="Both high and low contiguous regions as long or longer than window length into one bed " hidden="false"/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
189 </outputs> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
190 <tests> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
191 <test> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
192 <output name="bedouthilo" value="bedouthilo_sample" compare="diff" lines_diff="0"/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
193 <param name="bigwig" value="bigwig_sample"/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
194 <param name="minwin" value="10"/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
195 <param name="qhi" value="0.99"/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
196 <param name="qlo" value="0.01"/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
197 <param name="tableout" value="notset"/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
198 <param name="bigwiglabels" value="outbed"/> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
199 </test> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
200 </tests> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
201 <help><![CDATA[ |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
202 **What it Does** |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
203 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
204 Takes one or more bigwigs mapped to the same reference and finds all the minimum window sized or greater contiguous regions above or below an upper and lower quantile cutoff. |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
205 A window size of 10 works well, and quantiles set at 0.01 and 0.99 will generally work well. |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
206 |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
207 ]]></help> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
208 <citations> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
209 <citation type="doi">10.1093/bioinformatics/btae350</citation> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
210 </citations> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
211 </tool> |
2fbbc1be6655
planemo upload for repository https://github.com/jackh726/bigtools commit ce6b9f638ebcebcad5a5b10219f252962f30e5cc-dirty
fubar
parents:
diff
changeset
|
212 |