def digital_peaks_cut_prop_lagged(self): """Apply the cutoff and recalculate the proportions.""" digital_peaks_counts = [l >= self.min_frag_size and self.peaks[l].total_fragments or 0 for l in sorted(self.peaks)] total_counts = sum(digital_peaks_counts) proporitions = [100 * x / total_counts for x in digital_peaks_counts] return shift_list(proporitions, self.lag)
def digital_peaks_prop_lagged(self): """Same thing, but shifted.""" if not self.wetlab_profile: return None return shift_list(self.digital_peaks_prop, self.lag)