def __init__(self, chrom=None, start=None, end=None, name=None, score=None, strand=None, thickStart=None, thickEnd=None, itemRgb=None, blockCount=None, blockSizes=None, blockStarts=None): """ """ Region.__init__(self, start, end, strand, chrom, name) self.score = score self.thickStart = thickStart self.thickEnd = thickEnd self.itemRgb = itemRgb self.blockCount = blockCount self.blockSizes = blockSizes self.blockStarts = blockStarts
def __init__(self, chrom=None, start=None, end=None, name=None, score=None, strand=None, thickStart=None, thickEnd=None, itemRgb=None, blockCount=None, blockSizes=None, blockStarts=None): """ Build and return an instance of BEDRecord. :param chrom: The name of the chromosome on which the annotation has been defined. :type chrom: str :param start: The start position on the reference. This position is 1-based and ascending (start <= end). :type start: int :param end: The end position on the reference. This position is 1-based and ascending (start <= end). [Default: start] :type end: int :param name: The name of the annotation. :type name: str :param score: A score between 0 and 1000 :type score: int :param strand: The strand of the annotation ("+" or "-"). :type strand: str :param thickStart: The starting position at which the feature is drawn thickly (for example, the start codon in gene displays). This position is 1-based and ascending (start <= end). :type thickStart: int :param thickEnd: The ending position at which the feature is drawn thickly (for example the stop codon in gene displays). This position is 1-based and ascending (start <= end). :type thickEnd: int :param itemRgb: An RGB value of the form R,G,B (e.g. 255,0,0). :type itemRgb: list :param blockCount: The number of blocks (exons) in the BED line. :type blockCount: int :param blockSizes: list of the block sizes :type blockSizes: list :param blockStarts: list of block starts. All of the blockStart positions should be calculated relative to chromStart. :type blockStarts: list :return: The new instance. :rtype: BEDRecord """ Region.__init__(self, start, end, strand, chrom, name) self.score = score self.thickStart = thickStart self.thickEnd = thickEnd self.itemRgb = itemRgb self.blockCount = blockCount self.blockSizes = blockSizes self.blockStarts = blockStarts
def __init__(self, seq_id=None, source=None, type=None, start=None, end=None, score=None, strand=None, phase=None, attributes=None): """ Build and return an instance of GFF3Record. :param seq_id: The ID of the landmark used to establish the coordinate system for the current feature. :type seq_id: str. :param source: The source is a free text qualifier intended to describe the algorithm or operating procedure that generated this feature. Typically this is the name of a piece of software, such as "Genescan" or a database name, such as "Genbank." In effect, the source is used to extend the feature ontology by adding a qualifier to the type creating a new composite type that is a subclass of the type in the type column. :type source: str. :param type: The type of the feature (previously called the "method"). This is constrained to be either: (a) a term from the "lite" sequence ontology, SOFA; or (b) a SOFA accession number. The latter alternative is distinguished using the syntax SO:000000. :type type: str. :param start: The start of the feature, in 1-based integer coordinates, relative to the landmark given in seq_id. Start is always less than or equal to end. :type start: int. :param end: The end of the feature, in 1-based integer coordinates, relative to the landmark given in seq_id. Start is always less than or equal to end. :type end: int. :param score: The score of the feature. As in earlier versions of the format, the semantics of the score are ill-defined. It is strongly recommended that E-values be used for sequence similarity features, and that P-values be used for ab initio gene prediction features. :type score: float. :param strand: The strand of the instance ("+" or "-"). :type strand: str. :param phase: For features of type "CDS", the phase indicates where the feature begins with reference to the reading frame. The phase is one of the integers 0, 1, or 2, indicating the number of bases that should be removed from the beginning of this feature to reach the first base of the next codon. In other words, a phase of "0" indicates that the next codon begins at the first base of the region described by the current line, a phase of "1" indicates that the next codon begins at the second base of this region, and a phase of "2" indicates that the codon begins at the third base of this region. This is NOT to be confused with the frame, which is simply start modulo 3. For forward strand features, phase is counted from the start field. For reverse strand features, phase is counted from the end field. :type phase: int. :param attributes: The annotations of the feature. :type attributes: dict. :return: The new instance. :rtype: GFF3Record """ name = None cleaned_attributes = attributes if attributes is not None and "Name" in attributes: name = attributes["Name"] cleaned_attributes = copy.deepcopy(attributes) del (cleaned_attributes["Name"]) Region.__init__(self, start, end, strand, seq_id, name, cleaned_attributes) self.source = source self.type = type self.score = score self.phase = phase