-
Notifications
You must be signed in to change notification settings - Fork 22
random
Andy Pohl edited this page Oct 31, 2013
·
1 revision
The random program provides a matrix of random data from a bigWig. The dimensions of the data are the main parameters of the program. This program is only included in the bwtool suite if the GNU Scientific Library is installed prior to installing bwtool. GSL is used for its random number capabilities, although perhaps it's a bit overkill. The usage of the randome program:
bwtool random - retrieve data from random regions in the bigWig.
usage:
bwtool random n size input.bw output.txt
where n is the number of regions desired, and size is the size of each
region retrieved.
options:
-bed instead of outputting data, just output the bed indicating
where the data lies.
-NA-perc=p maximum percent of region allowed to contain NA values
-blacklist=bed specifically avoid these regions.
-seed=s seed the random number generator with some positive integer
The main example:
And we want some random data from this region:
$ bwtool random 3 4 main.bigWig stdout -seed=5
2.00 5.00 6.00 5.00
5.00 5.00 5.00 6.00
2.00 3.00 4.00 6.00
We set the -seed option above only to remain with the same example in the next demonstration. Looking at the data, we can confirm where this data is taken using the -bed option:
$ bwtool random 3 4 main.bigWig stdout -seed=5 -bed
chr 1 5
chr 7 11
chr 27 31