Entering edit mode
viritha kaza
▴
580
@viritha-kaza-4318
Last seen 10.3 years ago
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,colCla
sses=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
[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]]