Merges two scMethrix objects by row or col
merge_scMethrix( scm1 = NULL, scm2 = NULL, by = c("row", "column"), verbose = TRUE )
| scm1 |
|
|---|---|
| scm2 |
|
| by | string; Merge by 'columns' or 'rows' |
| verbose | boolean; Flag for outputting function status messages. Default = TRUE |
A merged scMethrix object
Merges the assay data from two scMethrix objects. Assays not shared between assays will be dropped, as well as all reduced dimensionality data.
Requirements for merging
If merging by rows, all CpG sites must be unique and samples must be identical
If merging by columns, all samples must be unique and CpG sites must be identical
Metadata will be retained in certain situations:
For row merges:
- Ranges metadata (mcols()) will be merged, with missing columns in either assay filled with NAs
- Sample metadata (colData()) will attempt to be merged. Overlapping, non-identical columns will be appended with .1 and .2.
For row merges:
- Ranges metadata (mcols()) will attempt to be merged. Overlapping, non-identical columns will be appended with .1 and .2.
- Sample metadata (colData()) will be merged, with missing columns in either assay filled with NAs
For both merges:
- Experiment metadata (metadata()) will attempt to be merged. Overlapping, non-identical elements will be appended with .1 and .2.
Custom experiment metadata can manually be added via metadata() <-, or to rowRanges via mcols() <-.
#>#>#> An object of class scMethrix #> n_CpGs: 10 #> n_samples: 4 #> assays: score, counts #> reduced dims: #> is_h5: FALSE #> Reference: hg19 #> Physical size: 30.9 Kbmerge_scMethrix(scMethrix_data[,1:2],scMethrix_data[,3:4],by="col")#>#>#> An object of class scMethrix #> n_CpGs: 286 #> n_samples: 4 #> assays: score, counts #> reduced dims: #> is_h5: FALSE #> Reference: hg19 #> Physical size: 47 Kb