Entering edit mode
7.1 years ago
Sharon
▴
610
I am trying to add genes ID to edgeR results . Below is part of my code. Gene Ids usually comes as NA. I would like to know what could be wrong or how can I add the genes ID. All what I have is transcripts ID, so not sure if the problem is the geneid line, and how to fix? Thanks
data <- readDGE(files)
geneid <-rownames(data)
mart <- useMart("ensembl", dataset="hsapiens_gene_ensembl", host="grch37.ensembl.org", path="/biomart/martservice")
datasets <- listDatasets(mart)
mart <- useDataset("hsapiens_gene_ensembl",mart)
genes <- getBM(attributes=c('ensembl_gene_id', 'external_gene_name'),filters='ensembl_gene_id',values=geneid,mart=mart)
rownames (genes) <- genes$ensembl_gene_id
data$genes <- genes [rownames(data), ]
print (data$genes)
group <- c(rep("WT", 2), rep("Tumor", 2))
dge = DGEList(counts=data, group=group)
dge <- calcNormFactors(dge)
dge <- estimateCommonDisp(dge)
dge <- estimateTagwiseDisp(dge)
Show us a few of your input gene IDs. Specifically, we need the ones getting associated with
NA
.Everything is NA. This is when I print data (genes). I think the problem is how to connect between transcripts and genes? I think one step is missing but don't know what it is.
I don't care what
data$genes
looks like, you need to post whatgeneid
looks like.It contains the transcripts ID, which I think is the main reason for the error. So I am missing how to go from transcripts ID to genes ID? [58349] "NR_144568.1" "NR_144569.1" "NR_144628.1" "NR_144629.1"
[58353] "NR_144632.1" "NR_144633.1" "NR_144634.1" "NR_144635.1"
[58357] "NR_144637.1" "NR_144638.1" "NR_144639.1" "NR_144640.1"
[58361] "NR_144641.1" "NR_144642.1" "NR_144643.1" "NR_144644.1"
[58365] "NR_144645.1" "NR_144646.1" "NR_144682.1" "NR_144683.1"
[58369] "NR_144684.1" "NR_144685.1" "NR_144686.1" "NR_144687.1"
[58373] "NR_144688.1" "NR_144752.1" "NR_144755.1" "NR_144756.1"
[58377] "NR_144757.1" "NR_144758.1" "NR_144759.1" "NR_144760.1"
You're searching against biomarts collection of ensembl-gene ids using NCBI transcript IDs as input. Hence the NAs.