本文整理了Java中org.broadinstitute.gatk.utils.sam.GATKSAMRecord.setReferenceName()
方法的一些代码示例,展示了GATKSAMRecord.setReferenceName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GATKSAMRecord.setReferenceName()
方法的具体详情如下:
包路径:org.broadinstitute.gatk.utils.sam.GATKSAMRecord
类名称:GATKSAMRecord
方法名:setReferenceName
暂无
代码示例来源:origin: broadgsa/gatk-protected
@Test
public void testUnmappedReadsDoNotFail() {
// create an unmapped read
final GATKSAMRecord read = new GATKSAMRecord(ArtificialSAMUtils.createArtificialSamHeader());
read.setReadName("foo");
read.setReferenceName("*");
read.setAlignmentStart(100);
read.setCigarString("*");
read.setReadUnmappedFlag(true);
// try to add it to the manager
final OverhangFixingManager manager = new OverhangFixingManager(null, null, null, 100, 1, 30, false);
manager.addRead(read); // we just want to make sure that the following call does not fail
Assert.assertTrue(true);
}
}
代码示例来源:origin: broadgsa/gatk-protected
/**
* Creates and writes an artificial read given the appropriate data
*
* @param readBases the bases
* @param contig the contig
* @param start the read start
* @param cigar the cigar string
* @param sample the sample name (used to get the right read group)
* @param isNegStrand should this read be on the negative strand?
*/
private void writeRead(final byte[] readBases, final String contig, final int start,
final String cigar, final String sample, final boolean isNegStrand) {
final GATKSAMRecord read = new GATKSAMRecord(header);
read.setBaseQualities(readQuals);
read.setReadBases(readBases);
read.setReadName("" + readNameCounter++);
read.setCigarString(cigar);
read.setReadPairedFlag(false);
read.setAlignmentStart(start);
read.setMappingQuality(60);
read.setReferenceName(contig);
read.setReadNegativeStrandFlag(isNegStrand);
read.setAttribute("RG", sampleRG(sample).getReadGroupId());
readWriter.addAlignment(read);
}
代码示例来源:origin: broadgsa/gatk-protected
read.setAlignmentStart(readStart);
read.setMappingQuality(artificialMappingQuality);
read.setReferenceName(loc.getContig());
read.setReadNegativeStrandFlag(false);
read.setReadGroup(sampleRG(sample));
代码示例来源:origin: broadgsa/gatk
returnRead.setBaseQualities( quals );
returnRead.setReadGroup( firstRead.getReadGroup() );
returnRead.setReferenceName( firstRead.getReferenceName() );
returnRead.setReadName( firstRead.getReadName() );
final CigarElement c = new CigarElement(bases.length, CigarOperator.M);
内容来源于网络,如有侵权,请联系作者删除!