#!/usr/bin/env python# -*- coding: utf-8 -*-## This file is part of the `pypath` python module## Copyright 2014-2023# EMBL, EMBL-EBI, Uniklinik RWTH Aachen, Heidelberg University## Authors: see the file `README.rst`# Contact: Dénes Türei (turei.denes@gmail.com)## Distributed under the GPLv3 License.# See accompanying file LICENSE.txt or copy at# https://www.gnu.org/licenses/gpl-3.0.html## Website: https://pypath.omnipathdb.org/#importpypath.share.curlascurlimportpypath.resources.urlsasurlsimportpypath.utils.mappingasmappingimportpypath.inputs.commonasinputs_common
[docs]defsurfaceome_annotations():""" Downloads the "In silico human surfaceome". Dict with UniProt IDs as key and tuples of surface prediction score, class and subclass as values (columns B, N, S and T of table S3). """url=urls.urls['surfaceome']['url']c=curl.Curl(url,large=True,silent=False)xlsname=c.fnamedel(c)raw=inputs_common.read_xls(xlsname,'in silico surfaceome only')[2:]returndict((uniprot,# uniprot(float(r[13]),# scorer[18]ifr[18]elseNone,# classset(r[19].replace('KInase','Kinase').split(';'))ifr[19]elseset(),# subclass))forrinrawforuniprotinmapping.map_name(r[1],'uniprot','uniprot'))