[BioC] HTqPCR: new qPCRset objects problem

Wenbo Mu muwenbo.prc at gmail.com
Thu Mar 10 02:27:11 CET 2011


Hi, Heidi,

Thank for your reply. After adding the "flag" slot, I met no error in
downstream analysis, but only some warnings like the following. I
think it doesn't affect the performance of the function.
I run the code of normalizeCtData line by line, and found the warning
happens at the last command "q at history <- rbind(q at history,
capture.output(match.call(normalizeCtData)))". The similar warning
also happens when running other functions like filterCtData. I'm not
sure whether it's the problem of option setting of my R environment or
of the function. I hope this information could be helpful to improve
this great package.

Warning messages:
1: In `[<-.factor`(`*tmp*`, ri, value = "normalizeCtData(q = raw.cat,
norm = \"deltaCt\", deltaCt.genes = HK.miR.rm)") :
  invalid factor level, NAs generated
2: In `[<-.factor`(`*tmp*`, ri, value = "normalizeCtData(q = raw.cat,
norm = \"deltaCt\", deltaCt.genes = HK.miR.rm)") :
  invalid factor level, NAs generated

Thanks again,

Wenbo Mu




On Tue, Mar 8, 2011 at 7:14 AM, Heidi Dvinge <heidi at ebi.ac.uk> wrote:
> Hi Wenbo,
>
> thanks for the reproducible examples. Sorry for the delay in getting back
> to you.
>
>> Hi, Heidi,
>>
>> Thank your for your help.
>> I installed the HTqPCR development version, 1.5.3 and got warnings.
>> But when check the session info, it seems correctly installed.
>>
>> Warning message:
>> In install.packages(c("HTqPCR", "../HTqPCR_1.5.3.tar.gz"),  :
>>   installation of package 'HTqPCR' had non-zero exit status
>>
>> Then I test the subsetting in the same way, it seems still not work.
>>
>>> n<- 48
>>> temp<- matrix(rnorm(n*n),ncol=n,nrow=n)
>>> raw <- new("qPCRset", exprs=temp, sampleNames=paste("S", 1:n, sep=""),
>>> featureNames=paste("A", 1:n, sep=""),
>>> featureCategory=as.data.frame(array("OK", c(n,n))))
>>
>>> raw[,1]
>> Error in names(x) <- value :
>>  'names' attribute [1] must be the same length as the vector [0]
>>> raw[1,]
>> Error in names(x) <- value :
>>  'names' attribute [48] must be the same length as the vector [0]
>>
> This seems to be an issue with how the qPCRset object is created. I'll
> work on a fix and commit it to the development repository.
>
> In the meantime, it should work if you also add the "flag" slot. For example:
>
>> n<- 48
>> temp<- matrix(rnorm(n*n),ncol=n,nrow=n)
>> raw <- new("qPCRset", exprs=temp, sampleNames = paste("S", 1:n, sep=""),
> featureNames = paste("A", 1:n, sep=""), featureCategory =
> as.data.frame(array("OK", c(n,n))), flag = as.data.frame(array("OK",
> c(n,n))))
>> raw[,1]
> An object of class "qPCRset"
> Size:  48 features, 1 samples
> Feature types:
> Feature names:           A1 A2 A3 ...
> Feature classes:
> Feature categories:      OK
> Sample names:            S1 NA NA ...
>> raw[1,]
> An object of class "qPCRset"
> Size:  1 features, 48 samples
> Feature types:
> Feature names:           A1 NA NA ...
> Feature classes:
> Feature categories:      OK
> Sample names:            S1 S2 S3 ...
>
> If you add a data frame with flags, do your downstream errors with
> filterCtData etc. persist?
>
> Cheers
> \Heidi
>
>
>>> sessionInfo()
>> R version 2.12.2 (2011-02-25)
>> Platform: x86_64-pc-linux-gnu (64-bit)
>>
>> locale:
>>  [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C
>>  [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8
>>  [5] LC_MONETARY=C             LC_MESSAGES=en_US.utf8
>>  [7] LC_PAPER=en_US.utf8       LC_NAME=C
>>  [9] LC_ADDRESS=C              LC_TELEPHONE=C
>> [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] HTqPCR_1.5.3       limma_3.6.9        RColorBrewer_1.0-2
>> Biobase_2.10.0
>>
>> loaded via a namespace (and not attached):
>> [1] affy_1.28.0           affyio_1.18.0         gdata_2.8.1
>> [4] gplots_2.8.0          gtools_2.6.2          preprocessCore_1.12.0
>> [7] tools_2.12.2
>>
>>
>> Wenbo Mu
>>
>>
>>
>>
>> On Wed, Mar 2, 2011 at 4:33 PM, Heidi Dvinge <heidi at ebi.ac.uk> wrote:
>>> Hi Wenbo,
>>>
>>>> Dear List,
>>>>
>>>> When trying to use HTqPCR to analyze data under R 2.12, my code which
>>>> works under R 2.10 doesn't work any more.
>>>>
>>>> When I'm using function filterCtData, I got some Warning messages. If
>>>> I ignore the warnings, a error will happen when using filterCtData
>>>> function.
>>>> I concluded some error happened at q[!index,], so I check the source
>>>> code and do some small experiments. I substitute q <- q[!index, ] by
>>>> featureCategory(q) <- featureCategory
>>>> (q)[!index,], and then no error happens.
>>>>
>>>>> q.norm <- normalizeCtData(sr.norm,norm="quantile")
>>>>
>>>> Warning messages:
>>>> 1: In `[<-.factor`(`*tmp*`, ri, value = "normalizeCtData(q = sr.norm,
>>>> norm = \"quantile\")") :
>>>>   invalid factor level, NAs generated
>>>> 2: In `[<-.factor`(`*tmp*`, ri, value = "normalizeCtData(q = sr.norm,
>>>> norm = \"quantile\")") :
>>>>   invalid factor level, NAs generated
>>>>
>>> as far as I remember, there were some bugs introduced with subsetting
>>> when
>>> I added rbind and cbind methods for qPCRset objects to HTqPCR (oops).
>>> These should hopefully have been fixed in the development version,
>>> 1.5.3.
>>>
>>> Would it be possible for you to install the development version and see
>>> if
>>> these errors still occur? Although it generally isn't recommendable to
>>> run
>>> devel versions of packages on the release version of R/Bioconductor,
>>> I've
>>> tried so with HTqPCR before without problems. Just download whatever
>>> version fits your OS from
>>> http://www.bioconductor.org/packages/devel/bioc/html/HTqPCR.html, and
>>> install it manually in R.
>>>
>>> If installing the devel version isn't feasible for you, or if these
>>> errors
>>> still occur, then please report back here and I'll see what I can do
>>> about
>>> it.
>>>
>>> Best
>>> \Heidi
>>>
>>>>> q.Filt <- filterCtData( q.norm, remove.category="Undetermined",
>>>>> n.category = 36, remove.name=c(HK.miR.rm,"MammU6"))
>>>> Error in names(x) <- value :
>>>>   'names' attribute [41] must be the same length as the vector [0]
>>>>
>>>>> traceback()
>>>> 6: `colnames<-`(`*tmp*`, value = c("C1", "C2", "C3", "C4", "C5",
>>>>    "C6", "C7", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "T1", "T10",
>>>>    "T11", "T12", "T13", "T2", "T3", "T4", "T5", "T6", "T7", "T8",
>>>>    "T9", "U1", "U.1", "U10", "U12", "U13", "U2", "U.2", "U3", "U.3",
>>>>    "U4", "U5", "U6", "U8", "U9"))
>>>> 5: flag(x)
>>>> 4: .local(x, i, j, ..., drop)
>>>> 3: q[!index, ]
>>>> 2: q[!index, ]
>>>> 1: filterCtData(q.norm, remove.category = "Unreliable",
>>>>        n.category = 36, remove.name = c(HK.miR.rm, "MammU6"))
>>>>
>>>>
>>>> I thought the subsetting problem may come from some mistakes at earlier
>>>> step.
>>>> I find if use the qPCRset test object, we can subset the object by
>>>> specific number such as qPCRraw[,1] or qPCRraw[1,]. But if we create a
>>>> qPCRset object by new function, the subsetting doesn't works. I try
>>>> the follow code under i386-pc-mingw32 Windows with R version 2.10.1
>>>> and HTqPCR version 1.0.0, under x86_64-unknown-linux-gnu with R
>>>> version 2.11.1 and HTqPCR version 1.2.0 and under x86_64-pc-linux-gnu
>>>> (64-bit) with R version 2.12.2 and HTqPCR version 1.4.0.
>>>>
>>>>> n<- 48
>>>>> temp<- matrix(rnorm(n*n),ncol=n,nrow=n)
>>>>> raw <- new("qPCRset", exprs=temp, sampleNames=paste("S", 1:n, sep=""),
>>>>> featureNames=paste("A", 1:n, sep=""),
>>>>> featureCategory=as.data.frame(array("OK", c(n,n))))
>>>>
>>>>> raw[,1]
>>>> Error in names(x) <- value :
>>>>   'names' attribute [1] must be the same length as the vector [0]
>>>>> raw[1,]
>>>> Error in names(x) <- value :
>>>>   'names' attribute [48] must be the same length as the vector [0]
>>>>
>>>> Row subsetting and column subsetting error both happens at R 2.11.1
>>>> and R 2.12.2. But only column subsetting error happens at R 2.10.1. I
>>>> think that's the reason why my old code doesn't work with new version
>>>> R and HTqPCR. I would really appreciate any suggestions that could
>>>> help me solve this problem.
>>>>
>>>> Windows with R 2.10.1 sessionInfo:
>>>> R version 2.10.1 (2009-12-14)
>>>> i386-pc-mingw32
>>>>
>>>> locale:
>>>> [1] LC_COLLATE=English_United States.1252
>>>> [2] LC_CTYPE=English_United States.1252
>>>> [3] LC_MONETARY=English_United States.1252
>>>> [4] LC_NUMERIC=C
>>>> [5] LC_TIME=English_United States.1252
>>>>
>>>> attached base packages:
>>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>>
>>>> other attached packages:
>>>> [1] HTqPCR_1.0.0       limma_3.2.3        RColorBrewer_1.0-2
>>>> Biobase_2.6.1
>>>>
>>>> loaded via a namespace (and not attached):
>>>> [1] affy_1.24.2          affyio_1.14.0        gdata_2.7.1
>>>> [4] gplots_2.7.4         gtools_2.6.1         preprocessCore_1.8.0
>>>> [7] tools_2.10.1
>>>>
>>>> Linux with R 2.11.1 sessionInfo:
>>>> R version 2.11.1 (2010-05-31)
>>>> x86_64-unknown-linux-gnu
>>>>
>>>> locale:
>>>>  [1] LC_CTYPE=en_US.iso88591       LC_NUMERIC=C
>>>>  [3] LC_TIME=en_US.iso88591        LC_COLLATE=en_US.iso88591
>>>>  [5] LC_MONETARY=C                 LC_MESSAGES=en_US.iso88591
>>>>  [7] LC_PAPER=en_US.iso88591       LC_NAME=C
>>>>  [9] LC_ADDRESS=C                  LC_TELEPHONE=C
>>>> [11] LC_MEASUREMENT=en_US.iso88591 LC_IDENTIFICATION=C
>>>>
>>>> attached base packages:
>>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>>
>>>> other attached packages:
>>>> [1] HTqPCR_1.2.0       limma_3.4.5        Biobase_2.8.0
>>>>  SLqPCR_1.14.0
>>>> [5] RColorBrewer_1.0-2
>>>>
>>>> loaded via a namespace (and not attached):
>>>> [1] affy_1.26.1           affyio_1.16.0         gdata_2.8.1
>>>> [4] gplots_2.8.0          gtools_2.6.2          preprocessCore_1.10.0
>>>> [7] tools_2.11.1
>>>>
>>>> Linux with R 2.12.2 sessionInfo:
>>>> R version 2.12.2 (2011-02-25)
>>>> Platform: x86_64-pc-linux-gnu (64-bit)
>>>>
>>>> locale:
>>>>  [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C
>>>>  [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8
>>>>  [5] LC_MONETARY=C             LC_MESSAGES=en_US.utf8
>>>>  [7] LC_PAPER=en_US.utf8       LC_NAME=C
>>>>  [9] LC_ADDRESS=C              LC_TELEPHONE=C
>>>> [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
>>>>
>>>> attached base packages:
>>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>>
>>>> other attached packages:
>>>> [1] HTqPCR_1.4.0       limma_3.6.9        RColorBrewer_1.0-2
>>>> Biobase_2.10.0
>>>> [5] SLqPCR_1.16.0
>>>>
>>>> loaded via a namespace (and not attached):
>>>> [1] affy_1.28.0           affyio_1.18.0         gdata_2.8.1
>>>> [4] gplots_2.8.0          gtools_2.6.2          preprocessCore_1.12.0
>>>> [7] tools_2.12.2
>>>>
>>>> Best,
>>>> Wenbo Mu
>>>>
>>>> _______________________________________________
>>>> Bioconductor mailing list
>>>> Bioconductor at r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>>>> Search the archives:
>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>>>
>>>
>>>
>>>
>>
>
>
>



More information about the Bioconductor mailing list