org.broadinstitute.gatk.utils.sam.GATKSAMRecord.getAdaptorBoundary()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(74)

本文整理了Java中org.broadinstitute.gatk.utils.sam.GATKSAMRecord.getAdaptorBoundary()方法的一些代码示例,展示了GATKSAMRecord.getAdaptorBoundary()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GATKSAMRecord.getAdaptorBoundary()方法的具体详情如下:
包路径:org.broadinstitute.gatk.utils.sam.GATKSAMRecord
类名称:GATKSAMRecord
方法名:getAdaptorBoundary

GATKSAMRecord.getAdaptorBoundary介绍

[英]A caching version of ReadUtils.getAdaptorBoundary() see #ReadUtils.getAdaptorBoundary(SAMRecord) for more information about the meaning of this function WARNING -- this function caches a value depending on the inferred insert size and alignment starts and stops of this read and its mate. Changing these values in any way will invalidate the cached value. However, we do not monitor those setter functions, so modifying a GATKSAMRecord in any way may result in stale cached values.
[中]ReadUtils的缓存版本。getAdapterBoundary()请参见#ReadUtils。GetAdapterBoundary(SAMRecord)了解有关此函数含义的更多信息警告--此函数根据推断的插入大小和对齐方式缓存值此读取及其匹配的开始和停止。以任何方式更改这些值都将使缓存的值无效。但是,我们不监视这些setter函数,因此以任何方式修改GATKSAMRecord都可能导致过时的缓存值。

代码示例

代码示例来源:origin: broadgsa/gatk

@Override public int getAdaptor(final GATKSAMRecord record) { return record.getAdaptorBoundary(); }
}});

代码示例来源:origin: broadgsa/gatk

/**
 * is this base inside the adaptor of the read?
 *
 * There are two cases to treat here:
 *
 * 1) Read is in the negative strand => Adaptor boundary is on the left tail
 * 2) Read is in the positive strand => Adaptor boundary is on the right tail
 *
 * Note: We return false to all reads that are UNMAPPED or have an weird big insert size (probably due to mismapping or bigger event)
 *
 * @param read the read to test
 * @param basePos base position in REFERENCE coordinates (not read coordinates)
 * @return whether or not the base is in the adaptor
 */
public static boolean isBaseInsideAdaptor(final GATKSAMRecord read, long basePos) {
  final int adaptorBoundary = read.getAdaptorBoundary();
  if (adaptorBoundary == CANNOT_COMPUTE_ADAPTOR_BOUNDARY || read.getInferredInsertSize() > DEFAULT_ADAPTOR_SIZE)
    return false;
  return read.getReadNegativeStrandFlag() ? basePos <= adaptorBoundary : basePos >= adaptorBoundary;
}

相关文章

微信公众号

最新文章

更多

GATKSAMRecord类方法