IBDsegmentList-class {hapFabia} | R Documentation

## IBDsegmentList instances and methods

### Description

`IBDsegmentList` is a class to store a list of IBD segments with its statistics. Lists can be merged or analyzed in subsequent steps.

### Usage

    ## S4 method for signature 'IBDsegmentList'
    plot(x, ... )

    ## S4 method for signature 'IBDsegmentList'
    summary(object, ...)

### Arguments

`x` | object of the class `IBDsegment`.
`object` | object of the class `IBDsegment`.
`...` | further arguments. PLOT: `filename` is the name of the file that contains the genotyping data used for plotting. The name is required for the call of `readSamplesSpfabia` from the package fabia to read genotype data for the plot. ATTENTION: `filename` without file type ".txt"!

### Details

Plot

  Plots all IBD segments of an IBD segment list, where the SNVs within the cluster are shown. In the plot the $y$-axis gives the individuals or the chromosomes and the $x$-axis consecutive SNVs. Minor alleles of tagSNVs are marked by a particular color. Minor alleles of other SNVs (private, common, from other clusters, etc) are marked by a different color. The model from fabia is also shown. The default color coding uses yellow for major alleles, violet for minor alleles of tagSNVs, and blue for minor alleles of other SNVs. `model L` indicates tagSNVs identified by hapFabia in violet. Asks for the next plot by pushing a key.

Summary

  Prints the number of IBD segments in the list and some statistics if available.

Implementation in R.

### Value

`` | no value.

### Slots

Objects of class `IBDsegmentList` have the following slots:

`IBDsegments`:

  List of IBD segments.

`lengthList`:

  Number of IBD segments in the list.

`statistics`:

  Statistics of IBD segments like average length, average number of individuals belonging to an IBD segment, average number of tagSNVs of an IBD segment, etc.

### Constructor

Constructor of class IBDsegmentList.

`IBDsegmentList(IBDsegments=list(),lengthList=0,statistics=list())`

### Accessors

In the following `x` denotes an IBDsegmentList object.

  `IBDsegments(x)`, `IBDsegments(x) <- value`: Returns or sets `IBDsegments`, where the return value and `value` are both a list.

  `lengthList(x)`, `lengthList(x) <- value`: Returns or sets `lengthList`, where the return value and `value` are both a number.

  `statistics(x)`, `statistics(x) <- value`: Returns or sets `statistics`, where the return value and `value` are both a list.

  `x[[i]]`, `x[[i]] <- value`: Returns or sets an entry in the list `x`, where the return value and `value` are both an instance of the class `IBDsegment`.

  `x[i]`, `x[i] <- value`: Returns or sets a sublist of the list `x`, where the return value and `value` are both an instance of the class `IBDsegmentList`.

### Signatures

plot

  `signature(x = "IBDsegmentList", y = "missing")`

Plotting all IBD segments of the list using an interactive command.

summary

  `signature(object = "IBDsegmentList")`

Summary of a list of IBD segments, where the number of clusters and a statistics are given.

### Functions that return objects of this class

IBDsegmentList objects are returned by `fabia`, `fabias`, `fabiap`, `fabiasp`, `mfsc`, `nmfsc`, `nmfdiv`, and `nmfeu`.

### Extension to store results of other methods

The class `IBDsegmentList` may contain the result of different matrix factorization methods. The methods may be generative or not.

Methods my be "singular value decomposition" (M contains singular values as well as avini, L and Z are orthonormal matrices), "independent component analysis" (Z contains the projection/sources, L is the mixing matrix, M is unity), "factor analysis" (Z contains factors, L the loadings, M is unity, U the noise, Psi the noise covariance, lapla is a variational parameter for non-Gaussian factors, avini and ini are the information the factors convey about the observations).

### Author(s)

Sepp Hochreiter

### References

S. Hochreiter et al., ‘FABIA: Factor Analysis for Bicluster Acquisition’, Bioinformatics 26(12):1520-1527, 2010.

### See Also

`IBDsegment-class`, `IBDsegmentList-class`, `analyzeIBDsegments`, `compareIBDsegmentLists`, `extractIBDsegments`, `findDenseRegions`, `hapFabia`, `hapFabiaVersion`, `hapRes`, `chr1ASW1000G`, `IBDsegmentList2excel`, `identifyDuplicates`, `iterateIntervals`, `makePipelineFile`, `matrixPlot`, `mergeIBDsegmentLists`, `mergedIBDsegmentList`, `plotIBDsegment`, `res`, `setAnnotation`, `setStatistics`, `sim`, `simu`, `simulateIBDsegmentsFabia`, `simulateIBDsegments`, `split_sparse_matrix`, `toolsFactorizationClass`, `vcftoFABIA`

### Examples

    data(hapRes)

    mergedIBDsegmentList <-
       hapRes$mergedIBDsegmentList

    # Summary method
    summary(mergedIBDsegmentList)

    # Accessors
    lengthList(mergedIBDsegmentList)

    statistics(mergedIBDsegmentList)

    summary(IBDsegments(mergedIBDsegmentList))

    # Subsets

    summary(mergedIBDsegmentList[[1]])

    summary(mergedIBDsegmentList[1])

    mergedIBDsegmentList[[2]] <-
       mergedIBDsegmentList[[1]]
    mergedIBDsegmentList[[3]] <-
       hapRes$mergedIBDsegmentList2[[1]]

    summary(mergedIBDsegmentList)

    # mergedIBDsegmentList[c(3,4)] <-
    #    mergedIBDsegmentList[c(1,2)]
    # summary(mergedIBDsegmentList)

[Package hapFabia version 1.36.0 Index]