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 |
panel.id |
Character, Tapestri panel ID, either CO261, CO293, CO610, or |
get.cytobands |
Logical, if |
genome |
Character, reference genome for pulling cytoband coordinates and chromosome arm labels (see |
move.non.genome.probes |
Logical, if |
filter.variants |
Logical, if |
verbose |
Logical, if |
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
-
barcodeProbe
= "not specified" -
grnaProbe
= "not specified"
CO293
-
barcodeProbe
= "AMPL205334" -
grnaProbe
= "AMPL205666"
CO610
-
barcodeProbe
= "CO610_AMP351" -
grnaProbe
= "CO610_AMP350"
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.
Probe panel metadata stored in the
.h5
file are copied torowData
.Basic QC stats (e.g. total number of reads per probe) are added to
rowData.
Basic QC stats (e.g. total number of reads per cell barcode) are added to
colData.
Experiment-level metadata is stored in
metadata
.
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)