cd1e79131c5d7c774b27ab9a78d24c8145bc42be,cnvlib/commands.py,,do_heatmap,#Any#Any#Any#,1141

Before Change


    for row in sample_data:
        for chrom, data in iteritems(row):
            if data:
                max_posn = max(coord[1] for coord in data)
                chrom_sizes[chrom] = max(max_posn, chrom_sizes.get(chrom, 0))
            else:
                chrom_sizes[chrom] = chrom_sizes.get(chrom, 0)
    chrom_sizes = collections.OrderedDict(sorted(iteritems(chrom_sizes),

After Change


    for row in sample_data:
        for chrom, data in iteritems(row):
            if len(data):
                max_posn = data.end.max() // max(coord[1] for coord in data)
                chrom_sizes[chrom] = max(max_posn, chrom_sizes.get(chrom, 0))
            else:
                chrom_sizes[chrom] = chrom_sizes.get(chrom, 0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: etal/cnvkit
Commit Name: cd1e79131c5d7c774b27ab9a78d24c8145bc42be
Time: 2016-02-09
Author: eric.talevich@gmail.com
File Name: cnvlib/commands.py
Class Name:
Method Name: do_heatmap


Project Name: facebookresearch/ParlAI
Commit Name: b77ef88c824c285290671632d81ea240cf261e78
Time: 2018-01-31
Author: edinan@fb.com
File Name: parlai/core/utils.py
Class Name: PaddingUtils
Method Name: pad_text


Project Name: etal/cnvkit
Commit Name: 29db4abdbeb839340ac5b0caf934ebda93892934
Time: 2017-02-24
Author: eric.talevich@gmail.com
File Name: scripts/coverage_bin_size.py
Class Name:
Method Name: print_table