Closed Brawni closed 4 years ago
I added the following check in loadArchRProject,
Thanks
Jeff
for(i in seq_along(ArchRProj@peakAnnotation)){
#Postions
if(!is.null(ArchRProj@peakAnnotation[[i]]$Positions)){
if(tolower(ArchRProj@peakAnnotation[[i]]$Positions) != "none"){
PositionsNew <- gsub(outputDir, outputDirNew, ArchRProj@peakAnnotation[[i]]$Positions)
if(!all(file.exists(PositionsNew))){
if(force){
keepAnno[i] <- FALSE
message("Positions for peakAnnotation do not exist in saved ArchRProject!")
}else{
stop("Positions for peakAnnotation do not exist in saved ArchRProject!")
}
}
ArchRProj@peakAnnotation[[i]]$Positions <- PositionsNew
}
}
Hi, Jeff, relative path is more applicable to this module(loadArchRProject) than absolute path at the points of user. Best wishes! Schnappi
I second with Schnappi.
Boyuan
Hello,
saveArchRProject throws an error after adding following peak annotation to the ArchR object:
proj <- addArchRAnnotations(ArchRProj = proj, collection = "EncodeTFBS")
Saving the object:
This is because there is no Position file saved for this collection:
Reproduced this on the tutorial data too.