Exemple #1
0
    def __init__(
        self,
        start,
        end,
        strand="+",
        score=".",
        frame=".",
        fref=None,
        fsource=None,
        fmethod=None,
        attribute_string="",
        gff={},
    ):
        """
        @type  start: number
    	@param start: start coord of Feature in PYTHON COORDINATE (GFF-1)

        @type  end: number
    	@param end: end coord of Feature

        @type  strand: string
    	@param strand: ['+','-','.'] or None, default '+'

        @type  score: float
    	@param score: score of Feature, default "."

        @type  frame: number
    	@param frame: [0,1,2,'.'] or None, default "."

        @type  phase: USE FRAME IN STEAD OF PHASE
    	@param phase: USE FRAME IN STEAD OF PHASE

        @type  fref: string
    	@param fref: default None ('None'), to be set lateron with seqname

        @type  fsource: string
    	@param fsource: default None ('None'), mostly inherited

        @type  fmethod: string
    	@param fmethod: default None ('None'), mostly inherited

        @type  gff: dictionary
    	@param gff: dictionary with (default) gff data. Possible keys are:
                    'fref', 'fmethod', 'fstrand', 'fsource', 'gclass', 'gname'

        @attention: TODO gff dictionary application is not coded yet! 

        """
        if fsource == None:
            fsource = self.__class__.__name__
        if fmethod == None:
            fmethod = self.__class__.__name__

        gfflist = [fref, fsource, fmethod, start, end, score, strand, frame]
        PythonGffFeature.__init__(self, "\t".join([str(elem) for elem in gfflist]))
Exemple #2
0
    def __init__(self,
                 start,
                 end,
                 strand="+",
                 score=".",
                 frame=".",
                 fref=None,
                 fsource=None,
                 fmethod=None,
                 attribute_string="",
                 gff={}):
        """
        @type  start: number
    	@param start: start coord of Feature in PYTHON COORDINATE (GFF-1)

        @type  end: number
    	@param end: end coord of Feature

        @type  strand: string
    	@param strand: ['+','-','.'] or None, default '+'

        @type  score: float
    	@param score: score of Feature, default "."

        @type  frame: number
    	@param frame: [0,1,2,'.'] or None, default "."

        @type  phase: USE FRAME IN STEAD OF PHASE
    	@param phase: USE FRAME IN STEAD OF PHASE

        @type  fref: string
    	@param fref: default None ('None'), to be set lateron with seqname

        @type  fsource: string
    	@param fsource: default None ('None'), mostly inherited

        @type  fmethod: string
    	@param fmethod: default None ('None'), mostly inherited

        @type  gff: dictionary
    	@param gff: dictionary with (default) gff data. Possible keys are:
                    'fref', 'fmethod', 'fstrand', 'fsource', 'gclass', 'gname'

        @attention: TODO gff dictionary application is not coded yet! 

        """
        if fsource == None: fsource = self.__class__.__name__
        if fmethod == None: fmethod = self.__class__.__name__

        gfflist = [fref, fsource, fmethod, start, end, score, strand, frame]
        PythonGffFeature.__init__(self,
                                  "\t".join([str(elem) for elem in gfflist]))
Exemple #3
0
 def togff(self):
     """ Original __str__ function of Pyhtongff.gff.feature.Feature """
     if not self.gclass():
         self.gclass(self.__class__.__name__)
     if not self.gname():
         self.gname(str(self.start() + 1))
     return PythonGffFeature.__str__(self)
Exemple #4
0
 def togff(self):
     """ Original __str__ function of Pyhtongff.gff.feature.Feature """
     if not self.gclass(): self.gclass(self.__class__.__name__)
     if not self.gname(): self.gname(str(self.start() + 1))
     return PythonGffFeature.__str__(self)