Skip to content
Snippets Groups Projects
Commit 4aef8a83 authored by Holger Brandl's avatar Holger Brandl
Browse files

cont mouse dge analysis

parent 1c22ea83
No related branches found
No related tags found
No related merge requests found
......@@ -32,9 +32,29 @@ guess_mart <- function(gene_id){
}
#guess_mart("ENSCAFG00000000043")
getGeneInfo <- function(gene_ids){
martName <- guess_mart(gene_ids[1])
cacheFile <- paste0("geneInfo.",martName, ".RData")
### Hit List Interscection Utilitities (see e.g Helin project for examples)
if(!file.exists(cacheFile)){
require(biomaRt)
mousemart = useDataset(martName, mart=useMart("ensembl"))
geneInfo <- getBM(attributes=c('ensembl_gene_id', 'external_gene_name', 'description', 'gene_biotype'), mart=mousemart);
save(geneInfo, file=cacheFile)
unloadNamespace('biomaRt')
}else{
geneInfo <- local(get(load(cacheFile)))
}
return(geneInfo)
}
########################################################################################################################
### Hit list interscection utilities (see e.g Helin project for examples)
......@@ -59,6 +79,7 @@ s1_ne_s2 <- function(s1, s2, ...) c(extractHits(s1, s2, s1Overexpressed=F, ...),
#hitdata <- rbind(hitdata, data.frame(ensembl_gene_id=AeqBexpr$gene_id, set="aRG==bRG"))
## varargs: http://stackoverflow.com/questions/3057341/how-to-use-rs-ellipsis-feature-when-writing-your-own-function
rintersect <- function(...){
LDF <- list(...)
rec_intersect <- LDF[[1]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment