当前位置: 首页>>代码示例>>Java>>正文


Java SAMFileHeader.getSequence方法代码示例

本文整理汇总了Java中htsjdk.samtools.SAMFileHeader.getSequence方法的典型用法代码示例。如果您正苦于以下问题:Java SAMFileHeader.getSequence方法的具体用法?Java SAMFileHeader.getSequence怎么用?Java SAMFileHeader.getSequence使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在htsjdk.samtools.SAMFileHeader的用法示例。


在下文中一共展示了SAMFileHeader.getSequence方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkAlignmentDisagreesWithHeader

import htsjdk.samtools.SAMFileHeader; //导入方法依赖的package包/类
/**
 * Check to ensure that the alignment makes sense based on the contents of
 * the header.
 * 
 * @param header
 *            The SAM file header.
 * @param read
 *            The read to verify.
 * @return true if alignment agrees with header, false othrewise.
 */
protected boolean checkAlignmentDisagreesWithHeader(
		SAMFileHeader header, SAMRecord read) {
	// Read is aligned to nonexistent contig
	if (read.getReferenceIndex() == GaeaSamRecord.NO_ALIGNMENT_REFERENCE_INDEX
			&& read.getAlignmentStart() != GaeaSamRecord.NO_ALIGNMENT_START)
		return false;
	SAMSequenceRecord contigHeader = header.getSequence(read
			.getReferenceIndex());
	// Read is aligned to a point after the end of the contig
	if (!read.getReadUnmappedFlag()
			&& read.getAlignmentStart() > contigHeader.getSequenceLength())
		return false;
	return true;
}
 
开发者ID:BGI-flexlab,项目名称:SOAPgaea,代码行数:25,代码来源:MalformedReadFilter.java

示例2: Window

import htsjdk.samtools.SAMFileHeader; //导入方法依赖的package包/类
public Window(SAMFileHeader mHeader, int chrIndex, int winNum, int WindowsSize) {
	int winSize = WindowsSize;
	int start = winNum * winSize;

	if (mHeader.getSequence(chrIndex) == null)
		throw new RuntimeException(String.format("chr index %d is not found in reference", chrIndex));
	String chrName = mHeader.getSequence(chrIndex).getSequenceName();
	int stop = (winNum + 1) * winSize - 1 < mHeader.getSequence(chrName).getSequenceLength()
			? (winNum + 1) * winSize - 1 : mHeader.getSequence(chrName).getSequenceLength();

	this.contigName=chrName;
	this.chrIndex = chrIndex;
	this.start=start;
	this.stop=stop;
}
 
开发者ID:BGI-flexlab,项目名称:SOAPgaea,代码行数:16,代码来源:Window.java


注:本文中的htsjdk.samtools.SAMFileHeader.getSequence方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。