[BioC] using limma package for paired t-test: Error: (subscript) logical subscript too long

Martin Morgan mtmorgan at fhcrc.org
Tue Jan 17 22:40:59 CET 2012


On 01/17/2012 01:36 PM, viritha k wrote:
> Hi group,
> I am trying to perform paired t-test for 6 samples which are paired one is
> from normal tissue of the subject and the other is tumor tissue of the same
> subject.
> I am following the code as mentioned in the Limma User guide,p.40,8.3
> Paired Samples)
>
> Code:
>> source("http://bioconductor.org/biocLite.R")
>> biocLite("limma")
>> library(limma)
>> targets<-readTargets("targets.txt")
>> head(targets)
>     FileName Pair Treatment
> 1 GSM675890    1         N
> 2 GSM675891    1         T
> 3 GSM675892    2         N
> 4 GSM675893    2         T
> 5 GSM675894    3         N
> 6 GSM675895    3         T
>
>> eset<-as.matrix(read.table("6samples.txt",sep='\t',header=TRUE,colClasses=c(rep('numeric',7)),nrow=133673))
>> head(eset)
>
>   ID_REF GSM675890 GSM675891 GSM675892 GSM675893 GSM675894 GSM675895
> [1,] 2315129  30.32278  20.42571   7.60854  17.15130  14.57533  22.22889

Hi -- The 'ID_REF' column is being treated as an expression value rather 
than a row name, so seven samples in eset but 6 in targets. try 
row.names=1 in read.table (though check that this does the trick with 
your own data). Martin

> [2,] 2315145  12.74657   6.30117  11.43528   4.10696   3.12693  10.96096
> [3,] 2315163 175.96267 125.77725  52.19822 102.07567 116.91966 174.41690
> [4,] 2315198   6.57030   1.85541   3.34829   1.13516   0.34278   1.83917
> [5,] 2315353  88.49511  48.77128  50.60524  62.92448  47.10977  45.06430
> [6,] 2315371   2.01707   1.90644 536.07636   2.21359   0.00212   0.43249
>
>> Pair<-factor(targets$Pair)
>> Treat<-factor(targets$Treatment,levels=c("N","T"))
>> design<-model.matrix(~Pair+Treat)
>> fit_pair<-lmFit(eset,design)
> Error: (subscript) logical subscript too long
>
>> sessionInfo()
> R version 2.14.1 (2011-12-22)
> Platform: i386-pc-mingw32/i386 (32-bit)
> 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] limma_3.10.1        BiocInstaller_1.2.1
> loaded via a namespace (and not attached):
> [1] tools_2.14.1
> Please suggest as to where is the issue?
> Thanks,
> Viritha
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> 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


-- 
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793



More information about the Bioconductor mailing list