JEFworks-Lab / HoneyBADGER

HMM-integrated Bayesian approach for detecting CNV and LOH events from single-cell RNA-seq data
http://jef.works/HoneyBADGER/
GNU General Public License v3.0
95 stars 31 forks source link

Error in calcGexpCnvBoundaries when running with numeric chromosome names #33

Open asabjorklund opened 4 years ago

asabjorklund commented 4 years ago

Hello,

I am testing the Honeybadger package and we have mapping to an assembly that has chromosome names without the "chr" so I modified setGexpMats to not add on "chr" to the chrom names and then tested running:

hb$calcGexpCnvBoundaries(init=TRUE, verbose=FALSE, chrs=as.character(1:22))

It failed and I found that the chrs parameter is not passed to the the function again at the recursion step, same thing for all params that are not default in the original call to the function. This is the part where it fails:

    ## Recursion

    ##print('Recursion for Group1')

    if(length(g1)>=3) {

        tryCatch({
            calcGexpCnvBoundaries(gexp.norm.sub=gexp.norm[, g1])
        }, error = function(e) { cat(paste0("ERROR: ", e)) })

    }

    ##print('Recursion for Group2')

    if(length(g2)>=3) {

        tryCatch({
            calcGexpCnvBoundaries(gexp.norm.sub=gexp.norm[, g2])
        }, error = function(e) { cat(paste0("ERROR: ", e)) })

    }

Another comment - I need to run the package on a secure server with no internet access, so it would be preferred to be able to pass a data frame with gene annotation instead of the mart object. I made my own function that takes the gos data.frame instead of the mart.obj as input and at the same time changed the chromosome names. Which led me to this new problem...

JEFworks commented 4 years ago

Hi,

For debugging purposes, it may be easier to use the functions outside the hb object as done in this tutorial: https://jef.works/HoneyBADGER/Integrating.html

Please provide the error messages returned by these failed functions. Otherwise, it is very difficult for me to understand what problems you are referring to.

Best, Jean