Skip to content
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. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep getting the error that rows do not match #30

Open
sameet-sema4 opened this issue Dec 21, 2021 · 1 comment
Open

Keep getting the error that rows do not match #30

sameet-sema4 opened this issue Dec 21, 2021 · 1 comment

Comments

@sameet-sema4
Copy link

I have a matrix with 2300 samples, and about 34 batches. I am trying to use ComBat_Seq on this matrix. The matrix is arranged by genes in the rows, and samples in the columns. I have a vector to be used a batches that has same length as the number of columns in the count matrix. But I keep getting the following error:

    > length(use_batch)
    [1] 2312 
    > ncol(ori_matrix)
    [1] 2312
    > corrected_mat <- ComBat_seq(ori_matrix, batch = use_batch)
    Found 34 batches
    Using null model in ComBat-seq.
    Error in cbind(batchmod, mod) : 
      number of rows of matrices must match (see arg 2)

Am I missing something? What is the way around this. The ori_matrix of the original count values is a matrix.

@akira8451
Copy link

maybe
ori_matrix <- t(orimatrix)
can solve this problem

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