Package: pedl
PEDL+: Protein-centered relation extraction from PubMed at your fingertipPEDL+ is a powerful framework designed to extract protein-protein and drug-protein associations from biomedical literature. By searching over 30 million abstracts of biomedical publications and more than 4 million full texts usingPubTatorCentral, PEDL+ leverages state-of-the-art machine reading models to predict association types between proteins, supported by literature evidence.PEDL+ is capable of detecting the following association types:Protein-Protein: controls-phosphorylation-of, controls-state-change-of, controls-transport-of, controls-expression-of, in-complex-with, interacts-with, and catalysis-precedesDrug-Protein: antagonist, agonist, agonist-inihibitor, direct-regulator, activator, inhibitor, indirect-downregulator, indirect-upregulator, part-of, product-of, substrate, and substrate_product-ofFor example usage with expected results, seethis notebook.README ContentsInstallationUsageFAQInstallationInstall PEDL+ via pip:pip install pedlUsagePEDL+ provides two main commands:pedl-extractandpedl-summarize. The default workflow consists of usingpedl-extractto obtain associations for one or more protein or drug pairs of interest, storing the results for each pair in separate files. These files can then be aggregated into a single spreadsheet usingpedl-summarize.Proteins should be identified using HGNC symbols (for human genes) or Entrez gene IDs, searchable viaNCBI Gene. Drugs should be identified by their MeSH ID, searchable viaMeSH NLM.Building the PubTator Index (Optional)For searches involving more than 100 pairs with PEDL+, it is recommended to use an ElasticSearch index. If you do not build the index, PEDL+ will automatically download the required data using the PubTatorCentral API and run the search on the fly. However, this will be slower and won't work for more than 100 pairs.PEDL+ supports storing a preprocessed version of all PTC texts in an ElasticSearch index. Install and runElasticsearch 7.17and download allPubTatorCentral fileson your server. Note that this requires around 800GB of disk space. You can either build a docker container or follow the instructions on the website to run a default Elasticsearch host. Rebuilding the PubTator index can take considerable time (around a day on 70 threads).pedl-rebuild_pubtator_indexpedl-rebuild_pubtator_indexelastic.server=<server_address>pubtator_file=<path_to_pubtator_file>n_processes=<numberofprocesses>Example call:pedl-rebuild_pubtator_indexelastic.server=https://localhost:9200pubtator_file=/home/pedl/output/BioCXMLn_processes=10pedl-extractSingle Protein or Drug InteractionsTo extract interactions, you can use either the Entrez gene ID or name for proteins, and the MeSH ID or name for drugs. If using Entrez and/or MeSH IDs, setuse_ids=True. Please note that mixing names and IDs in the same query is not possible.Settype=protein_proteinfor protein-protein interactions ortype=drug_proteinfor drug-protein interactions.Example (Protein-Protein Interaction):pedl-extracte1=CMTM6e2=CD274type=protein_proteinout=PEDL_extractionsExample (Drug-Protein Interaction):pedl-extracte1=MeSH:D063325e2=1813type=drug_proteinout=PEDL_extractionsuse_ids=TruePairwise Interactions Between Multiple Proteins or DrugsProtein-Protein Interaction:pedl-extracte1=[CMTM6,PDCD1LG2]e2=CD274type=protein_proteinout=PEDL_extractionsDrug-Protein Interaction:pedl-extracte1=[MeSH:D000661,D008694]e2=4129type=drug_proteinout=PEDL_extractionsuse_ids=truePairwise Interactions Between All Proteins or DrugsProtein-Protein Interaction:pedl-extracte1=alle2=CD274type=protein_proteinout=PEDL_extractionsDrug-Protein Interaction:pedl-extracte1=alle2=4129type=drug_proteinout=PEDL_extractionsuse_ids=trueWith a local PubTator index:pedl-extracte1=alle2=4129type=drug_proteinout=PEDL_extractionsuse_ids=trueelastic.server=<server_address>Read Protein or Drug Lists from FilesProtein-Protein Interaction:pedl-extracte1=proteins.txte2=[54918,920]type=protein_proteinout=PEDL_extractionsuse_ids=trueDrug-Protein Interaction:pedl-extracte1=drugs.txte2=4129type=drug_proteinout=PEDL_extractionsuse_ids=truepedl-summarizeCreate a summary spreadsheet for all results in a directory:pedl-summarizeinput=PEDL_predictionsoutput=summaryIn case, you want a CSV file instead of an Excel file, use theplainparameter:pedl-summarizeinput=PEDL_predictionsoutput=summaryplain=TrueTo filter results by specific MeSH terms, use themesh_termsparameter. Escape special characters with a backslash\:pedl-summarizeinput=PEDL_extractionsoutput=summarymesh_terms=["Apoptosis","Lymphoma\, B-Cell"]To only use high-confidence extractions, use thethresholdparameter:pedl-summarizeinput=PEDL_extractionsoutput=summarythreshold=0.9FAQOn which platforms does PEDL+ work?We have thoroughly tested PEDL+ on Linux and MacOS and verified that its basic functionality works on Windows. We strongly recommend usingmambaforgeoranacondaas your Python environment.How can I perform a clean uninstall of PEDL+?Uninstall the package:pip uninstall pedlDelete the PEDL+ cache folder. You can typically find it under~/.cache/pedl. So you can delete it by runningrm -rf ~/.cache/pedl.I am running into issues with PEDL+. What can I do?Try to perform a clean uninstall and reinstall of PEDL+. If the issue persists, please open an issue on GitHub and we will try to help you as soon as possible.