# run_alignment_by_2D

Source: `R/run_alignment_by_2D.R`
`run_alignment_by_2D.Rd`

Correct batch effects.

    run_alignment_by_2D(
      object,
      quantile = 0.95,
      K = 30,
      selected = NULL,
      Nclust = NULL,
      steps = 20,
      gra_steps = 10,
      NCell = 100
    )

## Arguments

object | A dmatch class object.
quantile | The minimum number of the data points regarded as good points.
K | The number of PCs for correcting batch effects, default is 30.
selected | The clusters which are used as anchors to study batch effects.
NCell | The smallest number of cells that a selected cluster (as anchors) should have. Default is 100, and recommend no less than 5 percent of the sample size.

## Value

A dmatch class object which has slots storing raw.data, batch.id, PCA, and more information. Specfically, run_alignment_by_2D.results slot stores information for the reference sample, the original and corrected version of the other sample, and the celltype labels for both samples.