write_res_pairs_to_disk: Write resulting significant pairs to disk

Description Usage Arguments Details Value Author(s) Examples

View source: R/data_handling_functions.R

Description

Write the resulting significant pairs tibble to disk as a tab-separated file.

Usage

1
write_res_pairs_to_disk(sig_pairs, avg_rates_m, tsv_file, num_digits = 2)

Arguments

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.

Details

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'.

Value

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'.

Author(s)

Ariane L. Moore

Examples

 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")

GeneAccord documentation built on Nov. 8, 2020, 8:04 p.m.