importResultsFromTables: Importation of clustering results from text files

View source: R/imports.R

importResultsFromTablesR Documentation

Importation of clustering results from text files

Description

The 'importResultsFromTables()' function imports cell clustering results from two dataframes ('cluster.abundances' and 'cluster.phenotypes'). This function returns a 'Results' object.

Usage

importResultsFromTables(cluster.abundances, cluster.phenotypes,
  clustering.markers = NULL, th.min_cells = 0, assignments = NULL)

Arguments

cluster.abundances

a dataframe of cells abundances with clusters in row and samples in column

cluster.phenotypes

a dataframe containing median marker expression values for each cluster of each sample. In additions of markers, the two first columns are are dedicated to "cluster" and "sample" identifiers.

clustering.markers

a character vector specifying markers that have been used during the clustering procedure (if NULL, all markers will be considered as clustering markers)

th.min_cells

a numeric specifying the minimum number of cell in a cluster of a sample to take its phenotype in account

assignments

a data.frame containing all samples names (in rownames) and columns providing contextual associations like "bc" (biological conditions), "tp" (biological conditions) and "ind" (individuals)

Details

This function returns a 'Results' object without 'flowset', 'fcs.files', 'graph' and 'graph.layout' slots.

The 'cluster.abundances' dataframe must be formatted with the cluster names in rownames as following:

x sample1 sample2 sample3 ...
cluster1 749 5421 8424 ...
cluster2 450 412 614 ...
cluster3 288 782 478 ...
... ... ... ... ...

The 'cluster.phenotypes' dataframe must be formatted as following:

sample cluster marker1 marker2 marker3 ...
sample1 cluster1 0.212 0.445 1.756 ...
sample1 cluster3 0.434 0.785 0.654 ...
sample2 cluster1 0.574 2.641 3.854 ...
sample2 cluster2 1.454 1.755 -0.568 ...
sample2 cluster3 1.445 1.875 -0.786 ...
sample3 cluster1 0.157 2.121 1.648 ...
sample3 cluster2 1.415 1.963 0.786 ...
sample3 cluster3 1.275 1.427 0.754 ...
... ... ... ... ... ...

Value

a S4 object of class 'Results'


tchitchek-lab/SPADEVizR documentation built on Jan. 27, 2024, 8:58 p.m.