Entering edit mode
Hi,
I have the same problem, and it's been this way since I used biomaRt I
might say.
is there any way to force getBM to return NA when the attribute
corresponding to the filter cannot be found?
At least when annotating your results you'd be able to get same length
vectors, and it would be much easier to do that in data.frames.
thanks for any suggestions,
cheers,
Francesco
On 29 Aug 2013, at 05:40, Atul
<atulkakrana@outlook.com<mailto:atulkakrana@outlook.com>> wrote:
Hi All,
I am using Oligo package to analyse samples generated using HuEx 1.0
ST v2 chip. The problem I am facing is with annotating the results.
Here is my code (simplified):
celFilesA <- list.celfiles()
AF_data.A <- read.celfiles(celFilesA,pkgname='pd.huex.1.0.st.v2')
AF.eset.RMA <- rma(AF_data.A,target='core')
> dim(exprs(AF.eset.RMA))
[1] 22011 10
##Attempt to annotate
library(biomaRt)
ID <- rownames(AF.eset.RMA)
ensembl <- useMart('ensembl', dataset = 'hsapiens_gene_ensembl')
Anno <- getBM(attributes=c("strand","transcript_start","chromosome_nam
e","hgnc_symbol"),filters=c("affy_huex_1_0_st_v2"),values=ID,mart=ense
mbl)
> dim(Anno)
[1] 1635 4
As you see, out of total 22011 genes/probeset I can annotate only 1635
genes/probesets. Is there any way I can get the annotations for all of
the genes/probesets and add them back to my expression set
(AF.eset.RMA). So, that annotations are included in the final results.
Usually, with other chips I do this:
ID <- featureNames(AF.eset.RMA)
Symbol <- getSYMBOL(ID, 'mouse4302.db')
Name <- as.character(lookUp(ID, "mouse4302.db", "GENENAME"))
tmp <- data.frame(ID=ID, Symbol=Symbol, Name=Name,stringsAsFactors=F)
tmp[tmp=="NA"] <- NA
fData(AF.esetRMA) <- tmp
And this is what I want to achieve in present case. I would appreciate
your help.
Thanks
AK
_______________________________________________
Bioconductor mailing list
Bioconductor@r-project.org<mailto:bioconductor@r-project.org>
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives:
http://news.gmane.org/gmane.science.biology.informatics.conductor
[[alternative HTML version deleted]]
I feel your situation. Guess it is complicated to modify things on the part of biomart. But, Hey,
dplyr::left_join should be able to take care of the missing NA. (as mentioned, like a wrapper, via constructing a data frame using the input parameter "values")