Description Usage Arguments Details Value Examples
Constructor that creates a MaveDB filter object
1 | new.mave.filter(data, verbose = TRUE)
|
data |
A data.frame containing a MaveDB data set containing at least the two columns "hgvs" and "score". |
verbose |
Logical. If TRUE, prints status messages while loading data. |
The resulting object offers a number of filter functions. All these functions return
vectors of type logical
, which can be combined with &
and |
to form
more complex filters before being applied to the data. (See example below). The following
functions are available.
mutationCount() filters by number of mutations in the variant. Parameters
min
and max
default to 0 and Inf respectively.
position() filters by the (start) position of the mutations. Parameters
min
and max
default to -Inf and Inf respectively. Parameter multi
determines whether in case of multi-mutants, the criterium must match any or all of the
individual mutations. Allowed values are "any" and "all".
residues() filters by amino acid residues. Parameter from and to are vectors of allowed
ancestral and variant amino acid residues.Parameter multi
determines whether in case of multi-mutants, the criterium must match any or all of the
individual mutations. Allowed values are "any" and "all".
numerical() filters by numerical columns. Parameter col
is the name of the numerical
column to filter by. Parameters min
and max
default to -Inf and Inf respectively.
categorical() filters by categorical columns. Parameter col
is the name of the categorical
column (of type character
or factor
) to filter by. Parameter values is a vector of
allowed values in that column to filter for.
a new MaveDB filter object
1 2 3 4 5 6 7 8 9 10 | ## Not run:
mave <- new.rapimave()
data <- mave$getScores("SCS000001A.2")
mfilter <- new.mave.filter(data)
filter <- with(mfilter,
position(min=5,multi="all") & residues(to="Ala",multi="all") & numerical("score",min=0.1)
)
filtered.data <- data[filter,]
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.