Skip to content

Commit

Permalink
Merge pull request #701 from maxplanck-ie/dev_ksikora2
Browse files Browse the repository at this point in the history
Empty drops
  • Loading branch information
katsikora committed Oct 7, 2020
2 parents 96c5f73 + ac2e3e0 commit d174199
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions snakePipes/shared/rscripts/scRNAseq_EmptyDrops.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ filter_empty_cells<-function(folder,sample){
rn2<-make.unique(rn)
rownames(expdat)<-rn2

seuset<-CreateSeuratObject(counts = expdat)
seuset<-CreateSeuratObject(counts = expdat,project=sample)

return(seuset)

Expand All @@ -76,7 +76,12 @@ filter_empty_cells<-function(folder,sample){
if(length(in_dirs)>1){
l<-mapply(SIMPLIFY=FALSE, function(X,Y) filter_empty_cells(X,Y),X=in_dirs,Y=samples)
names(l)<-samples
s<-merge(x=l[[1]],y=unlist(l[[2:length(l)]]),add.cell.ids=names(l))
l<-l[lapply(l,length)>0]
if(length(l)>1){
s<-merge(x=l[[1]],y=unlist(l[2:length(l)]),add.cell.ids=names(l))
}else{
s<-l[[1]]
}
}else{
s<-filter_empty_cells(in_dirs,samples)
}
Expand Down

0 comments on commit d174199

Please sign in to comment.