jianhong / ATACseqQC

ATAC-seq Quality Control

Home Page:https://jianhong.github.io/ATACseqQC/articles/ATACseqQC.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

factorFootprints error on system.file("extdata", "GL1.bam",package="ATACseqQC")

tinavisnovska opened this issue · comments

commented

Hi, when I follow the examples to run factorFootprints for ATACseqQC v1.12.0 on GL1.bam file from the ATACseqQC manual document or from the ATACseqQC guide, I am getting segfault. Any idea what may be causing the error? Traceback says the following:

*** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
1: cairoVersion()
2: grSoftVersion()
3: symbolType1support()
4: symbolfamilyDefault(family)
5: svg(psfilename, width = 1, height = 1, bg = NA, pointsize = 72, family = font)
6: importSVG(font, color[i], rname[i], fontface)
7: coloredSymbols(ncha, font, pfm@color, rname, fontface = fontface)
8: motifStack::plotMotifLogoA(motif)
9: (function (Profile, Mlen = 0, xlab = "Dist. to motif (bp)", ylab = "Cut-site probability", legLabels = c("For. strand", "Rev. strand"), legTitle, xlim, ylim, newpage = TRUE, motif, segmentation) { stopifnot(is(motif, "pfm")) if (newpage) grid.newpage() S <- length(Profile) W <- ((S/2) - Mlen)/2 vp <- plotViewport(margins = c(5.1, 5.1, 4.1, 2.1), name = "plotRegion") pushViewport(vp) if (missing(xlim)) { xlim <- c(0, S/2 + 1) } if (missing(ylim)) { ylim <- c(0, max(Profile) * 1.12) } vp1 <- viewport(y = 0.4, height = 0.8, xscale = xlim, yscale = ylim, name = "footprints") pushViewport(vp1) grid.lines(x = 1:(S/2), y = Profile[1:(S/2)], default.units = "native", gp = gpar(lwd = 2, col = "darkblue")) grid.lines(x = 1:(S/2), y = Profile[(S/2 + 1):S], default.units = "native", gp = gpar(lwd = 2, col = "darkred")) if (!missing(segmentation)) { if (length(segmentation) == 4) { grid.segments(x0 = c(0, segmentation[1], W, W + Mlen, S/2 - segmentation[1]), x1 = c(segmentation[1], W, W + Mlen, S/2 - segmentation[1], S/2), y0 = c(segmentation[2], segmentation[3], segmentation[4], segmentation[3], segmentation[2]), y1 = c(segmentation[2], segmentation[3], segmentation[4], segmentation[3], segmentation[2]), default.units = "native", gp = gpar(lwd = 2, col = "red", lty = 2)) } } grid.xaxis(at = c(seq(1, W, length.out = 3), W + seq(1, Mlen), W + Mlen + seq(1, W, length.out = 3)), label = c(-(W + 1 - seq(1, W + 1, length.out = 3)), rep("", Mlen), seq(0, W, len = 3))) grid.yaxis() grid.lines(x = c(W, W, 0), y = c(0, max(Profile), ylim[2]), default.units = "native", gp = gpar(lty = 2)) grid.lines(x = c(W + Mlen + 1, W + Mlen + 1, S/2), y = c(0, max(Profile), ylim[2]), default.units = "native", gp = gpar(lty = 2)) upViewport() vp2 <- viewport(y = 0.9, height = 0.2, xscale = c(0, S/2 + 1), name = "motif") pushViewport(vp2) motifStack::plotMotifLogoA(motif) upViewport() upViewport() grid.text(xlab, y = unit(1, "lines")) grid.text(ylab, x = unit(1, "line"), rot = 90) if (missing(legTitle)) { legvp <- viewport(x = unit(1, "npc") - convertX(unit(1, "lines"), unitTo = "npc"), y = unit(1, "npc") - convertY(unit(1, "lines"), unitTo = "npc"), width = convertX(unit(14, "lines"), unitTo = "npc"), height = convertY(unit(3, "lines"), unitTo = "npc"), just = c("right", "top"), name = "legendWraper") pushViewport(legvp) grid.legend(labels = legLabels, gp = gpar(lwd = 2, lty = 1, col = c("darkblue", "darkred"))) upViewport() } else { grid.text(legTitle, y = unit(1, "npc") - convertY(unit(1, "lines"), unitTo = "npc"), gp = gpar(cex = 1.2, fontface = "bold")) } return(invisible())})(Profile = c(0.0495208651379799, 0.0866615139914648, 0.12380216284495, 0.0619010814224748, 0.0990417302759597, 0.0371406488534849, 0.0742812977069698, 0.0866615139914648, 0.185703244267425, 0.012380216284495, 0.111421946560455, 0.0742812977069698, 0.0990417302759597, 0.0990417302759597, 0.0742812977069698, 0.0742812977069698, 0.111421946560455, 0.12380216284495, 0.0247604325689899, 0.0742812977069698, 0.0619010814224748, 0.12380216284495, 0.0866615139914648, 0.111421946560455, 0.0247604325689899, 0.0990417302759597, 0.0866615139914648, 0.0247604325689899, 0.111421946560455, 0.0990417302759597, 0.0619010814224748, 0.111421946560455, 0.0742812977069698, 0.0990417302759597, 0.0495208651379799, 0.0990417302759597, 0.0866615139914648, 0.12380216284495, 0.0619010814224748, 0.17332302798293, 0.136182379129445, 0.0990417302759597, 0.012380216284495, 0.0990417302759597, 0.0990417302759597, 0.136182379129445, 0.0742812977069698, 0.0619010814224748, 0.0371406488534849, 0.14856259541394, 0.12380216284495, 0.0866615139914648, 0.111421946560455, 0.12380216284495, 0.111421946560455, 0.0371406488534849, 0.111421946560455, 0.235224109405404, 0.12380216284495, 0.111421946560455, 0.0866615139914648, 0.0619010814224748, 0.12380216284495, 0.0866615139914648, 0.136182379129445, 0.111421946560455, 0.0866615139914648, 0.12380216284495, 0.0866615139914648, 0.0866615139914648, 0.198083460551919, 0.0990417302759597, 0.185703244267425, 0.136182379129445, 0.0866615139914648, 0.12380216284495, 0.111421946560455, 0.12380216284495, 0.14856259541394, 0.17332302798293, 0.160942811698435, 0.14856259541394, 0.12380216284495, 0.111421946560455, 0.210463676836414, 0.111421946560455, 0.0742812977069698, 0.0619010814224748, 0.0619010814224748, 0.0495208651379799, 0.160942811698435, 0.0866615139914648, 0.0742812977069698, 0.0495208651379799, 0.0619010814224748, 0.0371406488534849, 0.0495208651379799, 0.0247604325689899, 0.0495208651379799, 0.0619010814224748, 0.0371406488534849, 0.0742812977069698, 0.0619010814224748, 0.0247604325689899, 0.0247604325689899, 0.0371406488534849, 0.0495208651379799, 0.0371406488534849, 0.0495208651379799, 0.0371406488534849, 0, 0.160942811698435, 0.0742812977069698, 0.0619010814224748, 0.14856259541394, 0.0619010814224748, 0.259984541974394, 0.012380216284495, 0.0247604325689899, 0.0495208651379799, 0.012380216284495, 0.0495208651379799, 0.0866615139914648, 0.0371406488534849, 0.012380216284495, 0.0619010814224748, 0.0619010814224748, 0.0742812977069698, 0.14856259541394, 0.0990417302759597, 0.111421946560455, 0.0990417302759597, 0.0990417302759597, 0.235224109405404, 0.235224109405404, 0.160942811698435, 0.17332302798293, 0.136182379129445, 0.0990417302759597, 0.0619010814224748, 0.14856259541394, 0.0866615139914648, 0.0990417302759597, 0.185703244267425, 0.160942811698435, 0.17332302798293, 0.0742812977069698, 0.0990417302759597, 0.136182379129445, 0.0247604325689899, 0.12380216284495, 0.0495208651379799, 0.0990417302759597, 0.185703244267425, 0.136182379129445, 0.185703244267425, 0.0495208651379799, 0.0371406488534849, 0.0742812977069698, 0.0866615139914648, 0.160942811698435, 0.0990417302759597, 0.0619010814224748, 0.0990417302759597, 0.111421946560455, 0.136182379129445, 0.0990417302759597, 0.0742812977069698, 0.0866615139914648, 0.17332302798293, 0.14856259541394, 0.14856259541394, 0.0742812977069698, 0.0990417302759597, 0.0866615139914648, 0.12380216284495, 0.111421946560455, 0.111421946560455, 0.111421946560455, 0.0866615139914648, 0.0742812977069698, 0.0866615139914648, 0.0742812977069698, 0.0990417302759597, 0.0990417302759597, 0.0247604325689899, 0.0866615139914648, 0.0742812977069698, 0.0371406488534849, 0.0619010814224748, 0.0371406488534849, 0.12380216284495, 0.0619010814224748, 0.0619010814224748, 0.0742812977069698, 0.111421946560455, 0.0495208651379799, 0.0990417302759597, 0.17332302798293, 0.136182379129445, 0.14856259541394, 0.0742812977069698, 0.0866615139914648, 0.0495208651379799, 0.0866615139914648, 0.0866615139914648, 0.0742812977069698, 0.0990417302759597, 0.012380216284495, 0.0742812977069698, 0.0495208651379799, 0.0619010814224748, 0.0866615139914648, 0.0495208651379799, 0.0742812977069698, 0.0990417302759597, 0.160942811698435, 0, 0.0619010814224748, 0.0557109732802274, 0.0804714058492173, 0.12380216284495, 0.0495208651379799, 0.185703244267425, 0.0619010814224748, 0.0866615139914648, 0.0866615139914648, 0.0742812977069698, 0.0371406488534849, 0.0619010814224748, 0.0990417302759597, 0.0619010814224748, 0.0619010814224748, 0.0619010814224748, 0.0619010814224748, 0.14856259541394, 0.0619010814224748, 0.0742812977069698, 0.0866615139914648, 0.0866615139914648, 0.0742812977069698, 0.0742812977069698, 0.0247604325689899, 0.0495208651379799, 0.0495208651379799, 0.0619010814224748, 0.0495208651379799, 0.0990417302759597, 0.0742812977069698, 0.0247604325689899, 0.111421946560455, 0.0247604325689899, 0.12380216284495, 0.111421946560455, 0.0990417302759597, 0.0619010814224748, 0.12380216284495, 0.0866615139914648, 0.0495208651379799, 0.0990417302759597, 0.222843893120909, 0.0619010814224748, 0.0990417302759597, 0.0742812977069698, 0.0990417302759597, 0.111421946560455, 0.111421946560455, 0.0371406488534849, 0.0495208651379799, 0.0495208651379799, 0.0495208651379799, 0.0495208651379799, 0.17332302798293, 0.14856259541394, 0.0495208651379799, 0.0619010814224748, 0.136182379129445, 0.12380216284495, 0.17332302798293, 0.0495208651379799, 0.0866615139914648, 0.14856259541394, 0.136182379129445, 0.0990417302759597, 0.0866615139914648, 0.0990417302759597, 0.0990417302759597, 0.0371406488534849, 0.136182379129445, 0.0990417302759597, 0.0866615139914648, 0.0990417302759597, 0.0866615139914648, 0.14856259541394, 0.0990417302759597, 0.14856259541394, 0.160942811698435, 0.160942811698435, 0.12380216284495, 0.17332302798293, 0.222843893120909, 0.160942811698435, 0.284744974543384, 0.14856259541394, 0.17332302798293, 0.12380216284495, 0.14856259541394, 0.185703244267425, 0.0990417302759597, 0.0990417302759597, 0.12380216284495, 0.14856259541394, 0.0866615139914648, 0.0990417302759597, 0.0619010814224748, 0.0866615139914648, 0.0866615139914648, 0.0247604325689899, 0.111421946560455, 0.0371406488534849, 0.0742812977069698, 0.012380216284495, 0.0742812977069698, 0.0619010814224748, 0.0247604325689899, 0.0371406488534849, 0.0371406488534849, 0.0371406488534849, 0.0247604325689899, 0.012380216284495, 0.0742812977069698, 0.0495208651379799, 0.136182379129445, 0.160942811698435, 0.0866615139914648, 0.111421946560455, 0.0495208651379799, 0.0619010814224748, 0.0371406488534849, 0.012380216284495, 0.0247604325689899, 0.0990417302759597, 0.0371406488534849, 0.0866615139914648, 0.0495208651379799, 0.0742812977069698, 0.0742812977069698, 0.0495208651379799, 0.0619010814224748, 0.111421946560455, 0.0742812977069698, 0.136182379129445, 0.259984541974394, 0.12380216284495, 0.309505407112374, 0.160942811698435, 0.235224109405404, 0.136182379129445, 0.111421946560455, 0.111421946560455, 0.0866615139914648, 0.136182379129445, 0.111421946560455, 0.17332302798293, 0.185703244267425, 0.0742812977069698, 0.17332302798293, 0.0742812977069698, 0.0990417302759597, 0.14856259541394, 0.0866615139914648, 0.14856259541394, 0.0990417302759597, 0.17332302798293, 0.136182379129445, 0.0742812977069698, 0.0619010814224748, 0.0495208651379799, 0.0742812977069698, 0.0495208651379799, 0.12380216284495, 0.12380216284495, 0.0990417302759597, 0.136182379129445, 0.0990417302759597, 0.0866615139914648, 0.111421946560455, 0.0619010814224748, 0.0866615139914648, 0.0742812977069698, 0.0742812977069698, 0.0990417302759597, 0.0247604325689899, 0.0742812977069698, 0.12380216284495, 0.111421946560455, 0.0866615139914648, 0.136182379129445, 0.0742812977069698, 0.160942811698435, 0.0990417302759597, 0.0990417302759597, 0.0866615139914648, 0.111421946560455, 0.0495208651379799, 0.0990417302759597, 0.0742812977069698, 0.0495208651379799, 0.0742812977069698, 0.0371406488534849, 0.0247604325689899, 0.0495208651379799, 0.0495208651379799, 0.0619010814224748, 0.0742812977069698, 0.0990417302759597, 0.0990417302759597, 0.0990417302759597, 0.111421946560455, 0.111421946560455, 0.0619010814224748, 0.17332302798293, 0.0742812977069698, 0.0742812977069698, 0.198083460551919, 0.0990417302759597, 0.0990417302759597, 0.0495208651379799, 0.0247604325689899, 0.0619010814224748, 0.0247604325689899, 0.012380216284495, 0.160942811698435, 0.0619010814224748, 0.12380216284495, 0.14856259541394, 0.14856259541394, 0.0495208651379799, 0.111421946560455, 0.0309505407112374), legLabels = c("For. strand", "Rev. strand"), ylab = "Cut-site probability", Mlen = 20L, motif = new("pfm", mat = c(0.173018103662065, 0.415970901876498, 0.246011407787055, 0.164999586674382, 0.22600644787964, 0.275026866165165, 0.228982392328677, 0.269984293626519, 0.288005290567909, 0.298999752004629, 0.258989832189799, 0.154005125237662, 0.104984706952137, 0.319996693395057, 0.268000330660494, 0.307018268992312, 0.333967099280813, 0.113995205422832, 0.416053567000083, 0.135984128296272, 0.0600148797222452, 0.326031247416715, 0.553938993138795, 0.0600148797222452, 0.0519963627345623, 0.562040175250062, 0.0519963627345623, 0.333967099280813, 0.0370339753657932, 0.00495990741506159, 0.826981896337935, 0.13102422088121, 0.022980904356452, 0.960072745308754, 0.0129784244027445, 0.00396792593204927, 0.000991981483012317, 0.997024055550963, 0.000991981483012317, 0.000991981483012317, 0.245019426304042, 0.669918161527651, 0.0270314954120856, 0.0580309167562206, 0.000991981483012317, 0.689013805075639, 0.000991981483012317, 0.309002231958337, 0.000991981483012317, 0.997024055550963, 0.000991981483012317, 0.000991981483012317, 0.0500123997685377, 0.0429858642638671, 0.0170290154583781, 0.889972720509217, 0.253037943291725, 0.0729933041249897, 0.525006199884269, 0.148962552699016, 0.00396792593204927, 0.418037529966107, 0.546003141274696, 0.0319914028271472, 0.172026122179053, 0.150037199305613, 0.0549723071835992, 0.622964371331735, 0.000991981483012317, 0.000991981483012317, 0.997024055550963, 0.000991981483012317, 0.0190129784244027, 0.0629908241712821, 0.865007853186741, 0.0529883442175746, 0.192031082086468, 0.43192527072828, 0.150037199305613, 0.22600644787964), name = "motif", alphabet = "DNA", color = c(A = "#00811B", C = "#2000C7", G = "#FFB32C", T = "#D00001"), background = c(A = 0.25, C = 0.25, G = 0.25, T = 0.25), tags = list(), markers = list()), segmentation = c(pos = 51.75, distal_abun = 0.0826919030164958, proximal_abun = 0.114054366237735, binding = 0.0615915760153625))
10: do.call(plotFootprints, args = args)
11: do.call(plotFootprints, args = args)
12: doTryCatch(return(expr), name, parentenv, handler)
13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
14: tryCatchList(expr, classes, parentenv, handlers)
15: tryCatch({ args <- list(...) if (groupFlag) { args$Profile <- c(Profile[["+"]], Profile[["-"]]) args$legLabels <- c("For. strand", "Rev. strand") } else { args$Profile <- c(Profile[[1]], Profile[[2]]) args$legLabels <- names(Profile) } args$ylab <- ifelse(anchor == "cut site", "Cut-site probability", "reads density (arbitrary unit)") args$Mlen <- wid args$motif <- pwm2pfm(pfm) args$segmentation <- Profile.seg do.call(plotFootprints, args = args)}, error = function(e) { message(e)})
16: factorFootprints(shiftedBamfile, pfm = CTCF[[1]], genome = genome, min.score = "90%", seqlev = seqlev, upstream = 100, downstream = 100)

Could you share the output of

capabilities("cairo")

commented

Hi @jianhong,

cairo is TRUE. However, I got a bit more verbose error message now, complaining about R_X11.so missing. Given that I am installing ATACseqQC into a singularity image with conda, the setup is pretty sensitive about dependencies which are often taken for granted when installing things on one's computer. Anyway, there were a couple more packages missing -- one suggested for MotifDb, another fixing fonts in conda R. After adding those, the factorFootprints works as expected on the GL1.bam file.

The missing conda packages are xorg-libxt, bioconductor-seqlogo, fonts-conda-ecosystem=1

Thanks for helping to troubleshoot!