예제 #1
0
    def __init__(
            self,
            gtf_file,
            fasta_file,
            side='5prime',  # 5prime/3prime
            target_file=None,
            MISO_AS=False,
            label_col='event_name'):
        self.genes = loadgene(gtf_file)
        self.fasta_file = fasta_file
        self.fasta = None  # open the file later

        if side in ["5prime", "3prime"]:
            self.side = side
        else:
            raise Exception("side should be 5prime or 3prime")
        if self.side == "5prime":
            self.overhang_l = 3
            self.overhang_r = 6
        else:
            self.overhang_l = 3
            self.overhang_r = 20
        if target_file is not None:
            self.Y = Target(target_file, label_col)
        else:
            self.Y = None

        self.MISO_AS = MISO_AS
        if not MISO_AS:
            self.spliceSites = self.get_spliceSites()

        self._name = None
        self._species = None
예제 #2
0
 def __init__(self,
              gtf_file,
              fasta_file,
              overhang=80,
              MISO_AS=False):  # intron + ~ bp exon from both side
     self.genes = loadgene(gtf_file)
     self.fasta = FastaFile(fasta_file)
     self.overhang = overhang
     self.MISO_AS = MISO_AS
     if not MISO_AS:
         self.spliceSites = self.get_spliceSites()
     self._name = None
     self._species = None
예제 #3
0
 def __init__(self, gtf_file, fasta_file, length=70):
     self.genes = loadgene(gtf_file)
     self.fasta = FastaFile(fasta_file)
     self.length = length
     self.branches = self.get_branches()