loadDataOrMatrix: loadDataOrMatrix

View source: R/loadDataset.R

loadDataOrMatrixR Documentation

loadDataOrMatrix

Description

This function allows to import the coldata, rowData or the countMatrix. It formats each type of data to follow the requirements of CONCLUS.

Usage

loadDataOrMatrix(file, type, columnID=NULL, header=TRUE, sep='\t', dec=".",
                    ignoreCellNumber=FALSE)

Arguments

file

Path to the rowData, colData or Matrix.

type

Values should be "coldata", "rowdata", or "countMatrix".

columnID

For row and col data, column name containing cells/genes names/id. Should be the same names of genes or cells that in the count matrix. Should not be used when importing a matrix. Default=NULL.

header

Set TRUE if the first row of the table corresponds to the column names, and FALSE if it doesn't. Default=TRUE.

sep

Character used in the table to separate the fields. Usually it's ' ' ';' ',' or '\t'. Default='\t'.

dec

Character used in the table for decimal points. Usually '.' or ',' . Default=".".

ignoreCellNumber

CONCLUS needs a large number of cells to collect statistics, so we recommend using CONCLUS if you have at least 100 cells. If you still want to use a count matrix with a number of cells inferior to 100 cells, set ignoreCellNumber=TRUE. Default=FALSE.

Value

The formatted row, col data or the matrix.

Author(s)

Ilyess RACHEDI and Nicolas DESCOSTES

Examples


## ColData
coldataPath <- system.file("extdata/colData.tsv", package="conclus")
loadDataOrMatrix(file=coldataPath, type="coldata", columnID="cell_ID")

## RowData
rowdataPath <- system.file("extdata/rowData.tsv",  package="conclus")
loadDataOrMatrix(file=rowdataPath, type="rowdata", columnID="gene_ID")

## Count matrix
countmatrixPath <- system.file("extdata/countMatrix.tsv", package="conclus")
countMatrix <- loadDataOrMatrix(file=countmatrixPath, type="countMatrix",
                                ignoreCellNumber=TRUE)



ilyessr/conclus documentation built on April 8, 2022, 1:43 p.m.