funki.input¶
- class funki.input.DataSet(X=None, **kwargs)¶
Data set class, inherits from anndata.AnnData class.
- Parameters:
X (anndata.AnnData, optional) – An instance of anndata.AnnData or any other class accepted by anndata.AnnData, defaults to
None
.**kwargs (optional) – Other keyword arguments that can be passed to anndata.AnnData class.
- copy()¶
Creates a copy of the current
DataSet
instance.- Returns:
The copy of the current object
- Return type:
- load_params(path)¶
Loads the analysis parameters from a JSON file.
- Parameters:
path (str) – Path where the parameters file is stored.
- save_params(path='funki_params.json')¶
Saves the analysis parameters into a JSON file.
- Parameters:
path (str) – Destination path for the parameters file. Optional, defaults to
'funki_params.json'
.
- sum_duplicated_gene_counts()¶
Takes duplicated genes (as defined in
DataSet.var_names
) and sums their counts. NOTE: This should be applied to raw counts, prior to any normalization or preprocessing as is it assumed that e.g. different splicing variants of the same gene can be added towards the counts of the same gene (e.g. gene symbol, UniProt ID, etc.).
- funki.input.read(path, *args, **kwargs)¶
Function takes a path to a file and uses the appropiate anndata reading function according to the file extension provided in
path
. You can find further information on the available formats in the anndata reading documentation. If file extension not recognized, it defaults to anndata.read_text.- Parameters:
path (str) – Path to the data file.
*args (optional) – Other positional arguments that can be required by the reading function, according to the data file format.
**kwargs (optional) – Other keyword arguments that can be required by the reading function, according to the data file format.
- Returns:
The loaded data set object
- Return type: