snpmatch.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:SNPmatch 作者: Gregor-Mendel-Institute 项目源码 文件源码
def CaseInterpreter(overlap, NumSNPs, topHits, probScore):
  overlap_thres = 0.5
  num_lines = len(probScore)
  case = 10
  if len(topHits) == 1:
    case = 0
    note = "Unique hit"
  elif np.nanmean(probScore[topHits]) > prob_thres:
    case = 2
    note = "Ambiguous sample: Accessions in top hits can be really close"
  elif overlap > overlap_thres:
    case = 3
    note = "Ambiguous sample: Sample might contain mixture of DNA or contamination"
  elif overlap < overlap_thres:
    case = 4
    note = "Ambiguous sample: Overlap of SNPs is very low, sample may not be in database"
  if case > 4:
    case = 1
    note = "Ambiguous sample"
  return (case, note)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号