[R] pcrfit model for qpcR package

Luigi Marongiu marongiu.luigi at gmail.com
Tue Mar 10 12:26:28 CET 2015


Dear all,
I have been trying to apply the Cy0 algorithm of the package qpcR by
creating an object "obj" with the normalized fluorescent data from a
384 plate whose characteristics were TaqMan chemistry and 45 cycles.
The import of the object was successful but when I implemented the
pcrfit model (indicating in column 1 the number of cycles and in the
successive columns the actual data) I obtained an error in
model.frame.default. Yet the dataframe is composed by 384 columns (+ 1
for the cycles) and each by 45 rows (+ 1 for the column titles).
Would you have some tips on how to debug this problem?
Many thanks,
Best regards,
Luigi


>>>
Here is a sample of the code I have written (the result database is
attached for further reference)

> obj<-pcrimport2(
+   file="cq.data.txt",
+   sep="\t",
+   dec=".",
+   header=TRUE,
+   colClasses="numeric",
+   quote=""
+   )
# j<-2:385 to be implemented with a loop cycle, to read obj columns
# i<-1:384 to be implemented with a loop cycle, to write the results
# Cy is an object with 384 values
>   model<-pcrfit(obj, cyc=1, j, model=l4, do.optim=TRUE, robust=FALSE)
>   Cy[i]<-Cy0(model, plot=FALSE)


[1] Error in model.frame.default(formula = ~Fluo + Cycles, data =
DATA, weights = WEIGHTS,  :
  variable lengths differ (found for '(do.optim)')



More information about the R-help mailing list