- changed status to resolved
Non-existent regionDefinition fails to produce sensible error
Issue #78
resolved
When running collapseClones
with regionDefinition = BOB
, comes up with odd warning message. Upon inspection with Jason, looks like foreach implementation is suppressing error handling - solution may check that class(regionDefinition) == "regionDefinition".
Another possible issue is the parallel::clusterExport line that may be creating objects such that the is.null call doesn't work properly, but haven't looked at this in depth.
Error code:
db_clone <- shazam::collapseClones(db,
regionDefinition=BOB,
expandedDb=TRUE, nproc=1)
> Collapsing clonal sequences...
> Warning messages:
> 1: In calcClonalConsensus(inputSeq = db[[sequenceColumn]][groups[[idx]]], :
restarting interrupted promise evaluation
Possible solution:
## Add to top of calcClonalConsensus
if(!is.null(regionDefinition)) {
if(class(regionDefinition) != "RegionDefinition") {
stop("regionDefinition is not valid.")
}
len_shortest <- min(len_shortest, regionDefinition@seqLength, na.rm=TRUE)
}
Comments (1)
-
- Log in to comment
Should be fixed in 0480ccd.