BHC crashes on a 100 samples and 4 variables
1
0
Entering edit mode
jairo • 0
@jairo-8245
Last seen 9.3 years ago
Spain

Hi.

I installed yesterday, on two ubuntu machines, BHC by

source("http://bioconductor.org/biocLite.R")
biocLite("BHC")

I tried:

RNAdata=read.table("http://bass.uib.es/~jairo/data/Datatest")

require(BHC)

hc1 <- bhc(RNAdata,dimnames(RNAdata)[[1]],0,verbose=TRUE)

but it aborts. Originally, I tried without the 0 in the third parameter but it also breaks down.

Thanks for any hint,

Jairo

University of the Balearic Islands

 

Loading required package: BHC
[1] Running Bayesian Hierarchical Clustering....
[1] "DataType: multinomial"
[1] Optimising global hyperparameter...

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

Traceback:
 1: .C("bhcWrapper_multinomial", as.integer(data), as.integer(nDataItems),     as.integer(nFeatures), as.double(globalHyperParameter), as.integer(nFeatureValues),     logEvidence = as.double(123), node1 = vector(mode = "integer",         length = nDataItems - 1), node2 = vector(mode = "integer",         length = nDataItems - 1), mergeOrder = vector(mode = "integer",         length = nDataItems - 1), mergeWeight = vector(mode = "numeric",         length = nDataItems - 1))
 2: RunBhcWrapper(param.lower, dataTypeID, data, timePoints, nDataItems,     nFeatures, nFeatureValues, noise = noise)
 3: FindOptimalHyperparameter(dataTypeID, data, timePoints, noise,     nDataItems, nFeatures, nFeatureValues, verbose = verbose)
 4: bhc(RNAdata, dimnames(RNAdata)[[1]], verbose = TRUE)
 5: eval(expr, envir, enclos)
 6: eval(ei, envir)
 7: withVisible(eval(ei, envir))
 8: source("BHCtest.R")

No sessionInfo() output as R crashes.

software error bhc • 1.8k views
ADD COMMENT
0
Entering edit mode

It's still helpful to post sessionInfo() after loading BHC but before the code that causes the crash. Also, I edited your post so that it tags BHC so that there is more chance that the BHC maintainer will see it.

ADD REPLY
1
Entering edit mode
Rich Savage ▴ 60
@rich-savage-3040
Last seen 9.2 years ago
University of Warwick, UK

Hi Jairo,

I believe the reason for the crash is that you're giving BHC real-valued data for the default data model (which is multinomial, so requires discrete values).  The documentation for the 'bhc' function gives an example of how to discretise your data.  Adapting that, you could try the following:

 

require(BHC)

RNAdata     = read.table("http://bass.uib.es/~jairo/data/Datatest")
RNAdata    = t(RNAdata)
itemLabels = dimnames(RNAdata)[[2]]

percentiles   = FindOptimalBinning(RNAdata, itemLabels, transposeData=TRUE, verbose=TRUE)
discreteData = DiscretiseData(RNAdata, percentiles=percentiles)
hc1               = bhc(t(discreteData), itemLabels, verbose=TRUE)
plot(hc1)

 

Best regards,

Rich

ADD COMMENT
0
Entering edit mode

Thanks Rich. I tried it and it works. Ask you something else later.

Jairo

 

ADD REPLY

Login before adding your answer.

Traffic: 781 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6