Successful spatial heatmap plotting requires the aSVG features of interest have matching samples (cells, tissues, etc) in the data. This function is designed to replace existing features in aSVG files with user-provided features. Note this function treats the first column in the feature data frame as user-provided features, so custom features must be the first column.
The data frame returned by
The directory path where the aSVG files to update. It should be the same with
Nothing is returned. The aSVG files of interest in
dir are updated with new features, and are ready to use in function
Hadley Wickham, Jim Hester and Jeroen Ooms (2019). xml2: Parse XML. R package version 1.2.2. https://CRAN.R-project.org/package=xml2
Cardoso-Moreira, Margarida, Jean Halbert, Delphine Valloton, Britta Velten, Chunyan Chen, Yi Shao, Angélica Liechti, et al. 2019. "Gene Expression Across Mammalian Organ Development." Nature 571 (7766): 505-9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# The following shows how to download a chicken aSVG containing spatial features of 'brain' # and 'heart' from the EBI aSVG repository directly # (https://github.com/ebi-gene-expression-group/anatomogram/tree/master/src/svg). An empty # directory is recommended so as to avoid overwriting existing SVG files with the same names. # Here "~/test" is used. # Make an empty directory "~/test" if not exist. if (!dir.exists('~/test')) dir.create('~/test') # Query the remote EBI aSVG repo. feature.df <- return_feature(feature=c('heart', 'brain'), species=c('gallus'), dir='~/test', match.only=TRUE, remote=TRUE) feature.df # New features. ft.new <- c('BRAIN', 'HEART') # Add new features to the first column. feature.df.new <- cbind(featureNew=ft.new, feature.df) feature.df.new # Update features. update_feature(feature=feature.df.new, dir='~/test')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.