Contains fields storing data and methods to get, process and visualize fCNA information. Examples please see gcap.ASCNworkflow().

Public fields

data

a data.table storing fCNA list, which typically contains following columns:

  • sample sample or case ID.

  • band chromosome cytoband.

  • gene_id gene ID, typically Ensembl ID. You can convert the ID with R package IDConverter.

  • total_cn total copy number value.

  • minor_cn copy number value for minor allele.

  • prob the probability the gene located in circular DNA.

  • gene_class gene level amplicon classification.

sample_summary

a data.table storing sample summary data, which typically contains at least the following columns:

  • sample sample or case ID. Should only include cases have been called with GCAP workflow, otherwise the extra cases would be automatically classified as 'nofocal' (i.e. NA in sample_summary field) class.

  • purity, ploidy for tumor purity or ploidy.

  • AScore aneuploidy score.

  • pLOH genome percentage harboring LOH events.

  • CN1 ... CN19 activity of copy number signatures.

  • class the sample class based on amplicon type.

  • ec_genes number of genes predicted as located on circular DNA.

  • ec_possibly_genes same with ec_genes but with less confidence.

  • ec_cytobands number of cytobands predicted as located on circular DNA. (the regions of ec_possibly_genes are not included in computation)

Active bindings

min_prob

check $new() method for details. If you updated this value, a function will be called to update the sample summary.

Methods


Method new()

Create a fCNA object. Typically, you can obtain this object from gcap.workflow() or gcap.ASCNworkflow().

Usage

fCNA$new(
  fcna,
  pdata = fcna[, "sample", drop = FALSE],
  min_prob = 0.6,
  only_oncogenes = FALSE,
  genome_build = c("hg38", "hg19", "mm10")
)

Arguments

fcna

a data.frame storing focal copy number amplicon list.

pdata

a data.frame storing phenotype or sample-level related data. (Optional)

min_prob

the minimal aggregated (in cytoband level) probability to determine a circular amplicon.

only_oncogenes

only_oncogenes if TRUE, only known oncogenes are kept for circular prediction.

genome_build

genome version


Method subset()

Return a subset fCNA object

Usage

fCNA$subset(..., on = c("data", "sample_summary"))

Arguments

...

subset expressions on fCNA$data or fCNA$sample_summary.

on

if it is "data", subset operations are on data field of fCNA object, same for "sample_summary".

Returns

a fCNA


Method getSampleSummary()

Get sample summary of fCNA

Usage

fCNA$getSampleSummary(
  only_oncogenes = FALSE,
  genome_build = c("hg38", "hg19", "mm10")
)

Arguments

only_oncogenes

only_oncogenes if TRUE, only known oncogenes are kept for circular prediction.

genome_build

genome version.

Returns

a data.table


Method getGeneSummary()

Get gene level summary of fCNA type

Usage

fCNA$getGeneSummary(return_mat = FALSE)

Arguments

return_mat

if TRUE, return a cytoband by sample matrix instead of a summary.

Returns

a data.table or a matrix.


Method getCytobandSummary()

Get cytoband level summary of fCNA type

Usage

fCNA$getCytobandSummary(unique = FALSE, return_mat = FALSE)

Arguments

unique

if TRUE, count sample frequency instead of gene frequency.

return_mat

if TRUE, return a cytoband by sample matrix instead of a summary.

Returns

a data.table


Method saveToFiles()

Save the key data to local files

Usage

fCNA$saveToFiles(dirpath, fileprefix = "fCNA")

Arguments

dirpath

directory path storing output files.

fileprefix

file prefix. Two result files shall be generated.


Method convertGeneID()

Convert Gene IDs between Ensembl and Hugo Symbol System

Usage

fCNA$convertGeneID(
  type = c("ensembl", "symbol"),
  genome_build = c("hg38", "hg19", "mm10")
)

Arguments

type

type of input IDs, could be 'ensembl' or 'symbol'.

genome_build

reference genome build.


Method print()

print the fCNA object

Usage

fCNA$print(...)

Arguments

...

unused.