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

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

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

GATKSAMRecord.getOriginalAlignmentStart介绍

[英]Determines the original alignment start of a previously clipped read. This is useful for reads that have been trimmed to a variant region and lost the information of it's original alignment end
[中]确定先前剪裁读取的原始对齐起始点。这对于已修剪到变体区域并丢失其原始对齐结束信息的读取非常有用

代码示例

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

/**
 * Hard clip the read to the variable region (from refStart to refStop) processing also the clipped bases
 *
 * @param read     the read to be clipped
 * @param refStart the beginning of the variant region (inclusive)
 * @param refStop  the end of the variant region (inclusive)
 * @return the read hard clipped to the variant region
 */
public static GATKSAMRecord hardClipToRegionIncludingClippedBases( final GATKSAMRecord read, final int refStart, final int refStop ) {
  final int start = read.getOriginalAlignmentStart();
  final int stop = start + CigarUtils.countRefBasesBasedOnCigar(read,0,read.getCigarLength()) - 1;
  return hardClipToRegion(read, refStart, refStop,start,stop);
}

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

final int startRefIndex = read.getOriginalAlignmentStart() + CigarUtils.countRefBasesBasedOnCigar(read,0,cigarFirstIndex); //goes through the prefix of the cigar (up to cigarStartIndex) and move the reference index.
final int stopRefIndex = startRefIndex + CigarUtils.countRefBasesBasedOnCigar(read,cigarFirstIndex,cigarSecondIndex)-1; //goes through a consecutive non-N section of the cigar (up to cigarEndIndex) and move the reference index.

相关文章

微信公众号

最新文章

更多

GATKSAMRecord类方法