Adding annotations to fit2
2
0
Entering edit mode
Sally ▴ 250
@sally-2430
Last seen 9.6 years ago
I want merge fit2 with a txt file I'll call MGL (mastergenelist) which contains gene id information. I am using a custom cDNA array. The reason is that I want the gene ID information along-side the rownames (which are the accession IDs). Both have identical row names. MGL has missing data. I have tried: MGLnew<-read.table(file="MGL.txt",sep="\t",header=TRUE,na.strings="",f ill=TRUE) #WORKS write.table(MGLnew,file="MGLnew.txt",sep="\t") #WORKS fit2<-merge(fit2,MGLnew,by="row.names") #NOT WORKING When I run this I get the following error message: Error in dim(data) <- dim : attempt to set an attribute on NULL What does this error message mean? How do I fix the problem? Sally Goldes [[alternative HTML version deleted]]
• 1.0k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 13 hours ago
United States
Hi Sally, Your fit2 object is of class MArrayLM, whereas MGLnew is a data.frame, so there is no clear path to merge the two (in general, I believe merge() expects things of the same class, probably data.frame). You might have better luck writing out your fit2 object using write.fit(), then reading back in using read.table(). This will give you a data.frame that you could then probably merge() with your MGLnew data.frame. Best, Jim James W. MacDonald, M.S. Biostatistician Hildebrandt Lab 8220D MSRB III 1150 W. Medical Center Drive Ann Arbor MI 48109-0646 734-936-8662 >>> "Sally" <sagoldes at="" shaw.ca=""> 02/16/09 10:35 PM >>> I want merge fit2 with a txt file I'll call MGL (mastergenelist) which contains gene id information. I am using a custom cDNA array. The reason is that I want the gene ID information along-side the rownames (which are the accession IDs). Both have identical row names. MGL has missing data. I have tried: MGLnew<-read.table(file="MGL.txt",sep="\t",header=TRUE,na.strings="",f ill=TRUE) #WORKS write.table(MGLnew,file="MGLnew.txt",sep="\t") #WORKS fit2<-merge(fit2,MGLnew,by="row.names") #NOT WORKING When I run this I get the following error message: Error in dim(data) <- dim : attempt to set an attribute on NULL What does this error message mean? How do I fix the problem? Sally Goldes [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
ADD COMMENT
0
Entering edit mode
Hi Sally, You could also try adding your annotation to fit2$genes, which is where probe annotation is usually stored. Cheers, Cei James MacDonald wrote: > Hi Sally, > > Your fit2 object is of class MArrayLM, whereas MGLnew is a data.frame, so there is no clear path to merge the two (in general, I believe merge() expects things of the same class, probably data.frame). > > You might have better luck writing out your fit2 object using write.fit(), then reading back in using read.table(). This will give you a data.frame that you could then probably merge() with your MGLnew data.frame. > > Best, > > Jim > > > James W. MacDonald, M.S. > Biostatistician > Hildebrandt Lab > 8220D MSRB III > 1150 W. Medical Center Drive > Ann Arbor MI 48109-0646 > 734-936-8662 >>>> "Sally" <sagoldes at="" shaw.ca=""> 02/16/09 10:35 PM >>> > I want merge fit2 with a txt file I'll call MGL (mastergenelist) which contains gene id information. I am using a custom cDNA array. The reason is that I want the gene ID information along-side the rownames (which are the accession IDs). Both have identical row names. MGL has missing data. > > I have tried: > > MGLnew<-read.table(file="MGL.txt",sep="\t",header=TRUE,na.strings="" ,fill=TRUE) #WORKS > write.table(MGLnew,file="MGLnew.txt",sep="\t") #WORKS > fit2<-merge(fit2,MGLnew,by="row.names") #NOT WORKING > > When I run this I get the following error message: > > Error in dim(data) <- dim : attempt to set an attribute on NULL > > What does this error message mean? How do I fix the problem? > > Sally Goldes > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > ********************************************************** > Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
ADD REPLY
0
Entering edit mode
@john-seers-ifr-1605
Last seen 9.6 years ago
Hi Sally Is fit2 by any chance the output from limma fitting a linear model? If not this is not relevant. If it is so I think you may be able to do something like fit2$genes<-cbind(fit2$genes, MGLnew) If that does not work, if you are using topTable a bit later, you can do something like this: tt<-topTable(eb, number=ngenes, genelist=cbind(eb$genes, MGLnew)) Regards John --- -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Sally Sent: 17 February 2009 03:35 To: bioconductor at stat.math.ethz.ch Cc: Sally Subject: [BioC] Adding annotations to fit2 I want merge fit2 with a txt file I'll call MGL (mastergenelist) which contains gene id information. I am using a custom cDNA array. The reason is that I want the gene ID information along-side the rownames (which are the accession IDs). Both have identical row names. MGL has missing data. I have tried: MGLnew<-read.table(file="MGL.txt",sep="\t",header=TRUE,na.strings="",f il l=TRUE) #WORKS write.table(MGLnew,file="MGLnew.txt",sep="\t") #WORKS fit2<-merge(fit2,MGLnew,by="row.names") #NOT WORKING When I run this I get the following error message: Error in dim(data) <- dim : attempt to set an attribute on NULL What does this error message mean? How do I fix the problem? Sally Goldes [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

Traffic: 645 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6