Skip to content

Commit

Permalink
add protein function predictions
Browse files Browse the repository at this point in the history
  • Loading branch information
pcastellanoescuder committed Dec 13, 2023
1 parent df9590f commit 3ec6bee
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export(make_molecular_features_table)
export(make_molecule_structure)
export(make_pathway_table)
export(make_protein_domain)
export(make_protein_function_predictions_table)
export(make_protein_sequence)
export(make_proteinsize)
export(make_pubmed)
Expand Down
24 changes: 24 additions & 0 deletions R/tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,30 @@ make_humananatogram_table <- function(input = list()) {
message(e)
})
}

# CAMPBELL MODEL PREDICTIONS -----------------------------------------------
#' Predicted Protein Functions
#'
#' @param input Expecting a list containing a content variable.
#' @return Returns a table with the predicted protein functions.
#'
#' @importFrom magrittr %>%
#'
#' @export
#' @examples
#' make_protein_function_predictions_table(input = list(content = 'ROCK1'))
#' make_protein_function_predictions_table(input = list(content = c('ROCK1', 'ROCK2')))
make_protein_function_predictions_table <- function(input = list()) {
predicted_functions <- get_data_object(object_names = input$content,
dataset_name = "protein_function_predictions",
pivotwider = TRUE) %>%
dplyr::mutate(Pval = as.numeric(Pvalue), FDR = as.numeric(AdjPvalue)) %>%
dplyr::mutate_if(is.numeric, ~ signif(., digits = 3)) %>%
dplyr::select(Query = id, `Predicted Function` = Function, Pval, FDR)

return(predicted_functions)
}

## GET CLUSTER -----------------------------------------------
#' Clustering Table
#'
Expand Down
1 change: 0 additions & 1 deletion man/make_cluster_enrichment_table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions man/make_protein_function_predictions_table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3ec6bee

Please sign in to comment.