Closed wangmeijiao closed 4 years ago
yeah
keepFilteredChromosomes <- function(x, remove = c("chrM"), underscore = TRUE, standard = TRUE, pruning.mode="coarse"){
if(standard){ x <- GenomeInfoDb::keepStandardChromosomes(x, pruning.mode = pruning.mode) }
seqNames <- seqlevels(x) chrRemove <- c()
if(underscore){ chrRemove <- c(chrRemove, which(grepl("_", seqNames))) }
chrRemove <- c(chrRemove, which(seqNames %in% remove)) if(length(chrRemove) > 0){ chrKeep <- seqNames[-chrRemove] }else{ chrKeep <- seqNames }
seqlevels(x, pruning.mode=pruning.mode) <- chrKeep return(x) }
Thanks and I will update the codes (downloaded from this git repository).
keepFilteredChromosomes function at line 310 of scATAC_04_Compute_Gene_Scores.R seems invalid and can not be found in any R packages (for example GenomicRanges, IRanges). Did you defined this function as your own and forget to upload?
Thanks