diffdriver.RdThis function runs diffDriver.
diffdriver(
gene,
mut,
pheno,
covariates = NULL,
anno_dir = ".",
k = 6,
totalnttype = 96,
BMRmode = c("signature", "regular"),
output_dir = ".",
output_prefix = "diffdriver_results"
)A vector of genes to be included in the analysis.
A data frame containing all somatic mutations from the cohort. The format is:
<int>
<int>
<chr>
<chr>
<chr>
Example:
Chromosome Position Ref Alt SampleID
1 19 55653236 C T TCGA-N6-A4VE-01A-11D-A28R-08
A data frame containing sample phenotypes. The format is: #'
<chr>
<dbl>
<dbl>
...
Example:
SampleID SmokingCessation BMI
TCGA-N5-A4R8-01A-11D-A28R-08 0.5319630 20.0
TCGA-N5-A4RD-01A-11D-A28R-08 0.0448991 24.4
Optional sample-level covariates (e.g. age, sex) to adjust for.
Either a path to a delimited file or a data frame. It must contain a SampleID
column plus one or more covariate columns, which may be numeric or categorical
(categorical columns are expanded into dummy variables). Only samples with complete
covariate information are kept, and these are intersected with the mutation and
phenotype samples. When supplied, the covariates are added to the regression inside
ddmodel/ddmodel_nl under both the null and alternative models, so the
phenotype effect is tested conditional on the covariates. The format is:
<chr>
<dbl> or <chr>
<dbl> or <chr>
...
Example:
SampleID Age Sex
TCGA-N5-A4R8-01A-11D-A28R-08 56 M
TCGA-N5-A4RD-01A-11D-A28R-08 63 F
The default is NULL (no covariates).
The path to the directory with all the annotation files. Please download from Zenodo.The default is current folder
The number of topics used in modeling background mutation rate. The default is 6.
either 9 or 96. Will look for annotation files anno9_ntypexxx_annodata.txt when totalnttype is 9 or anno96_ntypexxx_annodata when totalnttype is 96.
There are two modes to run diffdriver. One is "signature", this will model individual level BMR, this is the default. The second one is "regular", this assumes BMR is the same across individuals, only models position-level difference.
The path to output directory
The prefix being added to the output file names.