Maintainers
Pricing
Enterprise
More
More
Documentation
Try Live
Rankings
Install
Blog
Docs7
Ask
New
Add Docs
Single-cell Contamination Detection and Correction
https://github.com/zju-uoe-ccw-lab/sccdc
Admin
single-cell Contamination Detection and Correction
Tokens:
588
Snippets:
5
Trust Score:
2.3
License:
GPL-3.0
Update:
1 year ago
Context
Chat
Benchmark
Latest
Show doc for...
Code
Info
Show Results
Tokens:
Raw
Copy
Link
Tokens:
Raw
Copy
Link
### Installing scCDC from GitHub in R Source: https://github.com/zju-uoe-ccw-lab/sccdc/blob/main/README.md This snippet demonstrates how to install the `scCDC` package directly from its GitHub repository in R. It first checks for the `devtools` package, installing it if necessary, and then uses `devtools::install_github` to install `scCDC`. This is a prerequisite for using the scCDC algorithm. ```R if(!require("devtools", quietly = TRUE)){ install.packages("devtools") } library(devtools) install_github("ZJU-UoE-CCW-LAB/scCDC") ``` -------------------------------- ### Installing Seurat V5 in R Source: https://github.com/zju-uoe-ccw-lab/sccdc/blob/main/README.md This code snippet shows how to install version 5 of the `Seurat` package in R. `Seurat` is a critical dependency for `scCDC`, as the current version of `scCDC` is built upon `Seurat` V5. This installation ensures compatibility and provides the necessary data structures for scCDC operations. ```R install.packages('Seurat') ``` -------------------------------- ### Accessing scCDC Package Vignettes in R Source: https://github.com/zju-uoe-ccw-lab/sccdc/blob/main/README.md This R command opens the vignettes (detailed documentation and tutorials) for the `scCDC` package. It provides comprehensive information on the `scCDC` method, its applications, and usage examples, serving as a primary resource for users seeking in-depth understanding. ```R browseVignettes("scCDC") ``` -------------------------------- ### Running scCDC Workflow on a Seurat Object in R Source: https://github.com/zju-uoe-ccw-lab/sccdc/blob/main/README.md This snippet outlines the typical workflow for applying `scCDC` to a Seurat object in R, assuming clustering information is present. It loads the `scCDC` library, reads a Seurat object, then sequentially performs contamination detection, quantification, and correction. The corrected data is set as the default assay for downstream analysis. ```R library(scCDC) seuratobject = readRDS('/path/to/seuratobject') GCGs = ContaminationDetection(seuratobject) contamination_ratio = ContaminationQuantification(seuratobject,rownames(GCGs)) seuratobj_corrected = ContaminationCorrection(seuratobject,rownames(GCGs)) DefaultAssay(seuratobj_corrected) = "Corrected" ``` -------------------------------- ### Extracting Corrected Count Matrix from Seurat Object in R Source: https://github.com/zju-uoe-ccw-lab/sccdc/blob/main/README.md This R code snippet demonstrates how to extract the decontaminated count matrix from the `seuratobj_corrected` object generated by `scCDC`. It accesses the 'Corrected' assay's count layer and converts it into a data frame, making the decontaminated data available for further analysis. ```R corrected_count_matrix = data.frame(seuratobj_corrected@assays[["Corrected"]]@layers$counts) ```