本文整理汇总了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);
}
示例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;
}
示例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);
}
}
示例4: PEStats
import org.broad.igv.util.collections.DownsampledDoubleArrayList; //导入依赖的package包/类
public PEStats(String library) {
this.library = library;
this.insertSizes = new DownsampledDoubleArrayList(100, MAX);
}
示例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);
}