binstats | R Documentation |
Given GRanges of binned eg read depth data with field $cn, crosses nodes in graph and annotates graph nodes with 'cn' and 'weight'. Done upstream of balance.
If "by" field(s) specified and these fields exist in both bins and graph nodes, then will use these in the overlaps query
If field, purity, and ploidy provided then will also transform read depth data in bin column "field" using purity and ploidy to generate
binstats(
gg,
bins,
by = NULL,
field = NULL,
purity = gg$meta$purity,
ploidy = gg$meta$ploidy,
loess = TRUE,
min.bins = 3,
verbose = TRUE,
min.var = 0.1,
lp = FALSE
)
gg |
gGraph |
bins |
GRanges with field $cn or field field |
by |
optional character vector specifying metadata field(s) shared by gg$nodes and bins to which bin / node overlaps will be limited to |
field |
character vector field of bins to convert to (NULL) |
purity |
purity parameter either specified together with field or embedded in gg$meta, must be specified if field is not NULL |
ploidy |
ploidy parameter either specified together with field or embedded in gg$meta, must be specified if field is not NULL |
loess |
logical flag whether to smooth / fit variance using loess (FALSE) |
min.bins |
minimum number of bins to use for intra segment variance computation (3) |
min.var |
minimal allowable per segment bin variance, which will ignore segments with very low variance due to all 0 or other reasons (0.1) |
lp |
(logical) return weights consistent with LP optimization |
gGraph whose nodes are annotated with $cn and $weight field
Marcin Imielinski
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.