pegasusio/unimodal_data.py
def add_matrix(self, key: str, mat: csr_matrix) -> None:
        """ Add a new matrix, can be raw count or others
        """
        if key in self.matrices:
            raise ValueError(f"Matrix key '{key}' already exists!")
        if mat.shape[0] != self._shape[0]:
            raise ValueError(f"Wrong number of barcodes: matrix '{key}' has {mat.shape[0]} barcodes, which does not match with the barcode file ({self._shape[0]})!")
        if mat.shape[1] != self._shape[1]:
            raise ValueError(f"Wrong number of features: matrix '{key}' has {mat.shape[1]} features, which does not match with the feature file ({self._shape[1]})!")

        self.matrices[key] = mat
 Add a new matrix, can be raw count or others
        
Add a new matrix, can be raw count or others
Add a new matrix can be raw count or others
def add_matrix(self, key: str, mat: csr_matrix) -> None:
        if key in self.matrices:
            raise ValueError(f"Matrix key '{key}' already exists!")
        if mat.shape[0] != self._shape[0]:
            raise ValueError(f"Wrong number of barcodes: matrix '{key}' has {mat.shape[0]} barcodes, which does not match with the barcode file ({self._shape[0]})!")
        if mat.shape[1] != self._shape[1]:
            raise ValueError(f"Wrong number of features: matrix '{key}' has {mat.shape[1]} features, which does not match with the feature file ({self._shape[1]})!")
        self.matrices[key] = mat
def add_matrix ( self , key : str , mat : csr_matrix ) -> None : if key in self . matrices : raise ValueError ( f"Matrix key '{key}' already exists!" ) if mat . shape [ 0 ] != self . _shape [ 0 ] : raise ValueError ( f"Wrong number of barcodes: matrix '{key}' has {mat.shape[0]} barcodes, which does not match with the barcode file ({self._shape[0]})!" ) if mat . shape [ 1 ] != self . _shape [ 1 ] : raise ValueError ( f"Wrong number of features: matrix '{key}' has {mat.shape[1]} features, which does not match with the feature file ({self._shape[1]})!" ) self . matrices [ key ] = mat
Add a new matrix, can be raw count or others
Add a new matrix can be raw count or others
""" Add a new matrix, can be raw count or others
        """
self
key
str
mat
csr_matrix