Mercurial > repos > iuc > bigwig_outlier_bed
annotate bigwig_outlier_bed.py @ 0:ebcd48f183b3 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
author | iuc |
---|---|
date | Fri, 05 Jul 2024 06:00:15 +0000 |
parents | |
children | 8377a6abb4da |
rev | line source |
---|---|
0
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
1 """ |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
2 Ross Lazarus June 2024 for VGP |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
3 Bigwigs are great, but hard to reliably "see" small low coverage or small very high coverage regions. |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
4 Colouring in JB2 tracks will need a new plugin, so this code will find bigwig regions above and below a chosen percentile point. |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
5 0.99 and 0.01 work well in testing with a minimum span of 10 bp. |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
6 Multiple bigwigs **with the same reference** can be combined - bed segments will be named appropriately |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
7 Combining multiple references works but is silly because only display will rely on one reference so others will not be shown... |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
8 Tricksy numpy method from http://gregoryzynda.com/python/numpy/contiguous/interval/2019/11/29/contiguous-regions.html |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
9 takes about 95 seconds for a 17MB test wiggle |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
10 JBrowse2 bed normally displays ignore the score, so could provide separate low/high bed file outputs as an option. |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
11 Update june 30 2024: wrote a 'no-build' plugin for beds to display red/blue if >0/<0 so those are used for scores |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
12 Bed interval naming must be short for JB2 but needs input bigwig name and (lo or hi). |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
13 """ |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
14 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
15 import argparse |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
16 import copy |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
17 import os |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
18 import sys |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
19 from pathlib import Path |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
20 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
21 import numpy as np |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
22 import pybigtools |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
23 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
24 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
25 class findOut: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
26 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
27 def __init__(self, args): |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
28 self.bwnames = args.bigwig |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
29 self.bwlabels = args.bigwiglabels |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
30 self.bedwin = args.minwin |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
31 self.qlo = args.qlo |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
32 self.qhi = args.qhi |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
33 self.outbeds = args.outbeds |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
34 self.bedouthi = args.bedouthi |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
35 self.bedoutlo = args.bedoutlo |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
36 self.bedouthilo = args.bedouthilo |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
37 self.tableoutfile = args.tableoutfile |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
38 self.bedwin = args.minwin |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
39 self.qhi = args.qhi |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
40 self.qlo = args.qlo |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
41 nbw = len(args.bigwig) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
42 nlab = len(args.bigwiglabels) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
43 if nlab < nbw: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
44 self.bwlabels += ["Nolabel"] * (nbw - nlab) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
45 self.makeBed() |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
46 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
47 def processVals(self, bw, isTop): |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
48 """ |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
49 idea from http://gregoryzynda.com/python/numpy/contiguous/interval/2019/11/29/contiguous-regions.html |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
50 Fast segmentation into regions by taking np.diff on the boolean array of over (under) cutpoint indicators in bwex. |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
51 This only gives non-zero values at the segment boundaries where there's a change, so those zeros are all removed in bwexdnz |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
52 leaving an array of segment start/end positions. That's twisted around into an array of start/end coordinates. |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
53 Magical. Fast. Could do the same for means or medians over windows for sparse bigwigs like repeat regions. |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
54 """ |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
55 if isTop: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
56 bwex = np.r_[False, bw >= self.bwtop, False] # extend with 0s |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
57 else: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
58 bwex = np.r_[False, bw <= self.bwbot, False] |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
59 bwexd = np.diff(bwex) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
60 bwexdnz = bwexd.nonzero()[0] |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
61 bwregions = np.reshape(bwexdnz, (-1, 2)) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
62 return bwregions |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
63 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
64 def writeBed(self, bed, bedfname): |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
65 """ |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
66 potentially multiple |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
67 """ |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
68 bed.sort() |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
69 beds = ["%s\t%d\t%d\t%s\t%d" % x for x in bed] |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
70 with open(bedfname, "w") as bedf: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
71 bedf.write("\n".join(beds)) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
72 bedf.write("\n") |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
73 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
74 def makeTableRow(self, bw, bwlabel, chr): |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
75 """ |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
76 called for every contig, but messy inline |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
77 """ |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
78 bwmean = np.mean(bw) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
79 bwstd = np.std(bw) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
80 bwmax = np.max(bw) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
81 nrow = np.size(bw) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
82 bwmin = np.min(bw) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
83 row = "%s\t%s\t%d\t%f\t%f\t%f\t%f" % ( |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
84 bwlabel, |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
85 chr, |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
86 nrow, |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
87 bwmean, |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
88 bwstd, |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
89 bwmin, |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
90 bwmax, |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
91 ) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
92 if self.qhi is not None: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
93 row += "\t%f" % self.bwtop |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
94 else: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
95 row += "\t" |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
96 if self.qlo is not None: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
97 row += "\t%f" % self.bwbot |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
98 else: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
99 row += "\t" |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
100 return row |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
101 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
102 def makeBed(self): |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
103 bedhi = [] |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
104 bedlo = [] |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
105 bwlabels = self.bwlabels |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
106 bwnames = self.bwnames |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
107 if self.tableoutfile: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
108 restab = ["bigwig\tcontig\tn\tmean\tstd\tmin\tmax\tqtop\tqbot"] |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
109 for i, bwname in enumerate(bwnames): |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
110 bwlabel = bwlabels[i].replace(" ", "") |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
111 fakepath = "in%d.bw" % i |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
112 if os.path.isfile(fakepath): |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
113 os.remove(fakepath) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
114 p = Path(fakepath) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
115 p.symlink_to(bwname) # required by pybigtools (!) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
116 bwf = pybigtools.open(fakepath) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
117 chrlist = bwf.chroms() |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
118 chrs = list(chrlist.keys()) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
119 chrs.sort() |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
120 for chr in chrs: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
121 bw = bwf.values(chr) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
122 bw = bw[~np.isnan(bw)] # some have NaN if parts of a contig not covered |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
123 if self.qhi is not None: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
124 self.bwtop = np.quantile(bw, self.qhi) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
125 bwhi = self.processVals(bw, isTop=True) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
126 for j, seg in enumerate(bwhi): |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
127 if seg[1] - seg[0] >= self.bedwin: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
128 bedhi.append((chr, seg[0], seg[1], "%s_hi" % (bwlabel), 1)) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
129 if self.qlo is not None: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
130 self.bwbot = np.quantile(bw, self.qlo) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
131 bwlo = self.processVals(bw, isTop=False) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
132 for j, seg in enumerate(bwlo): |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
133 if seg[1] - seg[0] >= self.bedwin: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
134 bedlo.append((chr, seg[0], seg[1], "%s_lo" % (bwlabel), -1)) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
135 if self.tableoutfile: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
136 row = self.makeTableRow(bw, bwlabel, chr) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
137 restab.append(copy.copy(row)) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
138 if self.tableoutfile: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
139 stable = "\n".join(restab) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
140 with open(self.tableoutfile, "w") as t: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
141 t.write(stable) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
142 t.write("\n") |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
143 some = False |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
144 if self.qlo: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
145 if self.outbeds in ["outall", "outlo", "outlohi"]: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
146 self.writeBed(bedlo, self.bedoutlo) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
147 some = True |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
148 if self.qhi: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
149 if self.outbeds in ["outall", "outlohi", "outhi"]: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
150 self.writeBed(bedhi, self.bedouthi) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
151 some = True |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
152 if self.outbeds in ["outall", "outhilo"]: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
153 allbed = bedlo + bedhi |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
154 self.writeBed(allbed, self.bedouthilo) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
155 some = True |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
156 if not some: |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
157 sys.stderr.write( |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
158 "Invalid configuration - no output could be created. Was qlo missing and only low output requested for example?" |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
159 ) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
160 sys.exit(2) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
161 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
162 |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
163 if __name__ == "__main__": |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
164 parser = argparse.ArgumentParser() |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
165 a = parser.add_argument |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
166 a("-m", "--minwin", default=10, type=int) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
167 a("-l", "--qlo", default=None, type=float) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
168 a("-i", "--qhi", default=None, type=float) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
169 a("--bedouthi", default=None) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
170 a("--bedoutlo", default=None) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
171 a("--bedouthilo", default=None) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
172 a("-w", "--bigwig", nargs="+") |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
173 a("-n", "--bigwiglabels", nargs="+") |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
174 a("-o", "--outbeds", default="outhilo", help="optional high and low combined bed") |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
175 a("-t", "--tableoutfile", default=None) |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
176 args = parser.parse_args() |
ebcd48f183b3
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bigwig_outlier_bed commit 091caba3c5b066b293745ccee5cd31132fec3b4b
iuc
parents:
diff
changeset
|
177 findOut(args) |