Hi, I am very new to the RNA Seq data analysis and I am trying to do the GO enrichment analysis using the biomaRt package of R. I want to merge the GO annotation to the DESeq2 data. I run the following script to obtain the GO terms
library(DESeq2)
library(biomaRt)
listMarts(host="plants.ensembl.org")
m <- useMart("plants_mart", host="plants.ensembl.org")
m <- useMart("plants_mart", dataset="osativa_eg_gene", host="plants.ensembl.org")
go <- getBM(attributes=c("ensembl_gene_id","ensembl_transcript_id", "start_position", "end_position","go_id","name_1006"), mart=m)
go[1:10,]
write.table(go, "GOannotationsBiomart.txt", quote=FALSE, row.names=FALSE, col.names=FALSE, sep="\t")`
Now I want merge the above GO details with DESeq2 data. The final table of DESeq2 data are as follows
write.csv(data, file=paste0(outputPrefix,"_results_with_normalized_final.csv"))
results_csv<-"O_sativa_DESeq2_results_with_normalized_final.csv"
write.table(read.csv(results_csv), gsub(".csv",".txt",results_csv))
results_txt<-"O_sativa_DESeq2_results_with_normalized_final.txt"
a<-read.table(results_txt, head=TRUE)
Any Suggestion and alternative tutorial will be appreciated. Thanks