本文整理汇总了Java中com.google.api.services.genomics.model.Read.getNumberReads方法的典型用法代码示例。如果您正苦于以下问题:Java Read.getNumberReads方法的具体用法?Java Read.getNumberReads怎么用?Java Read.getNumberReads使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.api.services.genomics.model.Read
的用法示例。
在下文中一共展示了Read.getNumberReads方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isUnmappedMateOfMappedRead
import com.google.api.services.genomics.model.Read; //导入方法依赖的package包/类
@Override
public boolean isUnmappedMateOfMappedRead(Read read) {
final boolean paired = (read.getNumberReads() != null &&
read.getNumberReads() >= 2);
if (!paired) {
return false;
}
final boolean unmapped = (read.getAlignment() == null ||
read.getAlignment().getPosition() == null ||
read.getAlignment().getPosition().getPosition() == null);
if (!unmapped) {
return false;
}
final Position matePosition = read.getNextMatePosition();
if (matePosition == null) {
return false;
}
if (read.getFragmentName() == null) {
return false;
}
if (matePosition.getReferenceName() != null && matePosition.getPosition() != null) {
return true;
}
return false;
}
示例2: getUnmappedMates
import com.google.api.services.genomics.model.Read; //导入方法依赖的package包/类
/**
* Checks if the passed read has unmapped mates that need to be injected and
* if so - returns them. The returned list is sorted by read number to
* handle the case of multi-read fragments.
*/
@Override
public ArrayList<Read> getUnmappedMates(Read read) {
if (read.getNumberReads() == null ||
read.getNumberReads() < 2 ||
(read.getNextMatePosition() != null &&
read.getNextMatePosition().getPosition() != null) ||
read.getAlignment() == null ||
read.getAlignment().getPosition() == null ||
read.getAlignment().getPosition().getReferenceName() == null ||
read.getFragmentName() == null) {
return null;
}
final String reference = read.getAlignment().getPosition().getReferenceName();
final String key = getReadKey(read);
Map<String, ArrayList<Read>> reads = unmappedReads.get(reference);
if (reads != null) {
final ArrayList<Read> mates = reads.get(key);
if (mates != null && mates.size() > 1) {
Collections.sort(mates, matesComparator);
}
return mates;
}
return null;
}
示例3: isMappedMateOfUnmappedRead
import com.google.api.services.genomics.model.Read; //导入方法依赖的package包/类
@Override
public boolean isMappedMateOfUnmappedRead(Read read) {
return read.getNumberReads() > 0 &&
(read.getNextMatePosition() == null ||
read.getNextMatePosition().getPosition() == null);
}