Skip to content

CassandreHeritier/marklifemap

Repository files navigation

Marklifemap is a tool to visualizing your own data on a lifemap.

Marklifemap allows you to visualize your own dataset on a lifemap version that you can choose, accessible from http://lifemap.univ-lyon1.fr/.

Marklifemap is written in R language.

Installation

Marklifemap is not yet on CRAN. To install the development version:

  1. Install the release version of devtools from CRAN with install.packages("devtools").
  2. Launch R and type:
library(devtools)
install_github("cassandreheritier/marklifemap")
  1. Once installed the package can be loaded using:
library("marklifemap")

Usage

  1. Create your dataframe of dataset, with a first vector of taxids and vectors after of datasets to visualize.
data<-data.frame(yourdataset)
  1. Run marklifemap with your dataset (possible options are described below).
marklifemap(data, map='ncbi', minimap=TRUE)

Options

The marklifemap() function is called as follows by default:

marklifemap(data, map='standard', minimap=FALSE, ascendant=FALSE, descendant=FALSE, popup="none", form="none", cluster="none")

Possible options are:
map: You can choose the map among 'standard', 'ncbi', 'virus' and 'french' version.
minimap: If minimap is TRUE, another map is opened in the window, to view where you are in the tree.
ascendant: If ascendant is TRUE, all of ascendants of the taxids are shown on the lifemap.
descendant: If descendant is TRUE, all of descendants of the taxids are shown on the lifemap.
popup: You can choose the type of popup you want to view among 'dataframe' (your data are directly shown), 'sci_info' (to view informations from the Solr database about your taxids) and 'none'.
form: You can choose the form of markers among 'dataframe' (markers will be proportionals to your data numbers), 'nbdesc' (with informations from Solr) and 'none'.
cluster: You can choose the type of cluster among 'sum' and 'none'.
output: You can choose to display the search result of the request from Solr, taping 'file' to create a file in your working directory, 'merge_file' to do the same but adding your dataset, 'console' to display in the console directly and 'merge_console' with your dataset again.
filename: If 'file' in 'output' option was given, you can choose the filename.

  1. See your lifemap with markers A window appears with your lifemap, enjoy !

Initialization

To understand the functions under marklifemap with a dataset.

### create a set of data in data.frame
# first vector : example of taxids to target, Primates, Bacteria and Anaeroplasma abactoclasticum
# second vector : example of popups that you want to visualize on each taxon (with order)
# third vector : example of number of descendants you want to impose by taxon
# on a NCBI lifemap version
data<-data.frame(list("taxid"=c(2,9443,2087),"name"=c('FIRST','SECOND','THIRD'),"nbdesc"=c(300,20,109)))

### functions called
# get taxids in a vector
taxids=c(2,9443,2087)
solr_request(taxids) # function that calls database Solr, you can find names, coordinates and number of descendants of each taxon
newmap() # create a standard map
newmap(map='virus') # with virusmap

## principal function
marklifemap(data, map='ncbi', popup='dataframe', form='dataframe') # an example of lifemap with markers

Example

# with options 'cluster' and 'output'
marklifemap(data, map='ncbi', popup='dataframe', form='dataframe', cluster='sum', output='file') # with a set of data initialized as before
marklifemap(data, map='ncbi', popup='sci_info', form='nbdesc', minimap=TRUE) # with a minimap and popup informations from Solr

References

Damien DE VIENNE Package 'leaflet'


For comments, suggestions and bug reports, please open an issue on this github repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages