Loading all PPI information from Uniprot into a graph in NetworkX I am looking for guidance to load all SwissProt PPI data for Homo sapiens into a graph (from NetworkX). In particular, the part that I'm struggling with is gathering the data from SwissProt for each human protein. 



The data that I'm looking to extract is protein-protein interaction. This is not included in the files found here, which @rtviii (answer below) suggested to use. Rather, when say you click on an entry in SwissProt, for each entry, there is a section devoted to "Interaction" as shown in the image attached below. I would like to extract that information for each human protein, and load it into a graph data structure using NetworkX





EDIT 2:

How I ended up doing it:


    query = "reviewed:yes+AND+organism:9606"
    args = {'query': query, 'format': 'xls', 'columns':'id,entry name,interactor'}

    uniprot_url = "https://www.uniprot.org/uniprot/?{}".format(urllib.parse.urlencode(args))

    with open(&lt;DESIRED FILE PATH&gt;, "wb") as target:
          target.write(requests.get(url).content)
The query link for all interactors would be thus : https://www.uniprot.org/uniprot/?query=organism%3A9606+AND+interactor%3A*&amp;sort=score



There is always an option of downloading the static version of the service if you find it incovnient to deal with their API for your use case from here and have it all to yourself, pipe data into your dataframes locally. I find it useful to just broswe their repositories sometimes instead of reading the specifications.

In general, you can get a variety of datashapes  from uniprot that you cannot get from their static database-image by specifying the appropriate parameters in the request. You can browse and explore parameters by expanding their GUI's search fields as described in this little guide. Then you can request your data like so, in python for example. 

import requests
URL = "https://www.uniprot.org/uniprot/"
PARAMS = {'organism': 9606, 'format': 'tab', ....#Additional parameters#...}
response = requests.get(url=URL, params=PARAMS)