Description Usage Arguments Details Value Examples
View source: R/makePSN_NamedMatrix.R
Create patient networks from full matrix of named measurements
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
xpr |
(matrix) rows are measurements, columns are samples. Columns must be named (patient ID) |
nm |
(character) names for measurements corresponding to row order
of |
namedSets |
(list) sets of names to be grouped together. keys are
set names, and networks will be named as these. values are character
vectors corresponding to groups of names (matching those in |
outDir |
(char) path to directory where networks are written. If missing, is set to tempdir() |
simMetric |
(char) measure of similarity. See |
verbose |
(logical) print detailed messages |
numCores |
(integer) number of cores for parallel network generation |
writeProfiles |
(logical) use GeneMANIA's ProfileToNetworkDriver to create interaction networks. If TRUE, this function writes subsets of the original data corresponding to networks to file (profiles). If FALSE, uses getSimilarity() and writes interaction networks. |
sparsify |
(logical). If TRUE, sparsifies patient similarity network. See useSparsify2, sparsify_edgeMax and sparsify_maxInt |
useSparsify2 |
(logical). Cleaner sparsification routine. If FALSE, uses new matrix-based sparsify3 |
cutoff |
(numeric) patients with similarity smaller than this value are not included in the corresponding interaction network |
sparsify_edgeMax |
(numeric) Max number of edges to include in the final network |
sparsify_maxInt |
(numeric) Max num edges per node in sparsified network. |
minMembers |
(integer) min number of measures in a network for the network to be included. Useful when similarity measures require a minimum number of measures to be meaningful (e.g. minimum of 6 for Pearson correlation) |
runSerially |
(logical) set to TRUE to create nets serially, rather than in parallel |
... |
passed to |
Creates patient similarity networks when full matrices of
data are provided (e.g. gene expression, questionnaire results). To
generate networks from sparse data such as CNVs or indels, use
makePSN_RangeSets
instead.
The rows of the data matrix (xpr) must be named (nm); one network is
create for each named set (namedSets). There are two options for the
way in which networks are created, depending on the value of
writeProfiles
.
1. writeProfiles=TRUE: GeneMANIA is used to generate interaction networks
and sparsify networks. This only works if the desired measure of
similarity is network-level Pearson correlation; an example is networks
at the level of pathways. In this case, the user does not explicitly
specify a similarity measure and simMetric
is ignored.
2. writeProfiles=FALSE: GeneMANIA is not used to generate interaction
networks. Rather, netDx uses simMetric
to create interaction
networks. Networks can be sparsified by excluding weak connections
(cutoff).
(char) Basename of files to which networks are written.
Side effect of writing interaction networks in outDir
1 2 3 4 5 | data(xpr,pheno,pathwayList);
# you may get a warning message that the output directory already
# exists; ignore it
out <- makePSN_NamedMatrix(xpr,rownames(xpr),pathwayList,
'.',writeProfiles=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.