org.broadinstitute.gatk.utils.Utils.arrayFromArrayWithLength()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(154)

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

Utils.arrayFromArrayWithLength介绍

暂无

代码示例

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

public static GATKSAMRecord createArtificialRead(Cigar cigar) {
  int length = cigar.getReadLength();
  byte [] base = {'A'};
  byte [] qual = {30};
  byte [] bases = Utils.arrayFromArrayWithLength(base, length);
  byte [] quals = Utils.arrayFromArrayWithLength(qual, length);
  SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader();
  return ArtificialSAMUtils.createArtificialRead(header, "default_read", 0, 10000, bases, quals, cigar.toString());
}

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

/**
 * Make a read fom the CIGAR
 *
 * @param cigar the CIGAR
 * @param lengthChange change in read length relative the CIGAR length
 * @return artificial read
 */
public static GATKSAMRecord makeReadFromCigar(Cigar cigar, int lengthChange) {
  int readLength = cigar.getReadLength();
  if ( readLength >= -lengthChange ) {
    readLength += lengthChange;
  }
  return ArtificialSAMUtils.createArtificialRead(Utils.arrayFromArrayWithLength(BASES, readLength), Utils.arrayFromArrayWithLength(QUALS, readLength), cigar.toString());
}

相关文章