SCnorm -plotCountDepth error
1
0
Entering edit mode
5.7 years ago
hsu ▴ 40

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.

RNA-Seq • 948 views
ADD COMMENT
3
Entering edit mode
5.7 years ago
Ram 43k

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))
ADD COMMENT
0
Entering edit mode

thank you. I solved this problem by your advice

ADD REPLY
0
Entering edit mode

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.

Upvote|Bookmark|Accept

ADD REPLY

Login before adding your answer.

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