Search
Question: DEXSeqHTML and biomart object
0
gravatar for ZheFrench
8 months ago by
ZheFrench10
ZheFrench10 wrote:

Could you provide a more detailed example of code to use biomart object and extra columns to add for example GeneSymbol in the output of DEXSeqHTML  ?

Not clear to me how you use mart  and attributes parameters in DEXSeqHTML

 

ADD COMMENTlink modified 8 months ago by Alejandro Reyes1.6k • written 8 months ago by ZheFrench10
1
gravatar for Alejandro Reyes
8 months ago by
Alejandro Reyes1.6k
Dana-Farber Cancer Institute, Boston, USA
Alejandro Reyes1.6k wrote:

Hi! The easiest way to do that would be something along these lines:

 

library(DEXSeq)
library(biomaRt)

data("pasillaDEXSeqDataSet", package="pasilla")
dxr <- DEXSeq( dxd )

mart <- useMart( biomart="ensembl", dataset="dmelanogaster_gene_ensembl" )
extraCols <- getBM(attributes=c("ensembl_gene_id", "ensembl_peptide_id"), filter="ensembl_gene_id",
                   mart=mart, values=geneIDs(dxd) )
extraCols <- extraCols[!duplicated(extraCols$ensembl_gene_id),]
rownames(extraCols) <- extraCols$ensembl_gene_id
DEXSeqHTML( dxr, extraCols=extraCols )

 

ADD COMMENTlink written 8 months ago by Alejandro Reyes1.6k
1

Ok so this looks like the answer to my question, sorry I didn't see it first.  I am confused, how do you know for sure that the 'ensembl_gene_id' lines up with the 'ensembl_gene_id' in dxr?  I guess because you pull from it  initially with values=geneIDs(dxd)?  Thanks!!

ADD REPLYlink written 4 months ago by Matthew Thornton290

Names are matched based on the rownames of extraCols. Thus, the rownames of extraCols should match what is stored in geneIDs(). 

Another minimal example:

library(DEXSeq)
data(pasillaDEXSeqDataSet, package="pasilla")
dxr <- DEXSeq( dxd )
extraCols <- data.frame( ids=unique(geneIDs(dxd)), mygeneIDs=sprintf("gene%0.3d", seq_along(unique(geneIDs(dxd)))))
rownames(extraCols) <- extraCols$ids
DEXSeqHTML( object=dxr, extraCols=extraCols )
ADD REPLYlink modified 4 months ago • written 4 months ago by Alejandro Reyes1.6k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 123 users visited in the last hour