Description Usage Arguments Details Value See Also
Calculates a metagene profile from the full data set as well as bootstrapping samples (sampling genes). Profiles are calculated separately for each experiment and replicate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | metagene_profiles(data, ...)
## S3 method for class 'serp_data'
metagene_profiles(
data,
profilefun,
len,
bin,
filter = NULL,
binwidth = 1,
binmethod = c("sum", "mean"),
normalizefun = NULL,
align = "start",
nboot = 100,
bpparam = BiocParallel::bpparam()
)
## S3 method for class 'serp_features'
metagene_profiles(
data,
profilefun,
len,
bin,
filter = NULL,
binwidth = 1,
binmethod = c("sum", "mean"),
normalizefun = NULL,
align = "start",
nboot = 100,
bpparam = BiocParallel::bpparam()
)
|
data |
The data. |
profilefun |
Function that calculates a profile. Must accept named arguments for all sample types
present in the data set (matrices with genes in rows cropped to the profile region.
Missing values, e.g. if a gene ends within the profile region, are encoded as |
len |
Length of the profile. |
bin |
Bin level ( |
filter |
List of genes to include. Defaults to all genes. |
binwidth |
Bin width. |
binmethod |
How to bin the data. |
normalizefun |
Function that normalizes the data pefore binning and profile calculation. Must accept
the same arguments as |
align |
Alignment of the metagene profile, one of |
nboot |
Number of bootstrap samples. |
bpparam |
A |
Data matrices are first filtered to contain the same set of genes (i.e. only the intersection of
genes contained in all matrices is retained). For serp_data
objects, this filtering is performed
separately for each experiment and replicate. Data matrices are the filtered to contain only genes in
filter
, if filter is given
. Matrices are then passed to normalizefun
as named arguments, with names corresponding to sample type. If align
is one of start
or stop
, normalized data matrices are first aligned, then binned and trimmed to len
columns. If align
is a vector of positions, data matrices are centered using
make_aligned_mats
without binning for performance reasons, binning
is performed on the final profiles. The centered and trimmed data matrices are passed as named
arguments to profilefun
, which calculates the final profiles. profilefun
can return
either a single numeric vector, representing a single profile calculated from all data matrices,
or a named list of numeric vectors.
A tibble with the following columns:
ID of the bootstrap sample
Distance from the align
position. If bin == 'byaa'
this is measured in codons,
otherwise in nucleotides.
Logical, indicates whether this profile was generated from a bootstrap sample or from the complete data set.
Only if profilefun
returns a list. Corresponds to the name of the list element
containing the profile.
The value returned by profilefun
.
defaults, make_average_profilefun
,
make_enrichment_profilefun
, make_expression_normalizefun
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.