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

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

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

GATKSAMRecord.getExistingBaseInsertionQualities介绍

暂无

代码示例

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

/**
 * Default utility to query the base insertion quality of a read. If the read doesn't have one, it creates an array of default qualities (currently Q45)
 * and assigns it to the read.
 *
 * @return the base insertion quality array
 */
public byte[] getBaseInsertionQualities() {
  byte [] quals = getExistingBaseInsertionQualities();
  if( quals == null ) {
    quals = new byte[getBaseQualities().length];
    Arrays.fill(quals, DEFAULT_INSERTION_DELETION_QUAL); // Some day in the future when base insertion and base deletion quals exist the samtools API will
                    // be updated and the original quals will be pulled here, but for now we assume the original quality is a flat Q45
  }
  return quals;
}

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

public ReadRecalibrationInfo(final GATKSAMRecord read,
               final ReadCovariates covariates,
               final boolean[] skips,
               final double[] snpErrors,
               final double[] insertionErrors,
               final double[] deletionErrors) {
  if ( read == null ) throw new IllegalArgumentException("read cannot be null");
  if ( covariates == null ) throw new IllegalArgumentException("covariates cannot be null");
  if ( skips == null ) throw new IllegalArgumentException("skips cannot be null");
  if ( snpErrors == null ) throw new IllegalArgumentException("snpErrors cannot be null");
  if ( insertionErrors == null ) throw new IllegalArgumentException("insertionErrors cannot be null");
  if ( deletionErrors == null ) throw new IllegalArgumentException("deletionErrors cannot be null");
  this.read = read;
  this.baseQuals = read.getBaseQualities();
  this.length = baseQuals.length;
  this.covariates = covariates;
  this.skips = skips;
  this.insertionQuals = read.getExistingBaseInsertionQualities();
  this.deletionQuals = read.getExistingBaseDeletionQualities();
  this.snpErrors = snpErrors;
  this.insertionErrors = insertionErrors;
  this.deletionErrors = deletionErrors;
  if ( skips.length != length ) throw new IllegalArgumentException("skips.length " + snpErrors.length + " != length " + length);
  if ( snpErrors.length != length ) throw new IllegalArgumentException("snpErrors.length " + snpErrors.length + " != length " + length);
  if ( insertionErrors.length != length ) throw new IllegalArgumentException("insertionErrors.length " + snpErrors.length + " != length " + length);
  if ( deletionErrors.length != length ) throw new IllegalArgumentException("deletionErrors.length " + snpErrors.length + " != length " + length);
}

相关文章

微信公众号

最新文章

更多

GATKSAMRecord类方法