Home

Awesome

dom2vec: Protein domain embeddings

Please note: repository in WIP, each folder indicated by WIP will be updated soon.

All protein domains analysis follows the data from Interpro version 75.0. All data associated can be found at the ftp site for the version 75.0, accessible from the general download site. All analysis is decipted in the following image:

Summary of approach

Summary of approach Summary of the approach/code divided in four parts, building two forms of domain architectures, training domain embeddings, performing intrinsic and extrinsic evaluation of embeddings.

Main dependencies

Code was executed using a conda environment, of which the full list of dependencies is in conda_env_dependencies.txt.

The main dependencies are listed below:

Build protein domain architectures

  1. Data acquisition:

    For Interpro 75.0 version download the files:

  1. Get protein lengths parsing match_complete.xml:
  1. Get domains and evidence db id per protein:
  1. Get domain architecture corpus:

Train protein domain embeddings

  1. Needed data:
  1. Train word2vec model from domain architectures corpus:

Intrinsic evaluation

Data and example running experiments for:

  1. Data acquisition:

    • For Interpro 75.0 version, download the ParentChildTreeFile.txt file
  2. Parse the parent child relation:

    • uncomment the domain hierarchy section in intrinsic_eval_run.py
    • parse parent child using parse_parent_child_file()
    • interpro_parsed_tree.txt will be created; the first 3 Interpro parents of the full parsed tree is saved at sample file
  3. Run evaluation

    • run evaluation with the rest section using the looped get_nn_calculate_precision_recall_atN()
    • the outputs will be: average recall value, recall histogram png, diagnostic histogram for parents with recall 0 (if parameter is selected)
    • example outputs can be found respectively at table 1, Figure S1 and S2 in the below bioRxiv manuscript
  1. Data acquisition:

    • For InterPro 75.0 version, download and decompress interpro.xml.gz file
  2. Parse interpro.xml:

    • uncomment the EC & SCOPe section in intrinsic_eval_run.py
    • parse xml to get available SCOPe and EC labels per domain using parse_and_save_EC_SCOP()
    • interpro2EC_SCOPe.tab will be created; a sample of the first 100 lines of the full file is saved at sample file
  3. Run evaluation

    • initialize EC_SCOP_Evaluate() class for evaluation using EC or SCOPe
    • run evaluation with the rest section using the looped run_classification()
    • average test accuracy over 5-fold cross validation will be printed; example values can be found in Tables 2 and 3 in the below bioRxiv manuscript
  1. Data acquisition:
    • For Interpro 75.0 version, download the interpro2go file and add the suffix .txt

For each organism: malaria, ecolik12, yeast, human follow the steps:

  1. Parse interpro2go.txt:

    • uncomment the GOEvaluate section in intrinsic_eval_run.py
    • parse the txt file using convert_go_labels() producing:
    • interpro2go_organism_MF.tab containing unprocessed available GO MF labels per domain; a sample of the first 100 lines of the full file for yeast is saved at sample file
    • interpro2go_yeast_MF_labels.csv containing GO MF labels after abstracting them; a sample of the first 100 lines of the full file for yeast is saved at sample file
  2. Run evaluation

    • initialize GOEvaluate() class for evaluation in selected organism
    • run evaluation with the rest section using the looped run_classification()
    • average test accuracy over 5-fold cross validation will be printed; example can be found in Table 4 in the below bioRxiv manuscript

Downstream evaluation

  1. Extract non-redundant domains from proteins in data set

  2. For the remaining proteins, run intreproscan and convert annotation to selected type of domain annotation:

    • install interproscan as discussed in interProScan Wiki
    • run interproscan with data set proteins as input, the output is a tsv file
    • gzip the tsv and parse as in parse_prot2in, the output is a tabular file (same columns as of the previous step tabular file)
    • run again the fasta2csv in fasta2csv after interproscan
  3. For the rest of protein without identified domains created a default domain per protein as shown in fasta2default

  4. Preprocess data sets for learning:

Data and example code to run cross validation and performance experiments for three data sets:

Pretrained dom2vec

Pretrained dom2vec embeddings can be downloaded from the Research Data portal of Leibniz University Hannover at dom2vec_pretrained.

Citation

This repository is the implementation of the research work: "Capturing Protein Domain Structure and Function Using Self-Supervision on Domain Architectures" (link).

Please, cite as:

@article{melidis2021capturing,
  title={Capturing Protein Domain Structure and Function Using Self-Supervision on Domain Architectures},
  author={Melidis, Damianos P and Nejdl, Wolfgang},
  journal={Algorithms},
  volume={14},
  number={1},
  pages={28},
  year={2021},
  publisher={Multidisciplinary Digital Publishing Institute}
}