Commit c5a67f6b authored by Aurelien Brionne's avatar Aurelien Brionne
Browse files

Ensembl2GO update

parent 35609565
auto_roxygenize_for_build_and_reload="1"
auto_roxygenize_for_build_package="1"
auto_roxygenize_for_check="1"
live_preview_website="1"
makefile_args=""
preview_website="1"
website_output_format="all"
[]
\ No newline at end of file
{
"debugBreakpointsState": {
"breakpoints": []
}
}
\ No newline at end of file
{
"sortOrder": [
{
"columnIndex": 2,
"ascending": true
}
],
"path": "~/Documents/programmes_R/ViSEAGO"
}
\ No newline at end of file
{
"installOptions": {
"installFromRepository": false,
"libraryPath": "/home/abrionne/R/x86_64-pc-linux-gnu-library/4.1",
"installDependencies": true
}
}
\ No newline at end of file
{
"activeTab": 1
}
\ No newline at end of file
{
"left": {
"splitterpos": 346,
"topwindowstate": "NORMAL",
"panelheight": 956,
"windowheight": 994
},
"right": {
"splitterpos": 649,
"topwindowstate": "NORMAL",
"panelheight": 956,
"windowheight": 994
}
}
\ No newline at end of file
{
"TabSet1": 3,
"TabSet2": 3,
"TabZoom": {}
}
\ No newline at end of file
build-last-errors="[]"
build-last-errors-base-dir="~/Documents/programmes_R/ViSEAGO/"
build-last-outputs="[{\"type\":0,\"output\":\"==> devtools::document(roclets = c('rd', 'collate', 'namespace'))\\n\\n\"},{\"type\":2,\"output\":\"ℹ Updating ViSEAGO documentation\\n\"},{\"type\":2,\"output\":\"ℹ Loading ViSEAGO\\n\"},{\"type\":1,\"output\":\"Writing NAMESPACE\\n\"},{\"type\":1,\"output\":\"Writing NAMESPACE\\n\"},{\"type\":2,\"output\":\"Messages d'avis :\\n1: roxygen2 requires Encoding: UTF-8 \\n2: remplacement de l'importation précédente ‘data.table::set’ par ‘dendextend::set’ lors du chargement de ‘ViSEAGO’ \\n\"},{\"type\":1,\"output\":\"Documentation completed\\n\\n\"},{\"type\":0,\"output\":\"==> R CMD INSTALL --no-multiarch --with-keep.source ViSEAGO\\n\\n\"},{\"type\":1,\"output\":\"* installing to library ‘/home/abrionne/R/x86_64-pc-linux-gnu-library/4.1’\\n\"},{\"type\":1,\"output\":\"* installing *source* package ‘ViSEAGO’ ...\\n\"},{\"type\":1,\"output\":\"** using staged installation\\n\"},{\"type\":1,\"output\":\"** R\\n\"},{\"type\":1,\"output\":\"** data\\n\"},{\"type\":1,\"output\":\"** inst\\n\"},{\"type\":1,\"output\":\"** byte-compile and prepare package for lazy loading\\n\"},{\"type\":1,\"output\":\"\"},{\"type\":1,\"output\":\"Avis : remplacement de l'importation précédente ‘data.table::set’ par ‘dendextend::set’ lors du chargement de ‘ViSEAGO’\\n\"},{\"type\":1,\"output\":\"\"},{\"type\":1,\"output\":\"** help\\n\"},{\"type\":1,\"output\":\"\"},{\"type\":1,\"output\":\"*** installing help indices\\n\"},{\"type\":1,\"output\":\"\"},{\"type\":1,\"output\":\"** building package indices\\n\"},{\"type\":1,\"output\":\"\"},{\"type\":1,\"output\":\"** installing vignettes\\n\"},{\"type\":1,\"output\":\"** testing if installed package can be loaded from temporary location\\n\"},{\"type\":1,\"output\":\"\"},{\"type\":1,\"output\":\"Avis : remplacement de l'importation précédente ‘data.table::set’ par ‘dendextend::set’ lors du chargement de ‘ViSEAGO’\\n\"},{\"type\":1,\"output\":\"\"},{\"type\":1,\"output\":\"** testing if installed package can be loaded from final location\\n\"},{\"type\":1,\"output\":\"\"},{\"type\":1,\"output\":\"Avis : remplacement de l'importation précédente ‘data.table::set’ par ‘dendextend::set’ lors du chargement de ‘ViSEAGO’\\n\"},{\"type\":1,\"output\":\"\"},{\"type\":1,\"output\":\"** testing if installed package keeps a record of temporary installation path\\n\"},{\"type\":1,\"output\":\"* DONE (ViSEAGO)\\n\"},{\"type\":1,\"output\":\"\"}]"
compile_pdf_state="{\"tab_visible\":false,\"running\":false,\"target_file\":\"\",\"output\":\"\",\"errors\":[]}"
files.monitored-path=""
find-in-files-state="{\"handle\":\"\",\"input\":\"\",\"path\":\"\",\"regex\":false,\"ignoreCase\":false,\"results\":{\"file\":[],\"line\":[],\"lineValue\":[],\"matchOn\":[],\"matchOff\":[],\"replaceMatchOn\":[],\"replaceMatchOff\":[]},\"running\":false,\"replace\":false,\"preview\":false,\"gitFlag\":false,\"replacePattern\":\"\"}"
imageDirtyState="1"
saveActionState="-1"
{"active_set":"","sets":[]}
\ No newline at end of file
{
"id": "B2ED0E48",
"path": "~/Documents/programmes_R/ViSEAGO/R/Ensembl2GO.R",
"project_path": "R/Ensembl2GO.R",
"type": "r_source",
"hash": "2790404179",
"contents": "",
"dirty": false,
"created": 1623135644592.0,
"source_on_save": false,
"relative_order": 2,
"properties": {
"source_window_id": "",
"Source": "Source",
"cursorPosition": "33,0",
"scrollLine": "16"
},
"folds": "",
"lastKnownWriteTime": 1623138979,
"encoding": "UTF-8",
"collab_server": "",
"source_window": "",
"last_content_update": 1623138979647,
"read_only": false,
"read_only_alternatives": []
}
\ No newline at end of file
#' @title Check available organisms datasets at Ensembl.
#' @description List Ensembl referenced organisms datasets from the current (NULL) or archive (number in \code{character}) annotation version.
#' @importFrom biomaRt useEnsembl listEnsembl listEnsemblGenomes useEnsemblGenomes listDatasets
#' @importFrom data.table data.table
#' @param biomart the biomart name available with \pkg{biomaRt} package \code{\link[biomaRt]{listEnsembl}} ("genes", the default) or \code{\link[biomaRt]{listEnsemblGenomes}} ("protists_mart", "fungi_mart", "plants_mart").
#' @param version the annotation version to use (eg. NULL for the default current version, or a version number in \code{character})
#' @family genomic_ressource
#' @details
#' This function gives referenced organisms genomes at \href{http://ensemblgenomes.org/}{Ensembl}.
#' It uses the \code{\link[biomaRt]{useEnsembl}} and \code{\link[biomaRt]{listDatasets}} from \pkg{biomaRt} package.
#' @return a \code{\link{genomic_ressource-class}} object required by \code{\link{annotate}}.
#' @references
#' Durinck S, Spellman P, Birney E and Huber W (2009).
#' Mapping identifiers for the integration of genomic datasets with the R/Bioconductor package biomaRt.
#' Nature Protocols, 4, pp. 1184-1191.
#'
#' Durinck S, Moreau Y, Kasprzyk A, Davis S, De Moor B, Brazma A and Huber W (2005).
#' BioMart and Bioconductor: a powerful link between biological databases and microarray data analysis. Bioinformatics, 21, pp. 3439-3440.
#'
#' Matt Dowle and Arun Srinivasan (2017). data.table: Extension of data.frame. R package version 1.10.4. https://CRAN.R-project.org/package=data.table.
#' @include genomic_ressource.R
#' @examples
#' \dontrun{
#' # check the Ensembl available biomart (if not known)
#' biomaRt::listEnsembl()
#'
#' # List Ensembl available organisms
#' Ensembl<-ViSEAGO::Ensembl2GO(
#' biomart="genes",
#' version=NULL
#' )
#' }
#' @export
Ensembl2GO=function(biomart="genes",version=NULL){
# check the ensembl host versus mart name
match.arg(biomart,c("genes","protists_mart","fungi_mart","metazoa_mart","plants_mart"))
# Connect to Ensembl
if(biomart=="genes"){
# check the ensembl genes releases
Ensembl<-listEnsembl(version=version)
# connect to Ensembl
mart<-useEnsembl(biomart,version=version)
}else{
# check the ensembl genes releases
Ensembl<-listEnsemblGenomes()
# connect to Ensembl
mart<-useEnsemblGenomes(biomart)
}
# return data in genomic_ressource class
new(
"genomic_ressource",
db="Ensembl",
stamp=paste(biomart,Ensembl$version[Ensembl$biomart==biomart]),
data=data.table(),
mart=list(mart),
organisms=data.table(listDatasets(mart))
)
}
{
"id": "D323ACC9",
"path": "~/Documents/programmes_R/ViSEAGO/vignettes/mouse_bioconductor.Rmd",
"project_path": "vignettes/mouse_bioconductor.Rmd",
"type": "r_markdown",
"hash": "3492021490",
"contents": "",
"dirty": false,
"created": 1623135161200.0,
"source_on_save": false,
"relative_order": 1,
"properties": {
"source_window_id": "",
"Source": "Source",
"cursorPosition": "573,22",
"scrollLine": "0",
"last_setup_crc32": ""
},
"folds": "",
"lastKnownWriteTime": 1623135581,
"encoding": "UTF-8",
"collab_server": "",
"source_window": "",
"last_content_update": 1623135630883,
"read_only": false,
"read_only_alternatives": []
}
\ No newline at end of file
This diff is collapsed.
{
"source_window_id": "",
"Source": "Source"
}
\ No newline at end of file
{
"source_window_id": "",
"Source": "Source",
"cursorPosition": "33,0",
"scrollLine": "16"
}
\ No newline at end of file
{
"source_window_id": "",
"Source": "Source",
"cursorPosition": "573,22",
"scrollLine": "0",
"last_setup_crc32": ""
}
\ No newline at end of file
~%2FDocuments%2Fprogrammes_R%2FViSEAGO%2FR%2FEnsembl2GO.R="23C33F9E"
~%2FDocuments%2Fprogrammes_R%2FViSEAGO%2FR%2Fannotate.R="1D2B9194"
~%2FDocuments%2Fprogrammes_R%2FViSEAGO%2Fvignettes%2Fmouse_bioconductor.Rmd="774CCA26"
{"working_dir":null,"default_chunk_options":{"eval":false,"echo":true,"fig.pos":"H","fig.width":6.0,"message":false,"comment":null,"warning":false},"chunk_definitions":[{"row":30,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"setup","include":false},"document_id":"D323ACC9","chunk_id":"csetup_chunk","chunk_label":"setup"},{"row":48,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"vignette_data_used","eval":true},"document_id":"D323ACC9","chunk_id":"caxlah7lyrurx","chunk_label":"vignette_data_used"},{"row":96,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"geneList_input","eval":true},"document_id":"D323ACC9","chunk_id":"ca4m7v06oiq0m","chunk_label":"geneList_input"},{"row":103,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"geneList_input-head","echo":false},"document_id":"D323ACC9","chunk_id":"cbcpdxffkwt7b","chunk_label":"geneList_input-head"},{"row":120,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"Genomic-ressources"},"document_id":"D323ACC9","chunk_id":"c7rwdnjqsvicv","chunk_label":"Genomic-ressources"},{"row":125,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"Genomic-ressources_show"},"document_id":"D323ACC9","chunk_id":"cf5z3oxu72u2s","chunk_label":"Genomic-ressources_show"},{"row":174,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"Enrichment_data"},"document_id":"D323ACC9","chunk_id":"c1gxgdpfekir1","chunk_label":"Enrichment_data"},{"row":202,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"Enrichment_data_tests"},"document_id":"D323ACC9","chunk_id":"c7gnlhxgjklyg","chunk_label":"Enrichment_data_tests"},{"row":228,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"Enrichment_merge"},"document_id":"D323ACC9","chunk_id":"cdcs9sq1gx6i2","chunk_label":"Enrichment_merge"},{"row":315,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"Enrichment_merge_table"},"document_id":"D323ACC9","chunk_id":"c9je698i9zs8c","chunk_label":"Enrichment_merge_table"},{"row":326,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"Enrichment_merge_count"},"document_id":"D323ACC9","chunk_id":"ct652f9secaal","chunk_label":"Enrichment_merge_count"},{"row":350,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"SS_build"},"document_id":"D323ACC9","chunk_id":"con4n57gp1q68","chunk_label":"SS_build"},{"row":358,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"SS_compute"},"document_id":"D323ACC9","chunk_id":"cp9wrvzf3fif7","chunk_label":"SS_compute"},{"row":452,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"SS_terms_mdsplot"},"document_id":"D323ACC9","chunk_id":"cuh7qp0kp561r","chunk_label":"SS_terms_mdsplot"},{"row":486,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"SS_Wang-wardD2"},"document_id":"D323ACC9","chunk_id":"cnozpiue4yymu","chunk_label":"SS_Wang-wardD2"},{"row":494,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"SS_Wang-wardD2_heatmap_display"},"document_id":"D323ACC9","chunk_id":"cmyw3gy11tfz3","chunk_label":"SS_Wang-wardD2_heatmap_display"},{"row":506,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"SS_Wang-ward.D2_table"},"document_id":"D323ACC9","chunk_id":"c4219dg7prdfr","chunk_label":"SS_Wang-ward.D2_table"},{"row":522,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"SS_Wang-ward.D2_mdsplot"},"document_id":"D323ACC9","chunk_id":"cwk8cyc4rps0e","chunk_label":"SS_Wang-ward.D2_mdsplot"},{"row":542,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"SS_Wang-wardD2_groups"},"document_id":"D323ACC9","chunk_id":"crg50u86zlntk","chunk_label":"SS_Wang-wardD2_groups"},{"row":550,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"SS_Wang-ward.D2_groups_mdsplot"},"document_id":"D323ACC9","chunk_id":"ctvgvk89aikzg","chunk_label":"SS_Wang-ward.D2_groups_mdsplot"},{"row":569,"row_count":1,"visible":true,"expansion_state":0,"options":{"engine":"r","label":"SS_Wang-wardD2_groups_heatmap"},"document_id":"D323ACC9","chunk_id":"cossfspu8cy6x","chunk_label":"SS_Wang-wardD2_groups_heatmap"}],"doc_write_time":1623135581}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment