View source: R/input_output_filter.R
filter_dm | R Documentation |
Filter out or keep particular samples in a dissimilarity matrix based on contextual metadata.
filter_dm(input_dm, filter_cat, filter_vals, keep_vals)
input_dm |
The input dissimilarity matrix with corresponding mapping
file as generated by |
filter_cat |
The metadata map header string for the factor you would like to use to filter samples. |
filter_vals |
The values within the filter category (vector or single value) you would like to use to remove samples from the dissimilarity matrix and metadata map. |
keep_vals |
Alternatively, keep only samples represented by these values. |
A list variable with (1) the loaded dissimilarity matrix and (2) the loaded mapping file.
# rarefy fruits_veggies_rar = single_rarefy(fruits_veggies, 1000) # calculate dissimilarities dm = calc_dm(fruits_veggies_rar$data_loaded) # calculated mean dissimilarities by sample type dm_means = calc_mean_dissimilarities(dm = dm, metadata_map = fruits_veggies$map_loaded, summarize_by_factor = 'Sample_type', return_map = TRUE) # filter sample types to include only lettuce and spinach filter_dm(input_dm = dm_means, filter_cat = 'Sample_type', keep_vals = c('Lettuce', 'Spinach'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.