init | R Documentation |
Creates a CNAqc object from a set of mutations (SNVs or indels), allele-specific copy numbers and a tumour purity value. The resulting object retains the input mutations that map on top of the copy number segments, and allows for the computation of the QC metrics available in the CNAqc package.
Genomic coordinates in relative (per-chromosome) format are transformed into absolute coordinates by means of a reference genome providing the length of each chromosome. CNAqc supports 'hg19'/'GRCh37' and 'hg38'/'GRCh38' references, which are embedded into the package as 'CNAqc::chr_coordinates_hg19' and 'CNAqc::chr_coordinates_GRCh38'. An abitrary reference can also be provided it is stored in am equivalent format.
init(mutations, snvs = NULL, cna, purity, sample = "MySample", ref = "GRCh38")
mutations |
A dataframe of mutations with the following fields: * 'chr' chromosome name, e.g., Optionally, driver mutations can be annotated. In this case the input dataframe needs to report: * 'is_driver' a boolean flag for the driver status; * 'driver_label' the driver label that will appear in each plot, e.g., 'BRAV V600E'. |
snvs |
Deprecated parameter. |
cna |
A dataframe of allele-specific copy number with the following fields: * 'chr' chromosome name, e.g., If the 'CCF' value is present and equal to 1, a segment is considered clonal, otherwise subclonal. If a segment is subclonal: * the columns 'Major' and 'minor' are interpreted as those for a subclone with proportion equal to the 'CCF' value; * the columns 'Major_2' and 'minor_2' are interpreted as those for a second subclone with proportion equal to the '1 - CCF' value; |
purity |
Value in between '0' and '1' to represent the proportion of actual tumour content (sometimes called "cellularity"). |
sample |
Sample name (a string). |
ref |
A key word for the used reference coordinate system. CNAqc supports 'hg19'/'GRCh37' and 'hg38'/'GRCh38' references, which are embedded into the package as 'CNAqc::chr_coordinates_hg19' and 'CNAqc::chr_coordinates_GRCh38'. An abitrary reference can also be provided if 'ref' is a dataframe in the same format as 'CNAqc::chr_coordinates_hg19' or 'CNAqc::chr_coordinates_GRCh38'. The default reference is 'GRCh38'. |
A CNAqc object of class 'cnaqc', with S3 methods for printing, plotting and analyzing data.
# Example input data released with the package
data('example_dataset_CNAqc', package = 'CNAqc')
print(example_dataset_CNAqc)
# Note the outputs to screen
x = init(mutations = example_dataset_CNAqc$mutations, cna = example_dataset_CNAqc$cna, purity = example_dataset_CNAqc$purity)
# An S3 method can be used to report to screen what is in the object
print(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.