[BioC] rsamtools scanBcf segfault
Martin Morgan
mtmorgan at fhcrc.org
Wed Jul 27 14:56:06 CEST 2011
On 07/27/2011 05:17 AM, Rob Syme wrote:
> Hi all,
> I'm looking to read in a bcf file, but R keeps segfaulting out. I'd
> love advice or pointers if anyone has seen this before.
> Environment:
> Rsamtools version 1.4.2
> R version 2.13.1 (2011-07-08)
>
> Code to reproduce is gist.github.com/1109210, reproduced below:
>
> wget https://gist.github.com/raw/1109207/8a3cd8a8801e96f67865f8a35ca6608ae7fe9927/subset.vcf
> grep -v "^#" subset.vcf | cut -f 1 | sort -u> subset.dict
> bcftools view -D subset.dict -bS subset.vcf> subset.bcf
> bcftools index subset.bcf
> wget https://gist.github.com/raw/1109213/a325d29ee4cfa7f2c7107d085ed813cdd942c083/segfault.R
> Rscript segfault.R
> ## END BASH
> I get:
Thanks Rob for the nice reproducible example. The problem is when you
open the BcfFile; 'mode' should be 'rb' to indicate that you want to
read a binary file. Or leave it unspecified and the heuristic will do
the right thing.
I'll try to get a fix in so that R doesn't seg fault.
Martin
>
> $ Rscript segfault.R
> ...
> *** caught segfault ***
> address (nil), cause 'memory not mapped'
>
> Traceback:
> 1: .Call(func, .extptr(file), space, tmpl)
> 2: doTryCatch(return(expr), name, parentenv, handler)
> 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> 4: tryCatchList(expr, classes, parentenv, handlers)
> 5: tryCatch({ .Call(func, .extptr(file), space, tmpl)}, error =
> function(err) { stop("scanBcf: ", conditionMessage(err), "\n path:
> ", path(file), call. = FALSE)})
> 6: .io_bcf(.scan_bcf, file, ..., param = param)
> 7: .local(file, ...)
> 8: scanBcf(bcf, param = param)
> 9: scanBcf(bcf, param = param)
> aborting ...
> Segmentation fault
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Location: M1-B861
Telephone: 206 667-2793
More information about the Bioconductor
mailing list