Skip to main content

split_count_row

Function split_count_row 

Source
pub fn split_count_row(name: &str) -> Option<(&str, bool)>
Expand description

Split a gene-level count row {gene}/count/{spliced|unspliced} into its gene key and whether it is the nascent (unspliced) track. None when the row is not a gene-level count row at all.

Goes through parse_feature_row rather than matching on /count/ directly, because a bare rsplit_once cannot tell “spliced” apart from “not a count row” — both fall to the same branch. It used to, and the consequence was silent: GENE1/m6a/methylated became a mature gene literally named GENE1/m6a/methylated, and the sub-gene form {gene}/count/{site}/{channel} became a mature row of the right gene.

TOTAL is rejected along with everything else: it already IS spliced + unspliced, so interning it as a third track would count the gene twice. A subunit is rejected because a per-site or per-component row is not a thing that pairs across tracks at gene resolution.