本文整理汇总了Java中htsjdk.samtools.SAMFileHeader.getReadGroup方法的典型用法代码示例。如果您正苦于以下问题:Java SAMFileHeader.getReadGroup方法的具体用法?Java SAMFileHeader.getReadGroup怎么用?Java SAMFileHeader.getReadGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类htsjdk.samtools.SAMFileHeader
的用法示例。
在下文中一共展示了SAMFileHeader.getReadGroup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PicardAlignment
import htsjdk.samtools.SAMFileHeader; //导入方法依赖的package包/类
public PicardAlignment(SAMRecord record) {
super();
this.record = record;
this.flags = record.getFlags();
String refName = record.getReferenceName();
Genome genome = GenomeManager.getInstance().getCurrentGenome();
this.chr = genome == null ? refName : genome.getCanonicalChrName(refName);
// SAMRecord is 1 based inclusive. IGV is 0 based exclusive.
this.end = record.getAlignmentEnd(); // might be modified later for soft clipping
this.start = record.getAlignmentStart() - 1; // might be modified later for soft clipping
if (record.getReadPairedFlag()) {
String mateReferenceName = record.getMateReferenceName();
String mateChr = genome == null ? mateReferenceName : genome.getCanonicalChrName(mateReferenceName);
this.setMate(new ReadMate(mateChr,
record.getMateAlignmentStart() - 1,
record.getMateNegativeStrandFlag(),
record.getMateUnmappedFlag()));
}
String keySequence = null;
SAMFileHeader header = record.getHeader();
String flowOrder = null;
if (header != null) {
readGroup = (String) record.getAttribute("RG");
if (readGroup != null) {
SAMReadGroupRecord rgRec = header.getReadGroup(readGroup);
if (rgRec != null) {
this.sample = rgRec.getSample();
this.library = rgRec.getLibrary();
flowOrder = rgRec.getFlowOrder();
keySequence = rgRec.getKeySequence();
}
}
}
Object colorTag = record.getAttribute("YC");
if (colorTag != null) {
try {
color = ColorUtilities.stringToColor(colorTag.toString(), null);
} catch (Exception e) {
log.error("Error interpreting color tag: " + colorTag, e);
}
}
setPairOrientation();
setPairStrands();
createAlignmentBlocks(record.getCigarString(), record.getReadBases(), record.getBaseQualities(),
getFlowSignals(flowOrder, keySequence), flowOrder, this.getFlowSignalsStart());
}