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


Java Read.getFragmentName方法代码示例

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


在下文中一共展示了Read.getFragmentName方法的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;
}
 
开发者ID:googlegenomics,项目名称:gatk-tools-java,代码行数:26,代码来源:UnmappedReads.java

示例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;
}
 
开发者ID:googlegenomics,项目名称:gatk-tools-java,代码行数:31,代码来源:UnmappedReads.java

示例3: getReadKey

import com.google.api.services.genomics.model.Read; //导入方法依赖的package包/类
private static String getReadKey(Read read) {
  return read.getFragmentName();
}
 
开发者ID:googlegenomics,项目名称:gatk-tools-java,代码行数:4,代码来源:UnmappedReads.java


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