HYsxe / PRINT

32 stars 3 forks source link

getFootprints bug #24

Open OMIC-coding opened 1 week ago

OMIC-coding commented 1 week ago

Thank you very much for developing the excellent ATAC-seq package. I'm encountering an issue with the part “Running footprinting scores”. I'm following your tutorial and using my own single-cell RNA and ATAC-seq data, which is from mm10 species.

2. Running footprinting and TF binding/habitation scoring. -------------------------------------

Run footprinting at a specific scale across CREs and pseudo-bulks. Here we are using 50 bp scale, which corresponds to nucleosome footprints.

scale <- 50 project <- getFootprints(project, mode = as.character(scale), nCores = 10, footprintRadius = scale, flankRadius = scale, returnCellTypeScores = TRUE)

Error in {: task 10 failed - "subscript out of bounds" Traceback:

  1. getFootprints(project, mode = as.character(scale), nCores = 10, . footprintRadius = scale, flankRadius = scale, returnCellTypeScores = TRUE)
  2. get_footprints(projectCountTensor = countTensor(project), dispersionModel = dispersionModel, . tmpDir = tmpDir, mode = mode, footprintRadius = footprintRadius, . flankRadius = flankRadius, cellTypeLabels = groupCellType(project), . chunkSize = chunkSize, returnCellTypeScores = returnCellTypeScores, . nCores = nCores)
  3. foreach(regionInd = chunkRegions, .options.snow = opts, .packages = c("dplyr", . "Matrix", "GenomicRanges"), .export = c("regionFootprintScoring", . "conv", "footprintScoring", "findSummits", "getRegionATAC", . "footprintWindowSum", "predictDispersion", "groupCellType", . "mergeRegions")) %dopar% { . regionATAC <- getRegionATAC(countData = chunkCountTensor, . regionInd = as.character(regionInd), groupIDs = groupIDs, . width = width[regionInd]) . return(regionFootprintScoring(regionATAC = regionATAC, Tn5Bias = seqBias[regionInd, . ], dispersionModel = dispersionModel, footprintRadius = footprintRadius, . flankRadius = flankRadius, regionID = as.character(regions[regionInd, . ]), scoreType = "pval", cellTypeLabels = cellTypeLabels, . returnCellTypeScores = returnCellTypeScores)) . }
  4. e$fun(obj, substitute(ex), parent.frame(), e$data)
  5. stop(simpleError(msg, call = expr))
HYsxe commented 5 days ago

Hi!

Thank you for your question. I think we might need more information to troubleshoot. Could you provide the minimally required example data to reproduce this error? (i.e., a subset of your fragments, and your barcode grouping to reproduce).

Alternatively, I think an easier approach is to try out our newest python package, which can be found at https://github.com/buenrostrolab/scPrinter. It should be faster and more user-friendly.

Let me know if it works! Thank you