8000 stitch crashed · Issue #86 · rwdavies/STITCH · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

stitch crashed #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement 8000 . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rmott opened this issue Sep 13, 2023 · 5 comments
Open

stitch crashed #86

rmott opened this issue Sep 13, 2023 · 5 comments

Comments

@rmott
Copy link
rmott commented Sep 13, 2023

Hi Robbie

I gort a segfault runnning stitch. The data comprise about 550 Arabidopsis bamfiles. I divided the genome into 5Mb segments and STITCH processed the first few segments without problem but suddenly crashed on segment #4. The error was in the part where i is downsampling the bam files:

[2023-09-13 14:44:16] downsample sample A77838_1 - 353 of 122150 reads removed
[2023-09-13 14:44:16] downsample sample A77800_1 - 336 of 108490 reads removed
[2023-09-13 14:44:16] downsample sample A77912_1 - 358 of 108471 reads removed
[2023-09-13 14:44:16] downsample sample A77764_1 - 10 of 97862 reads removed
[2023-09-13 14:44:17] downsample sample A77690_1 - 17 of 133077 reads removed
[2023-09-13 14:44:17] downsample sample A77949_1 - 285 of 102064 reads removed
[2023-09-13 14:44:17] downsample sample A83242_1 - 169 of 264566 reads removed
[2023-09-13 14:44:17] downsample sample A77967_1 - 47 of 119207 reads removed
[2023-09-13 14:44:18] downsample sample A77634_1 - 531 of 127996 reads removed
[2023-09-13 14:44:18] downsample sample A77783_1 - 22 of 105780 reads removed

*** caught segfault ***
address 0x62ffd004, cause 'memory not mapped'

