run_api.py 文件源码

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

项目:biomatch_prototype_api 作者: CBIIT 项目源码 文件源码
def hotspots_not_in_patients():
    file = "/match_hotspots_v4.1_blist.bed"
    BED_data = BEDController().get_hotspots_from_bed(file)
    variant_types = ['indels', 'singleNucleotideVariants', 'copyNumberVariants', 'unifiedGeneFusions']
    positive_negative = ['ne', 'eq']
    all_links = []
    for variant_type in variant_types:    #only COSMs in bed file, so don't need to worry about reversing ref/alt
        for strand_direction in positive_negative:
            all_links += PatientAccessor().get_variant_for_gene(variant_type, '', '', strand_direction)
    patient_COSMS = set()
    for instance in all_links:
        patient_COSMS.add(instance['_id']['identifier'])
    difference_of_sets = BED_data.difference(patient_COSMS)
    return jsonify({'hotspots_in_bed_but_not_patients': list(difference_of_sets)})


# -----------------------MISC-------------------------------------------------------------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号