本文整理汇总了Java中org.apache.commons.math3.distribution.RealDistribution.getNumericalVariance方法的典型用法代码示例。如果您正苦于以下问题:Java RealDistribution.getNumericalVariance方法的具体用法?Java RealDistribution.getNumericalVariance怎么用?Java RealDistribution.getNumericalVariance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math3.distribution.RealDistribution
的用法示例。
在下文中一共展示了RealDistribution.getNumericalVariance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: GenerateBed
import org.apache.commons.math3.distribution.RealDistribution; //导入方法依赖的package包/类
/**
* Generate records in BED format.
*
* @param bedFile output BED file, if any
* @param n number of BED records to generate, must be at least zero
* @param size chromosome size, must be at least zero
* @param chrom chromosome name, must not be null
* @param random random generator, must not be null
* @param length length distribution, must not be null
*/
public GenerateBed(final File bedFile, final int n, final int size, final String chrom, final RandomGenerator random, final RealDistribution length) {
checkArgument(n >= 0, "n must be at least zero");
checkArgument(size >= 0, "size must be at least zero");
checkNotNull(chrom);
checkNotNull(random);
checkNotNull(length);
this.bedFile = bedFile;
this.n = n;
this.size = size;
this.chrom = chrom;
this.random = random;
this.length = length;
int flanking = (int) (length.getNumericalMean() + length.getNumericalVariance());
location = new UniformIntegerDistribution(this.random, 1 - flanking, size + flanking);
}
示例2: GenerateReads
import org.apache.commons.math3.distribution.RealDistribution; //导入方法依赖的package包/类
/**
* Generate next generation sequencing (NGS/HTS) reads.
*
* @param reference reference, must not be null
* @param variant FASTQ variant, must not be null
* @param random random, must not be null
* @param length length distribution, must not be null
* @param quality quality strategy, must not be null
* @param coverage coverage strategy, must not be null
* @param mutationRate mutation rate, must be between <code>0.0</code> and <code>1.0</code>, inclusive
* @param mutation mutation strategy, must not be null
* @param appendable appendable, must not be null
* @param writer FASTQ writer, must not be null
*/
public GenerateReads(final Sequence reference,
final FastqVariant variant,
final RandomGenerator random,
final RealDistribution length,
final QualityStrategy quality,
final CoverageStrategy coverage,
final double mutationRate,
final MutationStrategy mutation,
final Appendable appendable,
final FastqWriter writer) {
checkNotNull(reference, "reference must not be null");
checkNotNull(variant, "variant must not be null");
checkNotNull(random, "random must not be null");
checkNotNull(length, "length must not be null");
checkNotNull(quality, "quality must not be null");
checkNotNull(coverage, "coverage must not be null");
checkArgument(mutationRate >= 0.0d, "mutationRate must be greater than or equal to 0.0d");
checkArgument(mutationRate <= 1.0d, "mutationRate must be less than or equal to 1.0d");
checkNotNull(mutation, "mutation must not be null");
checkNotNull(appendable, "appendable must not be null");
checkNotNull(writer, "writer must not be null");
this.reference = reference;
this.variant = variant;
this.random = random;
this.length = length;
this.quality = quality;
this.coverage = coverage;
this.mutationRate = mutationRate;
this.mutation = mutation;
this.appendable = appendable;
this.writer = writer;
int flanking = (int) (length.getNumericalMean() + length.getNumericalVariance());
location = new UniformIntegerDistribution(this.random, 1 - flanking, this.reference.length() + flanking);
}
示例3: GeneratePairedEndReads
import org.apache.commons.math3.distribution.RealDistribution; //导入方法依赖的package包/类
/**
* Generate paired-end next generation sequencing (NGS/HTS) reads.
*
* @param reference reference, must not be null
* @param variant FASTQ variant, must not be null
* @param random random, must not be null
* @param length length distribution, must not be null
* @param insertSize insert size distribution, must not be null
* @param quality quality strategy, must not be null
* @param coverage coverage strategy, must not be null
* @param mutationRate mutation rate, must be between <code>0.0</code> and <code>1.0</code>, inclusive
* @param mutation mutation strategy, must not be null
* @param first first appendable, must not be null
* @param second second appendable, must not be null
* @param writer FASTQ writer, must not be null
*/
public GeneratePairedEndReads(final Sequence reference,
final FastqVariant variant,
final RandomGenerator random,
final RealDistribution length,
final RealDistribution insertSize,
final QualityStrategy quality,
final CoverageStrategy coverage,
final double mutationRate,
final MutationStrategy mutation,
final Appendable first,
final Appendable second,
final FastqWriter writer) {
checkNotNull(reference, "reference must not be null");
checkNotNull(variant, "variant must not be null");
checkNotNull(random, "random must not be null");
checkNotNull(length, "length must not be null");
checkNotNull(insertSize, "insertSize must not be null");
checkNotNull(quality, "quality must not be null");
checkNotNull(coverage, "coverage must not be null");
checkArgument(mutationRate >= 0.0d, "mutationRate must be greater than or equal to 0.0d");
checkArgument(mutationRate <= 1.0d, "mutationRate must be less than or equal to 1.0d");
checkNotNull(mutation, "mutation must not be null");
checkNotNull(first, "first must not be null");
checkNotNull(second, "second must not be null");
checkNotNull(writer, "writer must not be null");
this.reference = reference;
this.variant = variant;
this.random = random;
this.length = length;
this.insertSize = insertSize;
this.quality = quality;
this.coverage = coverage;
this.mutationRate = mutationRate;
this.mutation = mutation;
this.first = first;
this.second = second;
this.writer = writer;
int flanking = (int) (length.getNumericalMean() + length.getNumericalVariance() + insertSize.getNumericalMean() + insertSize.getNumericalVariance());
location = new UniformIntegerDistribution(this.random, 1 - flanking, this.reference.length() + flanking);
}