03cd68309bcb94d8bd760621998cfc851a683fac,cnvlib/segfilters.py,,ampdel,#Any#,31

Before Change


    actionable, usually focal, CNAs. Real and potentially informative but
    lower-level CNAs will be merged together.
    
    return segarr


@require_column("depth")
def bic(segarr):

After Change


    actionable, usually focal, CNAs. Real and potentially informative but
    lower-level CNAs will be merged together.
    
    levels = pd.Series(np.zeros(len(segarr)))
    levels[segarr["cn"] == 0] = -1
    levels[segarr["cn"] >= 5] = 1
    // or: segarr["log2"] >= np.log2(2.5)
    // TODO - handle a/b allele amplifications separately
    //   i.e. don"t merge amplified segments if cn1, cn2 are not the same

    groups = levels.diff().fillna(0).abs().cumsum().astype(int)
    groups += enumerate_chroms(segarr["chromosome"])

    squashed = (segarr.data.assign(group=groups)
                .groupby("group", as_index=False, group_keys=False, sort=False)
                .apply(squash_region))
    return segarr.as_dataframe(squashed)


@require_column("depth")
def bic(segarr):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: etal/cnvkit
Commit Name: 03cd68309bcb94d8bd760621998cfc851a683fac
Time: 2016-09-01
Author: eric.talevich@gmail.com
File Name: cnvlib/segfilters.py
Class Name:
Method Name: ampdel


Project Name: instacart/lore
Commit Name: b305569ef7f192b237559a527cd2a9f82901c59d
Time: 2018-04-02
Author: montana@instacart.com
File Name: lore/transformers.py
Class Name: LogPlusOne
Method Name: transform


Project Name: nilmtk/nilmtk
Commit Name: 2c16357cf3b2a5b1265caf7d89703ef253e39df3
Time: 2014-01-07
Author: jack-list@xlk.org.uk
File Name: nilmtk/stats/electricity/single.py
Class Name:
Method Name: missing_samples_per_period