thank you. I solved this problem by your advice
I am using SCnorm to normalize my gene_counts matrix.
I have 107 samples(4 conditions, each has 57, 19, 18, 13 samples)
I used these codes to see the count-depth relationship:
Conditions = rep(c(1,2,3,4), each= 57, 19, 18, 13)
countDeptEst <- plotCountDepth(Data = d, Conditions = Conditions, FilterCellProportion = .1, NCores = 3)
But I got this mistake
Error in plotCountDepth(Data = d, Conditions = Conditions, FilterCellProportion = 0.1, :
Number of columns in expression matrix must match length of conditions vector!
I'm sure that I have the right number of columns of the matrix.
1 answer
I'm sure that I have the right number of columns of the matrix.
Are you sure you have the right number of elements in the condition vector, because this statement doesn't make sense to me:
Conditions = rep(c(1,2,3,4), each= 57, 19, 18, 13)
each= takes one numeric argument. I think you're looking for:
Conditions = c(rep(1,57), rep(2,19), rep(3,18), rep(4,13))
Glad it was of help. The next step is to accept an answer, so this can be of help to people facing a similar problem in the future:
If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they work.

Log in to answer this question.