Skip to content

Module epijinn.dnd

View Source
# Copyright 2024 Edinburgh Genome Foundry, University of Edinburgh

#

# This file is part of EpiJinn.

#

# EpiJinn is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

#

# EpiJinn is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

#

# You should have received a copy of the GNU General Public License along with Ediacara. If not, see <https://www.gnu.org/licenses/>.

from .Methyl import Methylase

class Dnd(Methylase):

    pass

Dnd_EcoB7A = Dnd("Dnd_EcoB7A", "GAAC", 0, 3)

Dnd_Sli1326 = Dnd("Dnd_Sli1326", "GGCC", 0, 3)

Dnd_VciFF75 = Dnd("Dnd_VciFF75", "CCA", 0, 2)

DND = [Dnd_EcoB7A, Dnd_Sli1326, Dnd_VciFF75]

Variables

DND
Dnd_EcoB7A
Dnd_Sli1326
Dnd_VciFF75

Classes

Dnd

class Dnd(
    name,
    sequence,
    index_pos,
    index_neg
)

Methylase enzyme class.

Parameters

name

Name of the enzyme (str).

sequence

Sequence of extended nucleotide characters (str).

index_pos

Index of the methylated base on the positive strand (int).

index_neg

Index of the methylated base on the negative strand (int).

View Source
class Dnd(Methylase):

    pass

Ancestors (in MRO)

  • epijinn.Methyl.Methylase

Class variables

complement_table

Static methods

complement

def complement(
    sequence
)
View Source
    @staticmethod

    def complement(sequence):

        complement_letters = [Methylase.complement_table[letter] for letter in sequence]

        complement = "".join(complement_letters)

        return complement

reverse

def reverse(
    sequence
)
View Source
    @staticmethod

    def reverse(sequence):

        reverse = sequence[::-1]

        return reverse

reverse_complement

def reverse_complement(
    sequence
)
View Source
    @staticmethod

    def reverse_complement(sequence):

        r = Methylase.reverse(sequence)

        rc = Methylase.complement(r)

        return rc