@staticmethod
    def from_line(line):
        line = line.rstrip()
        fields = line.split('\t')
        contig, start, stop = fields[0], int(fields[1]), int(fields[2])

        n = len(fields)

        name        = fields[3] or None if n >= 4 else None
        score       = fields[4] or None if n >= 5 else None
        strand      = fields[5] or None if n >= 6 else None
        thick_start = fields[6] or None if n >= 7 else None
        thick_end   = fields[7] or None if n >= 8 else None
        item_rgb    = fields[8] or None if n >= 9 else None

        return BedRecord(contig, start, stop, name, score, strand, thick_start, thick_end, item_rgb)
dataset/ETHPy150Open bioinformed/vgraph/vgraph/bed.py/BedRecord.from_line/original