Description Usage Arguments Value Examples
View source: R/get_pairwise_rank_matrices.R
This function compares the magnitude of the features in pairwise fashion (e.g Xi vs Xj). This is done across all (non-restricted) gene pairs per sample, and generates a list of num_samples matrices, where each matrix is an num_rows x num_rows matrix with either a) an indicator variable (1 if Xi > Xj) or b) a rank difference between features (rank(Xi) - rank(Xj))
1 | get_pairwise_rank_matrices(X, restrict = FALSE, use_diff_rank = TRUE)
|
X |
a feature matrix with samples as cols and features as rows (NOTE: this is a transpose of how a feature matrix is frequently thought of) |
restrict |
Defaults to FALSE. Otherwise, must be a vector of feature names to restrict analysis to. If provided, the output matrices will only contain pairwise feature scores for comparisons that always include at least one of the features from the restrict vector.In other words, the rows of the output matrices will be restricted to the features in restrict although the cols will still include all features This way, all restrict features are compared to all other features, which allows for the inclusion of non-restrict features in pairs, which may reflect important feature relationships. Otherwise, if restrict == false, all features will be considered. |
use_diff_rank |
a logical. If FALSE, pairwise feature scores are indicators of whether Xi > Xj. If TRUE, pairwise feature scores are differences in rank |
a list of matrices, with each matrix containing a score reflecting a pairwise comparison between features, per sample (i.e. each matrix reflects pairwise feature scores per sample)
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.