969c31e8e32bedbaa65f82222cff07e068553bc3,cnvlib/core.py,,sorter_chrom,#Any#,43

Before Change


    
    chrom = (label[3:] if label.lower().startswith("chr")
             else label)
    return (chr(int(chrom)) if chrom.isdigit()
            else chrom)


def sorter_chrom_at(index):
    Create a sort key function that gets chromosome label at a list index.

After Change


    else:
        // Separate numeric and special chromosomes
        nums = "".join(takewhile(str.isdigit, chrom))
        chars = chrom[len(nums):]
        nums = int(nums) if nums else 0
        if not chars:
            key = (nums, "")
        elif len(chars) == 1:
            key = (2000 + nums, chars)
        else:
            key = (3000 + nums, chars)
    return key


def sorter_chrom_at(index):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: etal/cnvkit
Commit Name: 969c31e8e32bedbaa65f82222cff07e068553bc3
Time: 2015-07-06
Author: eric.talevich@gmail.com
File Name: cnvlib/core.py
Class Name:
Method Name: sorter_chrom


Project Name: quiltdata/quilt
Commit Name: 49c8ea8ae46c2eb5a4de5948ccbbd3aef9da088e
Time: 2018-04-17
Author: aeon.descriptor@gmail.com
File Name: compiler/quilt/tools/util.py
Class Name:
Method Name: to_nodename


Project Name: facebookresearch/pytext
Commit Name: 9f2c085d688ebc0e26f00a3ddd5d7b301ce2ff0f
Time: 2019-06-05
Author: zsc@fb.com
File Name: pytext/utils/data.py
Class Name:
Method Name: unkify