google-research / proteinfer

Deep networks for protein functional inference
https://google-research.github.io/proteinfer/
Apache License 2.0
159 stars 27 forks source link

How to filter uninformative GO Terms #63

Open Rohit-Satyam opened 2 years ago

Rohit-Satyam commented 2 years ago

Hi!! Thanks for this easy to install and easy to use CLI tool for functional identification. I have few queries:

  1. Can I use proteinfer for organism ranging from Bacteria to Eukaryotes? If so do we need to adjust any parameters?
  2. Do you recommend running proteinfer with --num_ensemble_elements 5. I tested this parameter for few well annotated protein in my organism I saw that using 5 rather than default decreased the probability of the actual function. When do you recommend using ensemble parameter and when default works just fine?
  3. Some GO Terms such as ones given below are not very informative and assigned high confidence score. For handful of genes it can be removed manually. However, for 100 and 1000s of genes manual removal is difficult. Is there a strategy to get rid of such terms?
    cellular_component
    biological_process
    cell part
    molecular_function
    intracellular part
    cellular process
    binding
    biological regulation
    cytoplasmic part
    organelle part
Rohit-Satyam commented 2 years ago

I wrote a short code in R to do that:

library(dplyr)
library(plyr)
library(stringr)

t <- read.csv("file.tsv",sep = "\t")
rm <- c("cellular_component","biological_process","localization","cell part","molecular_function","intracellular part","cellular process","binding","biological regulation","cytoplasmic part","organelle part","regulation of biological process","chromosomal part")
t <- t[!t$description %in% rm,]
t$description <- paste0(t$description," (",t$confidence,")")
t <- t[,-3]

temp <- t %>%
  group_by(sequence_name) %>%
  dplyr::summarize(label=str_c(predicted_label,collapse=","),desc = str_c(description, collapse = ", "))
write.table(temp,"filenew.tsv",sep = "\t")