pegasusio/unimodal_data.py
def separate_channels(self) -> None:
        """ Separate channel information from barcodekeys, used for 10x v2, v3 h5 and mtx as well as Optimus loom.
        """
        if self.barcode_metadata.shape[0] == 0 or self.barcode_metadata.index[0].find("-") < 0:
            return None # no data or no dash to remove

        try:
            from pegasusio.cylib.funcs import split_barcode_channel
        except ModuleNotFoundError:
            print("No module named 'pegasusio.cylib.funcs'")

        barcodes, channels = split_barcode_channel(self.barcode_metadata.index.values)

        if np.unique(channels).size > 1:
            # we have multiple channels
            self.barcode_metadata["Channel"] = channels
            barcodes = np.array([x + "-" + y for x, y in zip(channels, barcodes)], dtype = object)

        self.barcode_metadata.index = pd.Index(barcodes, name="barcodekey")
 Separate channel information from barcodekeys, used for 10x v2, v3 h5 and mtx as well as Optimus loom.
        
Separate channel information from barcodekeys, used for 10x v2, v3 h5 and mtx as well as Optimus loom.
Separate channel information from barcodekeys used for 10x v2 v3 h5 and mtx as well as Optimus loom .
def separate_channels(self) -> None:
        if self.barcode_metadata.shape[0] == 0 or self.barcode_metadata.index[0].find("-") < 0:
            return None 
        try:
            from pegasusio.cylib.funcs import split_barcode_channel
        except ModuleNotFoundError:
            print("No module named 'pegasusio.cylib.funcs'")
        barcodes, channels = split_barcode_channel(self.barcode_metadata.index.values)
        if np.unique(channels).size > 1:
            self.barcode_metadata["Channel"] = channels
            barcodes = np.array([x + "-" + y for x, y in zip(channels, barcodes)], dtype = object)
        self.barcode_metadata.index = pd.Index(barcodes, name="barcodekey")
def separate_channels ( self ) -> None : if self . barcode_metadata . shape [ 0 ] == 0 or self . barcode_metadata . index [ 0 ] . find ( "-" ) < 0 : return None try : from pegasusio . cylib . funcs import split_barcode_channel except ModuleNotFoundError : print ( "No module named 'pegasusio.cylib.funcs'" ) barcodes , channels = split_barcode_channel ( self . barcode_metadata . index . values ) if np . unique ( channels ) . size > 1 : self . barcode_metadata [ "Channel" ] = channels barcodes = np . array ( [ x + "-" + y for x , y in zip ( channels , barcodes ) ] , dtype = object ) self . barcode_metadata . index = pd . Index ( barcodes , name = "barcodekey" )
Separate channel information from barcodekeys, used for 10x v2, v3 h5 and mtx as well as Optimus loom.
Separate channel information from barcodekeys used for 10x v2 v3 h5 and mtx as well as Optimus loom .
""" Separate channel information from barcodekeys, used for 10x v2, v3 h5 and mtx as well as Optimus loom.
        """ # no data or no dash to remove # we have multiple channels
self