本文整理汇总了Java中net.sf.samtools.SAMRecord.setNotPrimaryAlignmentFlag方法的典型用法代码示例。如果您正苦于以下问题:Java SAMRecord.setNotPrimaryAlignmentFlag方法的具体用法?Java SAMRecord.setNotPrimaryAlignmentFlag怎么用?Java SAMRecord.setNotPrimaryAlignmentFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.samtools.SAMRecord
的用法示例。
在下文中一共展示了SAMRecord.setNotPrimaryAlignmentFlag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makePairs
import net.sf.samtools.SAMRecord; //导入方法依赖的package包/类
public Collection<SAMRecord> makePairs() {
Collection<SAMRecord> rtrn=new ArrayList<SAMRecord>();
Collection<SAMRecord> pair1=getValue1();
Collection<SAMRecord> pair2=getValue2();
//match up all pair1 and pair2
for(SAMRecord r1: pair1){
for(SAMRecord r2: pair2){
if(isCompatiblePair(r1, r2)){
Pair<SAMRecord> p=new Pair<SAMRecord>(r1, r2);
SAMRecord fragment=makePair(p);
if(r1.getNotPrimaryAlignmentFlag() && r2.getNotPrimaryAlignmentFlag()){
fragment.setNotPrimaryAlignmentFlag(true);
}
rtrn.add(fragment);
}
}
}
return rtrn;
}
示例2: getSAMRecord
import net.sf.samtools.SAMRecord; //导入方法依赖的package包/类
public SAMRecord getSAMRecord(SAMFileHeader hh) {
SAMRecord sr = new SAMRecord(hh);
// set flags for a neutral read
sr.setFlags(0);
sr.setReadName(getReadname());
sr.setBaseQualityString(makeBaseQuality(readsequence.length));
sr.setAttribute("RG", "thesalign");
sr.setNotPrimaryAlignmentFlag(!isPrimary());
sr.setAlignmentStart(alignpos + 1);
sr.setCigarString(readsequence.length + "M");
sr.setReferenceName(chrom);
sr.setMappingQuality(mappingquality);
if (negativestrand) {
sr.setReadNegativeStrandFlag(true);
sr.setReadBases(SequenceComplementer.complement(readsequence));
} else {
sr.setReadNegativeStrandFlag(false);
sr.setReadBases(readsequence);
}
// perhaps the read is unaligned (too many alignments to report)
if (unmapped) {
sr.setReadUnmappedFlag(unmapped);
}
return sr;
}