Hello,
I am a beginner in using limma in order to analyse data and have some problems when trying to use it for the analysis of RNA-seq data.
To be more precize, I have a time course experiment, with samples from two conditions obtained at different time points, and I would like to see how gene expression changes through time.
I have a count table dataframe with genes as rows and conditions as colums and here is what I've done:
countTable<-read.table("TableauDeseq.txt",header=TRUE,sep="\t",na.strings="NA")
row.names(countTable)=make.names(countTable[,1], unique=TRUE)
#creating the targets frame from the file Target.txt which is:
#FileName Target
#F1 condition1 (=first column of countTable)
#etc
targets <- readTargets("Target.txt",sep="\t")
row.names(targets)=make.names(targets[,1])
#now for creating a design matrix
conditions<-factor(c("condition1","condition2","condition3","condition4","condition5","condition6","condition7","condition8"))
f <- factor(targets$Target, levels=conditions)
design <- model.matrix(~0+f)
colnames(design) <- conditions
#this gives me something like:
# condition1 condition2 ...
#1 0 1
#2 1 0
#Then I try to normalize my data
library("edgeR")
Count=data.matrix(countTable,rownames.force=NA)#because it won't be numeric otherwise?
norm.factor <- calcNormFactors(Count)
#I try to use voom
y<-DGEList(counts=Count, lib.size=colSums(Count)*norm.factor, norm.factors=norm.factor, genes=rownames(countTable))
And this is where it returns an error:
Error in plot.window(...) : finite values needed for 'ylim'
1: In min(x) : no argument found for min ; Inf is returned
2: In max(x) : no argument found for max ; -Inf is returned
Could someone please help me? I don't really know what I have done wrong.
Another thing, more general this time. Could someone explain to me how is used the design matrix exactly?
Thanks for reading!
(please forgive me if you see any grammar mistake- i'm french. But you're welcome to correct me.)
I am a beginner in using limma in order to analyse data and have some problems when trying to use it for the analysis of RNA-seq data.
To be more precize, I have a time course experiment, with samples from two conditions obtained at different time points, and I would like to see how gene expression changes through time.
I have a count table dataframe with genes as rows and conditions as colums and here is what I've done:
countTable<-read.table("TableauDeseq.txt",header=TRUE,sep="\t",na.strings="NA")
row.names(countTable)=make.names(countTable[,1], unique=TRUE)
#creating the targets frame from the file Target.txt which is:
#FileName Target
#F1 condition1 (=first column of countTable)
#etc
targets <- readTargets("Target.txt",sep="\t")
row.names(targets)=make.names(targets[,1])
#now for creating a design matrix
conditions<-factor(c("condition1","condition2","condition3","condition4","condition5","condition6","condition7","condition8"))
f <- factor(targets$Target, levels=conditions)
design <- model.matrix(~0+f)
colnames(design) <- conditions
#this gives me something like:
# condition1 condition2 ...
#1 0 1
#2 1 0
#Then I try to normalize my data
library("edgeR")
Count=data.matrix(countTable,rownames.force=NA)#because it won't be numeric otherwise?
norm.factor <- calcNormFactors(Count)
#I try to use voom
y<-DGEList(counts=Count, lib.size=colSums(Count)*norm.factor, norm.factors=norm.factor, genes=rownames(countTable))
And this is where it returns an error:
Error in plot.window(...) : finite values needed for 'ylim'
1: In min(x) : no argument found for min ; Inf is returned
2: In max(x) : no argument found for max ; -Inf is returned
Could someone please help me? I don't really know what I have done wrong.
Another thing, more general this time. Could someone explain to me how is used the design matrix exactly?
Thanks for reading!
(please forgive me if you see any grammar mistake- i'm french. But you're welcome to correct me.)
Comment