当前位置: 首页>>代码示例>>Java>>正文


Java DownsampledDoubleArrayList类代码示例

本文整理汇总了Java中org.broad.igv.util.collections.DownsampledDoubleArrayList的典型用法代码示例。如果您正苦于以下问题:Java DownsampledDoubleArrayList类的具体用法?Java DownsampledDoubleArrayList怎么用?Java DownsampledDoubleArrayList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DownsampledDoubleArrayList类属于org.broad.igv.util.collections包,在下文中一共展示了DownsampledDoubleArrayList类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CufflinksDataSource

import org.broad.igv.util.collections.DownsampledDoubleArrayList; //导入依赖的package包/类
public CufflinksDataSource(List<? extends LocusScore> valueList, Genome genome) {

        chrAliasMap = new HashMap<String, String>();
        values = new HashMap<String, List<LocusScore>>();

        DownsampledDoubleArrayList sampledData = sampleValues(valueList, genome);

        // Sort
        for (List<LocusScore> chrValues : values.values()) {
            FeatureUtils.sortFeatureList(chrValues);
        }

        double[] sd = sampledData.toArray();
        if (sd.length > 0) {
            dataMin = Math.min(0, StatUtils.percentile(sd, 5));
            dataMax = StatUtils.percentile(sd, 95);
        } else {
            dataMin = 0;
            dataMax = 100;
        }

        calculateWholeGenomeScores(genome);
    }
 
开发者ID:hyounesy,项目名称:ALEA,代码行数:24,代码来源:CufflinksDataSource.java

示例2: sampleValues

import org.broad.igv.util.collections.DownsampledDoubleArrayList; //导入依赖的package包/类
/**
 * Sample the first 10,000 values to set scale
 * Also separate data into chromosomes
 * @param valueList
 * @param genome
 */
private DownsampledDoubleArrayList sampleValues(List<? extends LocusScore> valueList, Genome genome){
    DownsampledDoubleArrayList sampledData = new DownsampledDoubleArrayList(5000, 10000);
    for (LocusScore val : valueList) {
        String chr = val.getChr();

        List<LocusScore> chrValues = values.get(chr);
        if (chrValues == null) {
            chrValues = new ArrayList<LocusScore>();
            values.put(chr, chrValues);
            if (genome != null) {
                String alias = genome.getCanonicalChrName(chr);
                chrAliasMap.put(alias, chr);
            }


        }
        sampledData.add(val.getScore());
        chrValues.add(val);
    }
    return sampledData;
}
 
开发者ID:hyounesy,项目名称:ALEA,代码行数:28,代码来源:CufflinksDataSource.java

示例3: Accumulator

import org.broad.igv.util.collections.DownsampledDoubleArrayList; //导入依赖的package包/类
public Accumulator(WindowFunction windowFunction) {
    this.windowFunction = windowFunction;
    if (PERCENTILE_WINDOW_FUNCTIONS.contains(windowFunction)) {
        valueList = new DownsampledDoubleArrayList(100, MAX_VALUE_COUNT);
    }
}
 
开发者ID:dariober,项目名称:ASCIIGenome,代码行数:7,代码来源:Accumulator.java

示例4: PEStats

import org.broad.igv.util.collections.DownsampledDoubleArrayList; //导入依赖的package包/类
public PEStats(String library) {
    this.library = library;
    this.insertSizes = new DownsampledDoubleArrayList(100, MAX);
}
 
开发者ID:hyounesy,项目名称:ALEA,代码行数:5,代码来源:PEStats.java

示例5: computeStats

import org.broad.igv.util.collections.DownsampledDoubleArrayList; //导入依赖的package包/类
private void computeStats(DownsampledDoubleArrayList sampledData) {

            double[] data = sampledData.toArray();
            this.percent5 = StatUtils.percentile(data, 5);
            this.percent95 = StatUtils.percentile(data, 95);

        }
 
开发者ID:theaidenlab,项目名称:Juicebox,代码行数:8,代码来源:Preprocessor.java


注:本文中的org.broad.igv.util.collections.DownsampledDoubleArrayList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。