ICAMS (version 2.0.7)

TransformCatalog: Transform between counts and density spectrum catalogs and counts and density signature catalogs.

Description

Transform between counts and density spectrum catalogs and counts and density signature catalogs.

Usage

TransformCatalog(catalog, target.ref.genome = NULL,
  target.region = NULL, target.catalog.type = NULL,
  target.abundance = NULL)

Arguments

catalog

An SBS or DBS catalog as described in ICAMS; must not be an ID (indel) catalog.

target.ref.genome

A ref.genome argument as described in ICAMS. If NULL, then defaults to the ref.genome attribute of catalog.

target.region

A region argument; see as.catalog and ICAMS. If NULL, then defaults to the region attribute of catalog.

target.catalog.type

A character string acting as a catalog type identifier, one of "counts", "density", "counts.signature", "density.signature"; see as.catalog. If NULL, then defaults to the catalog.type attribute of catalog.

target.abundance

A vector of counts different source K-mer sequences for mutations. See all.abundance. If NULL, then the function attempt to infer the target.abundace from the class of catalog and the values of the target.ref.genome, target.region, and target.catalog.type. It is an error if the inferred abundance is different from an non-NULL target.abundance.

Value

A catalog as defined in ICAMS.

Details

Only the following transformations are legal:

  1. counts -> counts (used to transform between the source abundance and target.abundance)

  2. counts -> density

  3. counts -> (counts.signature, density.signature)

  4. density -> counts (the semantics are to infer the genome-wide or exome-wide counts based on the densities)

  5. density -> density (a null operation, generates a warning)

  6. density -> (counts.signature, density.signature)

  7. counts.signature -> counts.signature (used to transform between the source abundance and target.abundance)

  8. counts.signature -> density.signature

  9. counts.signature -> (counts, density) (generates an error)

  10. density.signature -> density.signature (a null operation, generates a warning)

  11. density.signature -> counts.signature

  12. density.signature -> (counts, density) (generates an error)

Examples

Run this code
# NOT RUN {
file <- system.file("extdata",
                    "strelka.regress.cat.sbs.96.csv",
                    package = "ICAMS")
catSBS96.counts <- ReadCatalog(file, ref.genome = "hg19", 
                               region = "genome",
                               catalog.type = "counts")
catSBS96.density <- TransformCatalog(catSBS96.counts,
                                     target.ref.genome = "hg19",
                                     target.region = "genome",
                                     target.catalog.type = "density")
# }

Run the code above in your browser using DataCamp Workspace