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

velocyto.logic.Default

alias of velocyto.logic.Permissive10X

class velocyto.logic.Discordant10X → None[source]

Bases: velocyto.logic.Logic

Just a test

accept_discordant
count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: typing.Dict[str, numpy.ndarray], geneid2ix: typing.Dict[str, int]) → None[source]
layers
perform_validation_markup
stranded
class velocyto.logic.Intermediate10X → None[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

accept_discordant
count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: typing.Dict[str, numpy.ndarray], geneid2ix: typing.Dict[str, int]) → None[source]
layers
perform_validation_markup
stranded
class velocyto.logic.Logic → None[source]

Bases: object

Base class from wich all the logics should inherit

accept_discordant
count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: typing.Dict[str, numpy.ndarray], geneid2ix: typing.Dict[str, int]) → typing.Union[NoneType, 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 logic
  • cell_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)

layers
perform_validation_markup
stranded
class velocyto.logic.ObservedSpanning10X → None[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

accept_discordant
count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: typing.Dict[str, numpy.ndarray], geneid2ix: typing.Dict[str, int]) → None[source]
layers
perform_validation_markup
stranded
class velocyto.logic.Permissive10X → None[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

accept_discordant
count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: typing.Dict[str, numpy.ndarray], geneid2ix: typing.Dict[str, int]) → int[source]
layers
perform_validation_markup
stranded
class velocyto.logic.SmartSeq2 → None[source]

Bases: velocyto.logic.Logic

SmartSeq2 logic

accept_discordant
count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: typing.Dict[str, numpy.ndarray], geneid2ix: typing.Dict[str, int]) → None[source]
layers
perform_validation_markup
stranded
class velocyto.logic.Stricter10X → None[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

count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: typing.Dict[str, numpy.ndarray], geneid2ix: typing.Dict[str, int]) → None[source]
layers
perform_validation_markup
stranded
class velocyto.logic.ValidatedIntrons10X → None[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

accept_discordant
count(molitem: velocyto.molitem.Molitem, cell_bcidx: int, dict_layers_columns: typing.Dict[str, numpy.ndarray], geneid2ix: typing.Dict[str, int]) → None[source]
layers
perform_validation_markup
stranded