c034a486630d90544beb2f42cc05e796e2973138,cnvlib/fix.py,,match_ref_to_probes,#Any#Any#,58

Before Change


        raise ValueError("Reference is missing %d bins found in %s"
                         % (len(missing_keys), probes.sample_id))

    ref_lookup = dict(zip(ref_labels, ref_pset))
    ref_matched_rows = [ref_lookup[label] for label in probe_labels]
    ref_matched = ref_pset.as_rows(ref_matched_rows)
    return ref_matched

After Change


    ref_labeled = ref_pset.data.set_index(ref_pset.labels())
    ref_matched = ref_labeled.reindex(index=probes_labeled.index)
    // Check for signs that the wrong reference was used
    num_missing = pd.isnull(ref_matched.start).sum()
    if num_missing > 0:
        raise ValueError("Reference is missing %d bins found in %s"
                         % (len(num_missing), probes.sample_id))
    return ref_pset.as_dataframe(ref_matched.reset_index(drop=True))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: etal/cnvkit
Commit Name: c034a486630d90544beb2f42cc05e796e2973138
Time: 2015-06-17
Author: eric.talevich@gmail.com
File Name: cnvlib/fix.py
Class Name:
Method Name: match_ref_to_probes


Project Name: DistrictDataLabs/yellowbrick
Commit Name: b3256666df69e645159c8ef91fb3e4bfd826b8de
Time: 2018-06-05
Author: lwgray@gmail.com
File Name: yellowbrick/classifier/classification_report.py
Class Name: ClassificationReport
Method Name: score


Project Name: rodluger/starry
Commit Name: 099e35f9db7e3098d8a88b99a9f5460b52bab2fc
Time: 2019-05-01
Author: rodluger@gmail.com
File Name: tests/test_theano.py
Class Name:
Method Name: test_limb_darkened