Learn R Programming

RCNA (version 1.0)

estimate_feature_score: estimate_feature_score: Estimate CNV score for each gene in the annotation file

Description

This function estimates the the CNA score for each feature in the annotation file. It creates two flat file text tables with a row for each feature, which is placed in the output directory under `/score` - one with the score filter applied and one with all score results reported.

This function estimates the the CNA score for each feature in the annotation file. It creates two flat file text tables with a row for each feature, which is placed in the output directory under `/score` - one with the score filter applied and one with all score results reported.

Usage

estimate_feature_score(obj, ...)

# S3 method for default estimate_feature_score( obj = NULL, df = NULL, sample.names = NULL, ano.file, out.dir = NULL, ncpus = 1, file.score.coverage = NULL, score.cutoff = 0.5, low.score.cutoff = NULL, high.score.cutoff = NULL, verbose = FALSE, ... )

# S3 method for RCNA_object estimate_feature_score(obj, verbose = FALSE, ...)

Value

A RCNA_analysis class object that describes the input parameters and output files generated by this step of the workflow.

A RCNA_analysis class object that describes the input parameters and output files generated by this step of the workflow.

A RCNA_analysis class object that describes the input parameters and output files generated by this step of the workflow.

Arguments

obj

A RCNA_object type object - parameters will be pulled from the object instead, specifically from the `scoreParams` slot.

...

Additional arguments (unused)

df

Path to the config file, or a `data.frame` object containing the valid parameters. Valid column names are `file.score.coverage` and `sample.names`. Additional columns will be ignored.

sample.names

Character vector of sample names. Alternatively can be specified in `df`.

ano.file

Location of the annotation file. This file must be in CSV format and contain the following information (with column headers as specified): "feature,chromosome,start,end".

out.dir

Output directory for results. A subdirectory for results will be created under this + `/nkr/`.

ncpus

Integer number of CPUs to use. Specifying more than one allows this function to be parallelized by feature.

file.score.coverage

Character vector listing the input coverage files. Must be the same length as `sample.names`. Alternatively can be specified in `df`.

score.cutoff

Numeric between 0 and 1 which specifies the score filter on the results file. This parameter creates a symmetrical cutoff around 0, filtering all results whose absolute value is less than the specified value. Non-symmetrical cutoffs can be specified using `low.score.cutoff` and `high.score.cutoff`.

low.score.cutoff

Numeric between 0 and 1 which specifies the lower score cutoff. Defaults to `score.cutoff` if not specified.

high.score.cutoff

Numeric between 0 and 1 which specifies the upper score cutoff. Defaults to `score.cutoff` if not specified.

verbose

If set to TRUE will display more detail

Details

This function can be run as a stand-alone or as part of run_RCNA.

The `df` argument corresponds to the `scoreParams` matrix on RCNA_object. Valid column names are `sample.names` and `file.score.coverage`. Additional columns will be ignored.

For more parameter information, see estimate_feature_score.default.

See Also

RCNA_object, RCNA_analysis, run_RCNA

Examples

Run this code
## Estimate feature scores on example object
# See \link{example_obj} for more information on example
example_obj@ano.file <- system.file("examples" ,"annotations-example.csv", package = "RCNA")
example_obj
# Create output directories
dir.create(file.path("output", "score"), recursive = TRUE)
# Copy example GC-corrected coverage files
cov.corrected <- system.file("examples", "gc", package = "RCNA")
file.copy(from = cov.corrected, to = "output", recursive = TRUE)
# Copy example NKR results for "feature_a"
nkr.res <- system.file("examples", "nkr", package = "RCNA")
file.copy(from = nkr.res, to = "output", recursive = TRUE)
# Run score estimation for "feature_a" and append results
estimate_feature_score_analysisObj <- estimate_feature_score(example_obj)
example_obj@commands <- c(example_obj@commands, estimate_feature_score_analysisObj)
system("rm -rf output")

Run the code above in your browser using DataLab