INNER CODE UNIT · Python

introduce_error_scores

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

    def introduce_error_scores(self, record, orientation):
        """Add phred scores to a SeqRecord according to the error_model

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

        Returns:
            SeqRecord: a read record with error scores
        """
        if orientation == "forward":
            record.letter_annotations["phred_quality"] = self.gen_phred_scores(self.quality_forward, "forward")
        elif orientation == "reverse":
            record.letter_annotations["phred_quality"] = self.gen_phred_scores(self.quality_reverse, "reverse")
        return record

    def mut_sequence(self, record, orientation):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…