[R] getting error while trying to make dendogram based on gene expression

Martin Maechler maechler at stat.math.ethz.ch
Fri Jun 23 11:23:15 CEST 2017


>>>>> Yogesh Gupta <yogesh2cute at gmail.com>
>>>>>     on Wed, 21 Jun 2017 13:42:15 +0900 writes:

    > I am trying to make dendogram based on gene expression matrix , but getting
    > some error:

    > I
    > countMatrix = read.table("count.row.txt",header=T,sep='\t',check.names=F)

    > colnames(countMatrix)

    > count_matrix <- countMatrix[,-1]                   #  remove first column
    > (gene names)
    > rownames(count_matrix) <- countMatrix[,1]     #added first column gene
    > names as rownames)

    >> nonzero_row <- count_matrix[rowSums(count_matrix) > 0, # removed row sum
    > 0 across all sample

    >> x1= as.matrix(nonzero_row)                    # converted data into matrix

    >> x=log2(x1+1)                                          # converted into
    > log value
    >> d <- dist(x, method="euclidean")

    >> h <- hclust(d, method="complete")


    > *Error:*

    > *** caught segfault ***
    > address 0x7fa39060af28, cause 'memory not mapped'

    > Traceback:
    > 1: hclust(d, method = "complete")

    > 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:

This looks like a problem that should not happen.
Though it could be that it's just too large a problem (for your
hardware, or "in general").
However, we cannot reproduce what you show above.

To help us help you please provide (to this mailing list!)

   - a (minimal) reproducible example
   - sessionInfo()

It is best to take time to carefully read
   https://www.r-proejct.org/help.html

and/or then just search "reproducible example R" :
       http://lmgtfy.com/?q=reproducible+example+R

Martin


    > Thanks
    > Yogesh



More information about the R-help mailing list