Entering edit mode
yan zhou
▴
80
@yan-zhou-2479
Last seen 10.3 years ago
Hi, Ligia,
I'll need your help with defining the batch slot in cellHTS2 again.I
run
into problem and I think either there's a bug in the function code of
cellHTS2 or I'm doing something extremely stupid here.
I have 76 plates(in 96 well format) in dulipate, and first 3 batch
each
has 20 plates within a batch(with duplicate, which means 40 plates
total
for each batch). my code to define the batch as follows: (regards to
the
description of the package I need to define a array with dimension of
(96*76,2,1) to feed to "batch" function)
"DL" is my cellHTS object;
ind=c(rep(1:3,each=96*20),rep(4,96*16))
bt=array(rep(ind,2),dim=c(96*76,2,1)) #an array with dimensions
'Features x Samples x Channels' (7296 x 2 x 1)
batch(DL) <- bt
but I got error message as follows,which is very confusing(asked me to
build array with dimension of plate number,sample and channel):
>Error in `batch<-`(`*tmp*`, value = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, :
'value' should be an array of integer values corresponding to the
batch
number for each plate, sample and channel!
So, I changed the array as suggested by the error message due to
curiosity:
ind2=c(rep(1:3,each=20),rep(4,16))
bt2=array(rep(ind2,2),dim=c(76,2,1))
batch(DL) <- bt2
But then got error message as belows:
>Error in `batch<-`(`*tmp*`, value = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, :
'value' should be an array with dimensions 'Features x Samples x
Channels' (7296 x 2 x 1).
Which suggested I should use the code from the first block. I fell
into
a loop here, which I couldn't figure out what's wrong. Could you help
to
point out to the right direction or give me some clues here?
thanks a lot.
yan