SNPhood-class {SNPhood} | R Documentation

## A class to represent, investigate, quantify and visualise the epigenomic neighbourhood of SNPs using NGS data

### Description

The class `SNPhood` stores read count-derived information from NGS files for a set of genomic regions of interest as well as associated metadata. It may additionally contain results of various subsequent analyses and statistical tests. See the description below or the Vignette for more details.

### Slots

`annotation`

  Named list. Contains various annotation and metadata such as:

  - `regions`: An object of class `GenomicRanges` that contains the user regions, including annotation and the position of the original user-provided position before creating regions and bins.

  - `genotype`: A list one or two elements, both of which contain genotype-related information, either directly from the sequencing reads or externally derived from a VCF file using the function `associateGenotypes`.

  - `readGroups`: The names of the read groups that are currently defined.

  - `files`: Contains a named list with additional information about each processed file, such as type(`signal` or `input`), `files`(a vector of one or multiple filenames), and `composite`(`TRUE` or `FALSE`, indicating if this is a composite file from multiple individual files)

  Elements from this slot can be retrieved with the accessor function `annotation`.

`config`

  Named list. Named list with the parameters as specified in the parameter list and additionally the specific parameters the function `analyzeSNPhood` was called with (such as `onlyPrepareForDatasetCorrelation` and `input`). Elements from this slot can be retrieved with the accessor function `parameters`.

`readCountsUnbinned`

  Named list (nested). Contains vectors of raw reads counts for each user region (before binning). The names of the list are the read groups and the filenames of the annotated datasets. Elements from this slot can be retrieved with the accessor function `counts` using `type` = "unbinned".

`readCountsBinned`

  Named list (nested). Each element contains a matrix of raw reads counts per user region and bin (i.e., after binning). The names of the list are the read groups and the filenames of the annotated datasets. Contains the raw read counts if normalization among all datasets ha sbeen performed (parameter `normAmongEachOther` is set to FALSE) and normalized read counts otherwise.
  If read counts are recorded allele-specifically (in the following snippet paternal, maternal and ambiguous) for each group, the structure therefore may look like this:

  - `paternal`:

    - `dataset ID 1`: Matrix of read counts for each user region across bins

    - `dataset ID 2`: Matrix of read counts for each user region across bins

    - ...

  - `maternal`: See read group paternal, identical structure

  - `ambiguous`: See read group paternal, identical structure

`enrichmentBinned`

  Named list. See the description for the slot `readCountsBinned`, with the only difference that this slot contains the enrichment after normalizing with an input rather than the read counts. If input normalization is turned off, this slot is empty.

`additionalResults`

  Named list. Contains additional information from subsequent analyses such as allelic bias tests or results of the genotype analysis. Initially empty. Different functions write the results in this slot. Elements from this slot can be retrieved with the accessor function `results`.

### Constructors

Currently, a `SNPhood` object can only be constructed by executing the main function of the package, `analyzeSNPhood`.

### Accessors

In the following code snippets, `SNPhood.o` is a `SNPhood` object and `readGroupCur` and `datasetCur` a particular read group and dataset as defined in `SNPhood.o`, respectively.

# Get general annotation of a SNPhood object

`annotation(SNPhood.o)`: Get the annotation information, a nested list with multiple components (see names(annotation(SNPhood.o))).

# Get more specific annotation such as number and annotation of regions, datasets, bins, and read groups

`nRegions(SNPhood.o)`: Get the number of user regions.

`nDatasets(SNPhood.o)`: Get the number of datasets.

`nBins(SNPhood.o)`: Get the number of bins.

`nReadGroups(SNPhood.o)`: Get the number of read groups.

`annotationRegions(SNPhood.o)`: Get the annotation of user regions.

`annotationDatasets(SNPhood.o)`: Get the annotation of datasets.

`annotationBins(SNPhood.o)`: Get the annotation of bins.

`annotationReadGroups(SNPhood.o)`: Get the annotation of read groups.

# Get the parameters that were used for the analysis

`parameters(SNPhood.o)`: Get the parameter information, a nested list with multiple components (see names(parameters(SNPhood.o))).

# Get counts before binning

`counts(SNPhood.o, type = "unbinned", readGroup = readGroupCur, dataset = datasetCur)`: Get the counts for each user region before binning. See ?counts for more details.

# If applicable, get counts after binning

`counts(SNPhood.o, type = "binned", readGroup = readGroupCur, dataset = datasetCur)`: Get the counts for each user region after binning. See ?counts for more details.

# If applicable, get enrichment after binning

`enrichment(SNPhood.o, type = "binned", readGroup = readGroupCur, dataset = datasetCur)`: Get the enrichment for each user region after binning. See ?enrichment for more details.

In addition, see the workflow vignette (browseVignettes(\"SNPhood\") for a full workflow that uses all accessors.

[Package SNPhood version 1.18.0 Index]