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


Java Interval.length方法代码示例

本文整理汇总了Java中htsjdk.samtools.util.Interval.length方法的典型用法代码示例。如果您正苦于以下问题:Java Interval.length方法的具体用法?Java Interval.length怎么用?Java Interval.length使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在htsjdk.samtools.util.Interval的用法示例。


在下文中一共展示了Interval.length方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: liftSimpleVariantContext

import htsjdk.samtools.util.Interval; //导入方法依赖的package包/类
protected static VariantContextBuilder liftSimpleVariantContext(VariantContext source, Interval target){
    if (target == null || source.getReference().length() != target.length()) {
        return null;
    }

    // Build the new variant context.  Note: this will copy genotypes, annotations and filters
    final VariantContextBuilder builder = new VariantContextBuilder(source);
    builder.chr(target.getContig());
    builder.start(target.getStart());
    builder.stop(target.getEnd());

    return builder;
}
 
开发者ID:broadinstitute,项目名称:picard,代码行数:14,代码来源:LiftoverUtils.java

示例2: testCoverageGetTotalOverflow

import htsjdk.samtools.util.Interval; //导入方法依赖的package包/类
@Test
public void testCoverageGetTotalOverflow() {
    final Interval interval = new Interval("chr1", 1, 2);
    final TargetMetricsCollector.Coverage coverage = new TargetMetricsCollector.Coverage(interval, 0);
    for (int offset = 0; offset <= interval.length(); offset++) {
        coverage.addBase(offset, Integer.MAX_VALUE - 1);
    }
    Assert.assertEquals((long)coverage.getTotal(), 2 * (long)(Integer.MAX_VALUE - 1));
}
 
开发者ID:broadinstitute,项目名称:picard,代码行数:10,代码来源:CollectTargetedMetricsTest.java

示例3: trimInterval

import htsjdk.samtools.util.Interval; //导入方法依赖的package包/类
private Interval trimInterval(final Interval interval) {
if(interval.length()<=this.max_interval_length) return interval;
final Interval interval2 = new Interval(
		interval.getContig(),
		interval.getStart(),
		interval.getStart()+this.max_interval_length-1
		);

LOG.debug("trim interval "+interval+" to "+interval2);
return interval2;
}
 
开发者ID:lindenb,项目名称:jvarkit,代码行数:12,代码来源:TViewServer.java

示例4: overlap

import htsjdk.samtools.util.Interval; //导入方法依赖的package包/类
/** returns true two interval overlap with fraction_overlap  */
private boolean overlap(final Interval i1,final Interval i2)
	{
	if(!i1.intersects(i2)) return false;
	final int L1 = i1.length();
	final int L2 = i2.length();
	final int  L3 = i1.getIntersectionLength(i2);
	if(L3< (int)(this.fraction_overlap*L1)) return false;
	if(L3< (int)(this.fraction_overlap*L2)) return false;
	return true;
	}
 
开发者ID:lindenb,项目名称:jvarkit,代码行数:12,代码来源:LumpySort.java


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