Description Usage Arguments Details Value Author(s) Examples
View source: R/data_handling_functions.R
Write the resulting significant pairs tibble to disk as a tab-separated file.
1 | write_res_pairs_to_disk(sig_pairs, avg_rates_m, tsv_file, num_digits = 2)
|
sig_pairs |
The tibble containing the significant pairs of mutated genes/pathways. |
avg_rates_m |
The average rates of clonal exclusivity for each patient. The name of each rate is the respective patient identifier. |
tsv_file |
The path to the tsv-file to which the results should be written. |
num_digits |
The number of digits after the comma of the average rate m, the p-value and the q-value (adjusted p-value). Default: 2. |
After having extracted the significant pairs. The tibble can be saved as a tab-separated file. It is assumed that the input tibble has the columns 'hgnc_gene_A', 'hgnc_gene_B', 'pval', 'qval', 'mutated_in', 'clonally_exclusive_in'.
The tibble that is written to disk. It has the columns 'Gene A', 'Gene B', 'P-value', 'Adjusted p-value', 'Mutated in (rate)', 'Clonally exclusive in'.
Ariane L. Moore
1 2 3 4 5 6 7 8 9 10 | sig_pairs <- dplyr::tibble(hgnc_gene_A=c("VHL", "BAP1"),
hgnc_gene_B=c("PTEN", "KIT"),
pval=c(0.001, 0.002),
qval=c(0.01, 0.02),
mutated_in=c("pat1; pat2", "pat1; pat2"),
clonally_exclusive_in=c("pat1; pat2",
"pat2"))
avg_rates_m <- c(pat1=0.0034, pat2=0.0021)
write_res_pairs_to_disk(sig_pairs, avg_rates_m, "test.tsv")
file.remove("test.tsv")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.