createTapestriExperiment {karyotapR}R Documentation

Create TapestriExperiment object from Tapestri Pipeline output

Description

createTapestriExperiment() constructs a TapestriExperiment container object from data stored in the .h5 file output by the Tapestri Pipeline. Read count matrix (probe x cell barcode) is stored in the "counts" assay slot of the top-level experiment. Allele frequency matrix (variant x cell barcode) is stored in the "alleleFrequency" assay slot of the "alleleFrequency" altExp (alternative experiment) slot. panel.id is an optional shortcut to set special probe identities for specific custom panels.

Usage

createTapestriExperiment(
  h5.filename,
  panel.id = NULL,
  get.cytobands = TRUE,
  genome = "hg19",
  move.non.genome.probes = TRUE,
  filter.variants = TRUE,
  verbose = TRUE
)

Arguments

h5.filename

File path for .h5 file from Tapestri Pipeline output.

panel.id

Character, Tapestri panel ID, either CO261, CO293, CO610, or NULL. Initializes barcodeProbe and grnaProbe slots. Default NULL.

get.cytobands

Logical, if TRUE (default), retrieve and add chromosome cytobands and chromosome arms to rowData (probe metadata).

genome

Character, reference genome for pulling cytoband coordinates and chromosome arm labels (see getCytobands()). Only "hg19" (default) is currently supported.

move.non.genome.probes

Logical, if TRUE (default), move counts and metadata from non-genomic probes to altExp slots (see moveNonGenomeProbes()).

filter.variants

Logical, if TRUE (default), only stores variants that have passed Tapestri Pipeline filters.

verbose

Logical, if TRUE (default), metadata is output in message text.

Value

TapestriExperiment object containing data from Tapestri Pipeline output.

Panel ID Shortcuts

panel.id is an optional shortcut to set the barcodeProbe and grnaProbe slots in TapestriExperiment for specific custom Tapestri panels.

CO261

CO293

CO610

Automatic Operations

Raw Data

Read count and allele frequency matrices are imported to their appropriate slots as described above. filter.variants == TRUE (default) only loads allele frequency variants that have passed internal filters in the Tapestri Pipeline. This greatly reduces the number of variants from tens of thousands to hundreds of likely more consequential variants, saving RAM and reducing operation time.

Metadata

Several metadata sets are copied or generated and then stored in the appropriate TapestriExperiment slot during construction.

Optional Operations

Two additional major operations are called by default during TapestriExperiment construction for convenience. get.cytobands == TRUE (default) calls getCytobands(), which retrieves the chromosome arm and cytoband for each probe based on stored positional data and saves them in rowData. Some downstream smoothing and plotting functions may fail if chromosome arms are not present in rowData, so this generally should always be run. move.non.genome.probes calls moveNonGenomeProbes(), which moves probes corresponding to the specified tags to altExp (alternative experiment) slots in the TapestriExperiment object. The exception is probes on chromosome Y; CNVs of chrY are more rare, so we move it to an altExp for separate analysis. Probes corresponding to the barcodeProbe and grnaProbe slots, which are specified by the panel.id shortcut or manually (see Custom Slot Getters and Setters), are automatically moved to altExp by this operation as well. If such probes are not present, the function will only generate a warning message, so it is always safe (and recommended) to run by default. Any remaining probes that are not targeting a human chromosome and are not specified by the shortcut tags are moved to the otherProbeCounts slot.

See Also

moveNonGenomeProbes(), getCytobands(), which are run as part of this function by default.

Examples

## Not run: 
tapExperiment <- createTapestriExperiment("myh5file.h5", "CO293")

## End(Not run)

[Package karyotapR version 1.0.1 Index]