swiftcnv.load_output

Contents

swiftcnv.load_output#

load_output(output_dir, adata=None, **kwargs)#

Load the outputs of SwiftCNV written in a directory.

Parameters:
  • output_dir (str) – Path to the SwiftCNV output files containing the matrix, genes and annotations.

  • adata (anndata.AnnData) – If defined, the outputs will be added to the AnnData object via add_mat_to_adata().

  • **kwargs (Additional kwargs are passed to add_mat_to_adata().)

Returns:

  • If adata is None, returns a tuple of (cnv_matrix, cell_order and gene_order),

where cnv_matrix is a numpy.ndarray and cell_order and gene_order are pandas.DataFrame. * If adata is defined and inplace=True, returns the updated copy of adata. If inplace=False, updates adata returns None.

Return type:

tuple[numpy.ndarray, pandas.DataFrame, pandas.DataFrame] or anndata.AnnData or None