A method of using a sequencing cell, the method comprising: - obtaining by a computer system a first set of signal values measured from a nucleic acid over a first time interval for a sequencing cell, wherein the first set of signal values includes measurements for each of four cell states of the sequencing cell, the four cell states corresponding to different types of nucleotides; - creating by the computer system a first histogram of the first set of signal values, the first histogram being a data structure storing a plurality of counts, each count corresponding to a number of signal values within a bin, each bin of the first histogram corresponding to different numerical values; for each cell state of the four cell states: - determining by the computer system a probability function that assigns emission probabilities of being in the cell state to the different numerical values, the probability function determined using the plurality of counts for the bins of the first histogram; - determining by the computer system a transmission matrix providing pairwise transition probabilities between four nucleotide states of the nucleic acid, the four nucleotide states corresponding to the different types of nucleotides; - creating by the computer system a trellis diagram over T time steps, each time step corresponding to one signal value of the first set of signal values, wherein the trellis diagram at a given time step includes the four nucleotide states, each having an emission probability determined using a probability function of a corresponding cell state, and wherein nucleotide states at one time step are connected to nucleotide states at a next time step in accordance with the pairwise transition probabilities; - determining by the computer system an optimal path through the trellis diagram based on the emission probabilities and the pairwise transition probabilities to identify a nucleotide state at each time step; - determining by the computer system bases comprising a sequence of the nucleic acid using the nucleotide states at the T time steps; and - providing the sequence of the nucleic acid. - obtaining by a computer system a first set of signal values measured from a nucleic acid over a first time interval for a sequencing cell, wherein the first set of signal values includes measurements for each of four cell states of the sequencing cell, the four cell states corresponding to different types of nucleotides; - creating by the computer system a first histogram of the first set of signal values, the first histogram being a data structure storing a plurality of counts, each count corresponding to a number of signal values within a bin, each bin of the first histogram corresponding to different numerical values; - determining by the computer system a probability function that assigns emission probabilities of being in the cell state to the different numerical values, the probability function determined using the plurality of counts for the bins of the first histogram; - determining by the computer system a transmission matrix providing pairwise transition probabilities between four nucleotide states of the nucleic acid, the four nucleotide states corresponding to the different types of nucleotides; - creating by the computer system a trellis diagram over T time steps, each time step corresponding to one signal value of the first set of signal values, wherein the trellis diagram at a given time step includes the four nucleotide states, each having an emission probability determined using a probability function of a corresponding cell state, and wherein nucleotide states at one time step are connected to nucleotide states at a next time step in accordance with the pairwise transition probabilities; - determining by the computer system an optimal path through the trellis diagram based on the emission probabilities and the pairwise transition probabilities to identify a nucleotide state at each time step; - determining by the computer system bases comprising a sequence of the nucleic acid using the nucleotide states at the T time steps; and - providing the sequence of the nucleic acid.