Traceback:
1: cpp_read_reassign(ord = ord, qnameInteger_ord = qnameInteger_ord, bxtagInteger_ord = bxtagInteger_ord, bxtag_bad_ord = bxtag_bad_ord, qname = qname, bxtag = bxtag, strand = strand,
sampleReadsRaw = sampleReadsRaw, readStart_ord = readStart_ord, readEnd_ord = readEnd_ord, readStart = readStart, readEnd = readEnd, iSizeUpperLimit = iSizeUpperLimit, bxTagUpperL
imit = bxTagUpperLimit, use_bx_tag = use_bx_tag, save_sampleReadsInfo = save_sampleReadsInfo)
2: merge_reads_from_sampleReadsRaw(sampleReadsRaw = sampleReadsRaw, qname = qname, bxtag = bxtag, strand = strand, readStart = readStart, readEnd = readEnd, iSizeUpperLimit = iSizeUpp
erLimit, use_bx_tag = use_bx_tag, bxTagUpperLimit = bxTagUpperLimit, save_sampleReadsInfo = save_sampleReadsInfo, qname_all = qname_all, readStart_all = readStart_all, readEnd_all = re
adEnd_all)
3: loadBamAndConvert(iBam = iBam, L = L, pos = pos, nSNPs = nSNPs, bam_files = bam_files, cram_files = cram_files, reference = reference, iSizeUpperLimit = iSizeUpperLimit, bqFilter =
bqFilter, chr = chr, N = N, downsampleToCov = downsampleToCov, sampleNames = sampleNames, inputdir = inputdir, useSoftClippedBases = useSoftClippedBases, regionName = regionName,
tempdir = tempdir, chrStart = chrStart, chrEnd = chrEnd, chrLength = chrLength, save_sampleReadsInfo = save_sampleReadsInfo, use_bx_tag = use_bx_tag, bxTagUpperLimit = bxTagUpperLimit)
4: FUN(X[[i]], ...)
5: lapply(X = S, FUN = FUN, ...)
6: doTryCatch(return(expr), name, parentenv, handler)
7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
8: tryCatchList(expr, classes, parentenv, handlers)
9: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcal
l <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nc
har(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefi
x, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))
) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
10: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
11: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
12: FUN(X[[i]], ...)
13: lapply(seq_len(cores), inner.do)
14: mclapply(1:length(sampleRanges), mc.cores = nCores, FUN = loadBamAndConvert_across_a_range, sampleRanges = sampleRanges, bundling_info = bundling_info, L = L, pos = pos, nSNPs = nS
NPs, bam_files = bam_files, cram_files = cram_files, reference = reference, iSizeUpperLimit = iSizeUpperLimit, bqFilter = bqFilter, chr = chr, N = N, downsampleToCov = downsampleToCov,
sampleNames = sampleNames, inputdir = inputdir, useSoftClippedBases = useSoftClippedBases, regionName = regionName, tempdir = tempdir, chrStart = chrStart, chrEnd = chrEnd, chrLen
gth = chrLength, save_sampleReadsInfo = save_sampleReadsInfo, use_bx_tag = use_bx_tag, bxTagUpperLimit = bxTagUpperLimit)
15: generate_input(bundling_info = bundling_info, L = L, pos = pos, nSNPs = nSNPs, bam_files = bam_files, cram_files = cram_files, reference = reference, iSizeUpperLimit = iSizeUpperLi
mit, bqFilter = bqFilter, chr = chr, N = N, downsampleToCov = downsampleToCov, sampleNames = sampleNames, inputdir = inputdir, useSoftClippedBases = useSoftClippedBases, regionName
= regionName, tempdir = tempdir, chrStart = chrStart, chrEnd = chrEnd, nCores = nCores, save_sampleReadsInfo = save_sampleReadsInfo, use_bx_tag = use_bx_tag, bxTagUpperLimit = bxTagUp
perLimit)
16: generate_or_refactor_input(regenerateInput = regenerateInput, bundling_info = bundling_info, L = L, pos = pos, nSNPs = nSNPs, bam_files = bam_files, cram_files = cram_files, refere
nce = reference, iSizeUpperLimit = iSizeUpperLimit, bqFilter = bqFilter, chr = chr, outputdir = outputdir, N = N, downsampleToCov = downsampleToCov, sampleNames = sampleNames, inpu
tdir = inputdir, useSoftClippedBases = useSoftClippedBases, regionName = regionName, tempdir = tempdir, chrStart = chrStart, chrEnd = chrEnd, generateInputOnly = generateInputOnly, nCo
res = nCores, save_sampleReadsInfo = save_sampleReadsInfo, use_bx_tag = use_bx_tag, bxTagUpperLimit = bxTagUpperLimit)
17: STITCH(chr = as.character(chr), posfile = posfile, K = 19, S = 1, nGen = 7, outputdir = outputdir, bamlist = "bamfiles.complete.txt", method = "diploid", nCores = 30, splitReadIter
ations = NA, tempdir = "/scratch0/ucbtrfm/stitch/", regionStart = start, regionEnd = end, buffer = buffer)
18: eval(ei, envir)
19: eval(ei, envir)
20: withVisible(eval(ei, envir))
21: source("stitch.complete.R")

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: [2023-09-13 14:44:18] downsample sample A77561_1 - 1 of 102508 reads removed
[2023-09-13 14:44:19] downsample sample A77876_1 - 23 of 113443 reads removed
[2023-09-13 14:44:20] downsample sample A77618_1 - 14 of 145622 reads removed
[2023-09-13 14:44:20] downsample sample A77544_1 - 7 of 149986 reads removed
[2023-09-13 14:44:20] downsample sample A77986_1 - 10 of 122339 reads removed

@rmott
Copy link
Author
rmott commented Sep 13, 2023

And here is the script:

library(STITCH)
options(bitmapType='cairo')
chunksize = 5000000
buffer = 5000
outputdir="./tair10.complete.STITCH/"
chrlen = read.delim("./tair10.chrlen.txt")
rownames(chrlen) = chrlen$chr
for( chr in 1:5 ) {
len = chrlen$len[chr]
chunks = floor(len/chunksize)+1
cat("chr", chr, "chunks", chunks, "\n")
start=1
end = 0
posfile=paste0("chr",chr,".pos.txt")
for( k in 1:chunks) {
start = end+1
end = start + chunksize-1
if ( end > len ) end = len
cat("chr", chr, "chunk", k, "start", start, "end", end, "\n")
STITCH( chr=as.character(chr), posfile=posfile, K=19,S=1,nGen=7,outputdir=outputdir, bamlist="bamfiles.complete.txt",method="diploid",nCores=30,splitReadIterations = NA,tempdir="
/scratch0/ucbtrfm/stitch/", regionStart=start, regionEnd=end, buffer=buffer)
}
}

@rwdavies
Copy link
Owner
rwdavies commented Sep 13, 2023 via email

@rmott
Copy link
Author
rmott commented Sep 13, 2023 via email

@rmott
Copy link
Author
rmott commented Sep 13, 2023 via email

@rwdavies
Copy link
Owner
rwdavies commented Sep 13, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0