CLI Logic¶
The following page describes the API of the logic module.
Warning
The logic module has been introduced as an experimetal feature in version 0.12.0, we forecast that its API and design will chnge considerably in future varsions.
The logic module offers the possibility to easily change the logic used to count “spliced”, “unspliced”, “ambiguous” (and other categories) of molecules, without requiring a complete rewrite of the all pipeline. This might be desired to adapt velocyto to different technologies or to introduce new rules and heuristics to make the counting more accurate or sensitive.
velocyto.logic module¶
- class velocyto.logic.Logic[source]¶
Bases:
object
Base class from wich all the logics should inherit
- property layers: List[str]¶
- property stranded: bool¶
- property perform_validation_markup: bool¶
- property accept_discordant: bool¶
- abstract count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: Dict[str, numpy.ndarray], geneid2ix: Dict[str, int]) → Union[None, int][source]¶
This methods will have to countain the core operations of the logic to attribute a molecule to one of the cathergories
- Parameters
molitem (vcy.Molitem) – The
vcy.Molitem
object to be considered by the logiccell_bcidx (int) – The cell index in the memory buffers below
dict_layers_columns (Dict[str, np.ndarray]) – A dictionary mapping the name of a layer with the memory buffer that will be saved in the loom file after counting
geneid2ix (Dict[str, int]) – Dictionary containing the Acession of the genes mapping to its column index position
- Returns
- Return type
Nothing but it adds the molecule to the appropriate layer (or does not count at all)
- class velocyto.logic.Permissive10X[source]¶
Bases:
velocyto.logic.Logic
Permissive logic for 10X Genomics chemistry
This logic differs from the other 10x Logics because: - singletons if the fall in not validated introns are COUNTED UNSPLICED - singletons if the fall in validated introns are COUNTED UNSPLICED - non-singletons if are supported by not validated introns are COUNTED UNSPLICED - non-singletons if are supported by validated introns are COUNTED UNSPLICED
- property layers: List[str]¶
- property stranded: bool¶
- property perform_validation_markup: bool¶
- property accept_discordant: bool¶
- count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: Dict[str, numpy.ndarray], geneid2ix: Dict[str, int]) → int[source]¶
This methods will have to countain the core operations of the logic to attribute a molecule to one of the cathergories
- Parameters
molitem (vcy.Molitem) – The
vcy.Molitem
object to be considered by the logiccell_bcidx (int) – The cell index in the memory buffers below
dict_layers_columns (Dict[str, np.ndarray]) – A dictionary mapping the name of a layer with the memory buffer that will be saved in the loom file after counting
geneid2ix (Dict[str, int]) – Dictionary containing the Acession of the genes mapping to its column index position
- Returns
- Return type
Nothing but it adds the molecule to the appropriate layer (or does not count at all)
- class velocyto.logic.Intermediate10X[source]¶
Bases:
velocyto.logic.Logic
ValidatedIntrons logic for 10X Genomics chemistry
This differs from the other 10x Logics because: - singletons if the fall in not validated introns are DISCARDED - singletons if the fall in validated introns are COUNTED UNSPLICED - non-singletons if are supported by not validated introns are COUNTED UNSPLICED - non-singletons if are supported by validated introns are COUNTED UNSPLICED
- property layers: List[str]¶
- property stranded: bool¶
- property perform_validation_markup: bool¶
- property accept_discordant: bool¶
- count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: Dict[str, numpy.ndarray], geneid2ix: Dict[str, int]) → None[source]¶
This methods will have to countain the core operations of the logic to attribute a molecule to one of the cathergories
- Parameters
molitem (vcy.Molitem) – The
vcy.Molitem
object to be considered by the logiccell_bcidx (int) – The cell index in the memory buffers below
dict_layers_columns (Dict[str, np.ndarray]) – A dictionary mapping the name of a layer with the memory buffer that will be saved in the loom file after counting
geneid2ix (Dict[str, int]) – Dictionary containing the Acession of the genes mapping to its column index position
- Returns
- Return type
Nothing but it adds the molecule to the appropriate layer (or does not count at all)
- class velocyto.logic.ValidatedIntrons10X[source]¶
Bases:
velocyto.logic.Logic
ValidatedIntrons logic for 10X Genomics chemistry
This differs from the other 10x Logics because: - singletons if the fall in not validated introns are DISCARDED - singletons if the fall in validated introns are COUNTED UNSPLICED - non-singletons if are supported by not validated introns are DISCARDED - non-singletons if are supported by validated introns are COUNTED UNSPLICED
- property layers: List[str]¶
- property stranded: bool¶
- property perform_validation_markup: bool¶
- property accept_discordant: bool¶
- count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: Dict[str, numpy.ndarray], geneid2ix: Dict[str, int]) → None[source]¶
This methods will have to countain the core operations of the logic to attribute a molecule to one of the cathergories
- Parameters
molitem (vcy.Molitem) – The
vcy.Molitem
object to be considered by the logiccell_bcidx (int) – The cell index in the memory buffers below
dict_layers_columns (Dict[str, np.ndarray]) – A dictionary mapping the name of a layer with the memory buffer that will be saved in the loom file after counting
geneid2ix (Dict[str, int]) – Dictionary containing the Acession of the genes mapping to its column index position
- Returns
- Return type
Nothing but it adds the molecule to the appropriate layer (or does not count at all)
- class velocyto.logic.Stricter10X[source]¶
Bases:
velocyto.logic.Logic
Stricter logic for 10X Genomics chemistry
This differ from the other 10x Logics because: - singletons if the fall in not validated introns are DISCARDED - singletons if the fall in validated introns are DISCARDED - non-singletons if are supported by not validated introns are DISCARDED - non-singletons if are supported by validated introns are COUNTED UNSPLICED
- property layers: List[str]¶
- property stranded: bool¶
- property perform_validation_markup: bool¶
- count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: Dict[str, numpy.ndarray], geneid2ix: Dict[str, int]) → None[source]¶
This methods will have to countain the core operations of the logic to attribute a molecule to one of the cathergories
- Parameters
molitem (vcy.Molitem) – The
vcy.Molitem
object to be considered by the logiccell_bcidx (int) – The cell index in the memory buffers below
dict_layers_columns (Dict[str, np.ndarray]) – A dictionary mapping the name of a layer with the memory buffer that will be saved in the loom file after counting
geneid2ix (Dict[str, int]) – Dictionary containing the Acession of the genes mapping to its column index position
- Returns
- Return type
Nothing but it adds the molecule to the appropriate layer (or does not count at all)
- class velocyto.logic.ObservedSpanning10X[source]¶
Bases:
velocyto.logic.Logic
ObservedSpanning10X logic for 10X Genomics chemistry
This differ from the other 10x Logics because: - singletons if the fall in not validated introns are DISCARDED - singletons if the fall in validated introns are DISCARDED - non-singletons if are supported by not validated introns are DISCARDED - non-singletons if are supported by validated introns are DISCARDED - Therefore only the observed intron spanning reads are counted as UNSPLICED
- property layers: List[str]¶
- property stranded: bool¶
- property perform_validation_markup: bool¶
- property accept_discordant: bool¶
- count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: Dict[str, numpy.ndarray], geneid2ix: Dict[str, int]) → None[source]¶
This methods will have to countain the core operations of the logic to attribute a molecule to one of the cathergories
- Parameters
molitem (vcy.Molitem) – The
vcy.Molitem
object to be considered by the logiccell_bcidx (int) – The cell index in the memory buffers below
dict_layers_columns (Dict[str, np.ndarray]) – A dictionary mapping the name of a layer with the memory buffer that will be saved in the loom file after counting
geneid2ix (Dict[str, int]) – Dictionary containing the Acession of the genes mapping to its column index position
- Returns
- Return type
Nothing but it adds the molecule to the appropriate layer (or does not count at all)
- class velocyto.logic.Discordant10X[source]¶
Bases:
velocyto.logic.Logic
Just a test
- property layers: List[str]¶
- property stranded: bool¶
- property perform_validation_markup: bool¶
- property accept_discordant: bool¶
- count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: Dict[str, numpy.ndarray], geneid2ix: Dict[str, int]) → None[source]¶
This methods will have to countain the core operations of the logic to attribute a molecule to one of the cathergories
- Parameters
molitem (vcy.Molitem) – The
vcy.Molitem
object to be considered by the logiccell_bcidx (int) – The cell index in the memory buffers below
dict_layers_columns (Dict[str, np.ndarray]) – A dictionary mapping the name of a layer with the memory buffer that will be saved in the loom file after counting
geneid2ix (Dict[str, int]) – Dictionary containing the Acession of the genes mapping to its column index position
- Returns
- Return type
Nothing but it adds the molecule to the appropriate layer (or does not count at all)
- class velocyto.logic.SmartSeq2[source]¶
Bases:
velocyto.logic.Logic
SmartSeq2 logic
- property layers: List[str]¶
- property stranded: bool¶
- property perform_validation_markup: bool¶
- property accept_discordant: bool¶
- count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: Dict[str, numpy.ndarray], geneid2ix: Dict[str, int]) → None[source]¶
This methods will have to countain the core operations of the logic to attribute a molecule to one of the cathergories
- Parameters
molitem (vcy.Molitem) – The
vcy.Molitem
object to be considered by the logiccell_bcidx (int) – The cell index in the memory buffers below
dict_layers_columns (Dict[str, np.ndarray]) – A dictionary mapping the name of a layer with the memory buffer that will be saved in the loom file after counting
geneid2ix (Dict[str, int]) – Dictionary containing the Acession of the genes mapping to its column index position
- Returns
- Return type
Nothing but it adds the molecule to the appropriate layer (or does not count at all)
- velocyto.logic.Default¶
alias of
velocyto.logic.Permissive10X