View source: R/format_query_table.R
format_query_res | R Documentation |
Used to get unfiltered query table from downloaded perturbation query result. A condensed top-hits is shown in the web app for performance reasons.
format_query_res(
query_res,
drug_study,
sort_by = c("avg_cor", "min_cor"),
direction = c("opposing", "similar", "both"),
sort_abs = FALSE,
show_clinical = TRUE,
min_signatures = 3,
cells = NULL
)
query_res |
Numeric vector of correlation values with names as HGNC symbols |
drug_study |
Queried database giving rise to |
sort_by |
Metric to sort by. Either |
direction |
Direction of correlation to sort results by. One of |
sort_abs |
Should results be sorted based on absolute correlation? Default is |
show_clinical |
Should result only contain drugs with clinical phase annotation? Default is |
min_signatures |
Number of independent perturbagen signatures below which a perturbation is excluded. Default is |
cells |
Character vector of cell types to include. Default ( |
data.frame
with annotated, filtered, and sorted query result.
# generate fake result
annot <- dseqr:::get_drugs_table('L1000_drugs')
query_res <- rnorm(nrow(annot), 0, 0.25)
names(query_res) <- annot$title
formatted <- dseqr:::format_query_res(query_res, 'L1000 Drugs', sort_by = 'min_cor')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.