Commit e11be2da authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Update load to handel cellranger v3 and different species/references

parent c13c6967
......@@ -25,7 +25,7 @@ project.name="PdPbPc"
scFolders()
sc10x <- scLoad(p=project.name)
sc10x <- scLoad(p=project.name,cellranger=2,ref="GRCh38")
lg=500
hg=3000
......
......@@ -23,7 +23,7 @@ scFolders <- function(){
}
scLoad <- function(p,mc=3,mg=200,sub=FALSE){
scLoad <- function(p,mc=3,mg=200,sub=FALSE,cellranger=3,ref="GRCh38"){
#Load and prefilter filtered_gene_bc_matrices_mex output from cellranger
#Inputs:
......@@ -37,9 +37,17 @@ scLoad <- function(p,mc=3,mg=200,sub=FALSE){
#Load filtered_gene_bc_matrices_mex output from cellranger
if (sub==FALSE){
sc10x.data <- Read10X(data.dir="./analysis/DATA/10x/filtered_gene_bc_matrices_mex/GRCh38/")
if (cellranger==2){
sc10x.data <- Read10X(data.dir=paste0("./analysis/DATA/10x/filtered_gene_bc_matrices_mex/",ref,"/"))
} else {
sc10x.data <- Read10X(data.dir=paste0("./analysis/DATA/10x/filtered_feature_bc_matrix/"))
}
} else {
sc10x.data <- Read10X(data.dir=paste0("./analysis/DATA/",p,"/10x/filtered_gene_bc_matrices_mex/GRCh38/"))
if (cellranger==2){
sc10x.data <- Read10X(data.dir=paste0("./analysis/DATA/",p,"/10x/filtered_gene_bc_matrices_mex/GRCh38/"))
} else {
sc10x.data <- Read10X(data.dir=paste0("./analysis/DATA/",p,"/10x/filtered_feature_bc_matrix/"))
}
}
sc10x <- new("seurat",raw.data=sc10x.data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment