GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
388 stars 140 forks source link

Error in .addGeneScoreMat (possibly involving blacklist?) #1178

Closed dagarfield closed 3 years ago

dagarfield commented 3 years ago

I had been constructing ArchR files using an input barcode list of probably cells to make the construction of the ArrowFiles a bit faster. When I do so, this works fine, but I've run into an error when I attempted to construct an ArrowFile without this list (for the purpose of getting the full distribution in the Read vs. TSS-enrichment QC plot).

ArrowFiles <- createArrowFiles(
    geneAnnotation = geneAnnoSpur5, 
    genomeAnnotation = genomeAnnoSpur5,
    inputFiles = inputFiles[[1]],
    sampleNames = names(filePaths)[1],
    #validBarcodes = validBarcodes,
    minTSS = minTSS, 
    minFrags = minFrags, 
    maxFrags = maxFrags,
    promoterRegion = promoterRegion,
    excludeChr = excludeChr,
    addTileMat = addTileMat,
    TileMatParams = TileMatParams,
    addGeneScoreMat = addGeneScoreMat,
    GeneScoreMatParams = GeneScoreMatParams,
    subThreading = FALSE #still not sure about this one
)

Unfortunately, the resulting error and error file isn't too informative to my lights:

2021-11-23 06:35:42 : (earlyDev : 1 of 1) Adding TileMatrix!, 80.913 mins elapsed.

Warning message in min(start(fragments)):
“no non-missing arguments to min; returning Inf”
Warning message in max(end(fragments)):
“no non-missing arguments to max; returning -Inf”
Warning message in min(matchID):
“no non-missing arguments to min; returning Inf”
Warning message in max(matchID):
“no non-missing arguments to max; returning -Inf”
2021-11-23 06:55:29 : (earlyDev : 1 of 1) Adding GeneScoreMatrix!, 100.707 mins elapsed.

************************************************************
2021-11-23 07:19:16 : ERROR Found in .addGeneScoreMat AddToArrow for earlyDev 
LogFile = ArchRLogs/ArchR-createArrows-61f853b2b39f-Date-2021-11-23_Time-05-14-47.log

<simpleError in h(simpleError(msg, call)): error in evaluating the argument 'values' in selecting a method for function 'Rle': 'from' must be a finite number>

************************************************************

************************************************************
2021-11-23 07:19:16 : ERROR Found in .addGeneScoreMat for (earlyDev : 1 of 1) 
LogFile = ArchRLogs/ArchR-createArrows-61f853b2b39f-Date-2021-11-23_Time-05-14-47.log

<simpleError in .logError(e, fn = ".addGeneScoreMat AddToArrow", info = sampleName,     errorList = errorList, logFile = logFile): Exiting See Error Above>

************************************************************

createArrowFiles has encountered an error, checking if any ArrowFiles completed..

2021-11-23 07:19:16 : 

ArchR logging successful to : ArchRLogs/ArchR-createArrows-61f853b2b39f-Date-2021-11-23_Time-05-14-47.log

Error log attached. ArchR-createArrows-61f81ea75bf1-Date-2021-11-23_Time-09-12-37.log

The key error line being


LogFile = ArchRLogs/ArchR-createArrows-61f81ea75bf1-Date-2021-11-23_Time-09-12-37.log

<simpleError in h(simpleError(msg, call)): error in evaluating the argument 'values' in selecting a method for function 'Rle': 'from' must be a finite number>```
rcorces commented 3 years ago

hard to say. You're saying that when you run the exact same command plus/minus the validBarcodes argument, it fails without validBarcodes but passes with validBarcodes? Does it always fail on the same chromosome at the same spot? If so, maybe there is something wrong with your input file on that chromosome that is in a cell that isnt part of validBarcodes?

dagarfield commented 3 years ago

Exactly -- it works with a validBarcode list but not when I comment out that line. I've only done this trial with one fragment file -- lemme see if the crash point is different for the different fragment files and get back to you.

dagarfield commented 3 years ago

Raiding the TSSenrichment cut-off from 0 to 0.1 solved the problem. I have no idea why, but some gifts you just roll with.