#!/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/#importcollectionsimportpypath.resources.urlsasurlsimportpypath.share.curlascurl
[docs]defnegatome_interactions():""" Literature curated non-interacting protein pairs from the Negatome database. These interactions do not exist to best of our knowledge, the literature references point to papers with experiments testing for the interaction but finding negative outcome. """NegatomeInteraction=collections.namedtuple('NegatomeInteraction',('uniprot_a','uniprot_b','pmid','method',),)url=urls.urls['negatome']['manual']c=curl.Curl(url,silent=False,large=True)f=c.resultresult=[]forlinf:l=l.strip().split('\t')iflen(l)==4:l[3]=';'.join(map(lambdax:x.split('-')[1].strip(),filter(lambdax:'-'inx,l[3].replace('–','-').split(','))))l[0]=l[0].split('-')[0]l[1]=l[1].split('-')[0]result.append(NegatomeInteraction(*l))returnresult