INNER CODE UNIT · Python

mut_sequence

HadrienG/InSilicoSeq · iss/error_models/__init__.py:69

    def mut_sequence(self, record, orientation):
        """Introduce substitution errors to a sequence

        If a random probability is higher than the probability of the basecall
        being correct, introduce a substitution error

        Args:
            record (SeqRecord): a read record with error scores
            orientation (string): orientation of the read. Can be 'forward' or
                'reverse'

        Returns:
            SeqRecord: the read record with substitution errors
        """

        # get the right subst_matrix
        if orientation == "forward":
            nucl_choices = self.subst_choices_for

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…