compareSamples {phemd} | R Documentation

## Computes EMD distance matrix representing pairwise dissimilarity between samples

### Description

Takes as input a Phemd object with cell subtype relative frequencies for each sample in @data_cluster_weights slot and ground distance matrix (representing cell subtype pairwise dissimilarity) in @emd_dist_mat slot. Returns distance matrix representing pairwise dissimilarity between samples

### Usage

    compareSamples(obj)

### Arguments

`obj` | 'Phemd' object containing cell subtype relative frequencies for each sample in @data_cluster_weights slot and ground distance matrix (representing cell subtype dissimilarity) in @emd_dist_mat slot

### Details

Requires 'transport' and 'pracma' packages

### Value

Distance matrix of dimension num_samples x num_samples representing pairwise dissimilarity between samples

### Examples

    my_phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    my_phemdObj_lg <- removeTinySamples(my_phemdObj, 10)
    my_phemdObj_lg <- aggregateSamples(my_phemdObj_lg, max_cells=1000)
    my_phemdObj_monocle <- embedCells(my_phemdObj_lg, data_model = 'gaussianff', sigma=0.02, maxIter=2)
    my_phemdObj_monocle <- orderCellsMonocle(my_phemdObj_monocle)
    my_phemdObj_final <- clusterIndividualSamples(my_phemdObj_monocle)
    my_phemdObj_final <- generateGDM(my_phemdObj_final)
    my_EMD_mat <- compareSamples(my_phemdObj_final)

[Package phemd version 1.3.0 Index]