haibol2016 / ArchR_utilities

1 stars 0 forks source link

bug in create_ArchR_genomeannotation() #5

Closed hukai916 closed 2 years ago

hukai916 commented 2 years ago

Bug: blacklist object not found. Basically, if the blacklist bed is not supplied, line 392, 393, 398 will hiccup. I have to use the following replacement:

if (exists("blacklist")) {
  seqlevels(blacklist, pruning.mode="coarse") <- tss_chr
  seqlevels(blacklist) <- seqlevelsInUse(blacklist)
}

# don't need ArchR createGenomeAnnotation() function
if (exists("blacklist")) {
  genomeAnnotation <- SimpleList(genome = BSgenome@pkgname, chromSizes = chromSizes, blacklist = blacklist)
} else {
  genomeAnnotation <- SimpleList(genome = BSgenome@pkgname, chromSizes = chromSizes, blacklist = NULL)
}
haibol2016 commented 2 years ago

@hukai916 sorry for the mistake.

I just moved the following two line to the if(!is.null(blacklist)) scope.

  ` ## filter blacklist;
    seqlevels(blacklist, pruning.mode="coarse") <- tss_chr;
    seqlevels(blacklist) <- seqlevelsInUse(blacklist)`

See the update.