def copy(self, other):
        """fill from other entry.

        This method works if other is :class:`GTF.Entry` or
        :class:`pysam.GTFProxy`.
        """
        self.contig = other.contig
        self.source = other.source
        self.feature = other.feature
        self.start = other.start
        self.end = other.end
        self.score = other.score
        self.strand = other.strand
        self.frame = other.frame
        # gene_id and transcript_id can be optional
        try:
            self.gene_id = other.gene_id
        except AttributeError:
            pass
        try:
            self.transcript_id = other.transcript_id
        except AttributeError:
            pass

        self.attributes = copy.copy(other.asDict())
        # from gff - remove gene_id and transcript_id from attributes
        try:
            del self.attributes["gene_id"]
            del self.attributes["transcript_id"]
        except __HOLE__:
            pass

        return self
dataset/ETHPy150Open CGATOxford/cgat/CGAT/GTF.py/Entry.copy