initialOrder {methylscaper} | R Documentation

## Ordering the molecules/reads

### Description

This function performs the weighted seriation procedure described in the methylscaper manuscript if the method is set to "PCA". The data may also be ordered using a given seriation method from the seriation R package. The weighting is done between a designated start and end base pair chosen by the user, and the weight can be done on the endogenous methylation or the accessibility.

### Usage

    initialOrder(
      dataIn,
      Method = "PCA",
      weightStart = NULL,
      weightEnd = NULL,
      weightFeature = "red",
      updateProgress = NULL
    )

### Arguments

`dataIn` | A list object containing two elements labelled gch and hcg (already pre-processed.)
`Method` | Indicates the seriation method to use. The default option is "PCA", which orders the data using a weighted first principal component approach. Any seriation method provided in the `seriation` package is also valid input.
`weightStart` | Index of the first column used in the weighted seriation.
`weightEnd` | Index of the last column used in the weighted seriation.
`weightFeature` | Indicates whether to weight the GCH or HCG data. Valid input to weight the GCH is 'gch', 'acc', or 'yellow'. To weight the HCG, valid input for this option is 'hcg', 'met', or 'red'.
`updateProgress` | A function to handle the progress bar for the Shiny app. Should not be used when using the function independently.

### Value

An object of class `orderObject`, which contains the generated ordering ($order1) and a clean data matrix ($toClust) to be passed into the plotting function plotSequence().

### Examples

    data(singlemolecule_example)

    orderObj <- initialOrder(singlemolecule_example)

[Package methylscaper version 1.2.0 Index]