BUG FIXES
registration_wrapper()
now automatically handles the scenario wherek = 2
by not usingregistration_stats_anova()
and providing an apporpriate warning. Implemented by @lahuuki at #86.
BUG FIXES
read10xVisiumWrapper()
is now able to detect the GTF file used bySpaceRanger
for version 3.0.0+. Implemented by @nick-eagles at #88.
BUG FIXES
- Fixed the bug reported by @lahuuki about
vis_grid_clus()
not handlinglogical()
cluster variables. See #80. To resolve this,sort_clusters()
andget_colors()
had to change internally. Examples and documentation for both functions have now been updated to showcase what happens when you provide alogical()
vector as an input.
NEW FEATURES
- Added
add_qc_metrics()
inspired by https://github.com/LieberInstitute/Visium_SPG_AD/blob/master/code/07_spot_qc/01_qc_metrics_and_segmentation.R which adds seven new columns to thecolData(spe)
that can be useful when performing quality control of the data. Developed by @lahuuki.
NEW FEATURES
- Added support for
SpatialExperiment
objects created withvisiumStitched::build_spe()
https://research.libd.org/visiumStitched/reference/build_spe.html that stitch together multiple Visium capture areas. Developed by @Nick-Eagles.
SIGNIFICANT USER-VISIBLE CHANGES
vis_gene()
now has amulti_gene_method
argument which provides 3 methods for combining multiple continuous variables:z_score
,pca
, andsparsity
. These options can now be used withrun_app()
(the interactive websites). These methods are further illustrated and documented in a new vignette available at https://research.libd.org/spatialLIBD/articles/multi_gene_plots.html. This work was contributed by @Nick-Eagles.
NEW FEATURES
vis_clus_p()
,vis_clus()
, andvis_grid_clus()
now all use implement thena_color
argument that was present in thevis_gene()
functions. This resolves #43 by @boyiguo1.
NEW FEATURES
run_app()
now has aauto_crop_default
argument set toTRUE
by default. It can be turned off in cases where you are displaying images that do not follow the expected Visium grid dimensions, such as manually stitched images that you don't want to automatically crop.
NEW FEATURES
- Added
fetch_data("spatialDLPFC_Visium_example_subset")
which is a subset of 3 samples with only thelowres
images that can be used for example / tutorial purposes.
NEW FEATURES
- Louise A. Huuki-Myers @lahuuki added a vignette explaining the spatial registration process and all related functions. See #46 for the full pull request.
SIGNIFICANT USER-VISIBLE CHANGES
- The vignette now has a section describing the data from the
spatialDLFPC
,Visium_SPG_AD
, andlocus-c
projects that were done by members of the Keri Martinowich, Kristen R. Maynard, and Leonardo Collado-Torres LIBD teams as well as our collaborators.
SIGNIFICANT USER-VISIBLE CHANGES
fetch_data("Visium_SPG_AD_Visium_wholegenome_spe"")
,fetch_data("Visium_SPG_AD_Visium_targeted_spe")
,fetch_data("Visium_SPG_AD_Visium_wholegenome_pseudobulk_spe")
, andfetch_data("Visium_SPG_AD_Visium_wholegenome_modeling_results")
have been added. Use this to access data from the https://github.com/LieberInstitute/Visium_SPG_AD project.
SIGNIFICANT USER-VISIBLE CHANGES
fetch_data("spatialDLPFC_snRNAseq")
now works if you want to download the snRNA-seq data used in http://research.libd.org/spatialDLPFC/.
BUG FIXES
read10xVisiumAnalysis()
now supportsspaceranger
version 2023.0208.0 (internal 10x Genomics version) output files that store analysis CSVs under theouts/analysis_csv
directory instead ofouts/analysis
and also use thegene_expression_
prefix for each of the analysis directories. This was tested with @heenadivecha on files from https://github.com/LieberInstitute/spatial_DG_lifespan/blob/main/code/02_build_spe/01_build_spe.R.
SIGNIFICANT USER-VISIBLE CHANGES
gene_set_enrichment()
now internally usesfisher.test(alternative = "greater")
to test for odds ratios greater than 1. Otherwise odds ratios of 0 could be significant.
SIGNIFICANT USER-VISIBLE CHANGES
- Several changes were made to the default plotting aspect of
vis_gene()
,vis_clus()
and related plotting functions. This was done with input from @lahuuki and @nick-eagles and is described in more detail at https://github.com/LieberInstitute/spatialLIBD/commit/8fa8459d8fa881d254824d43e52193bf2c3021c0. Most noticeably, the aspect ratio is no longer stretched to fill the plotting area, the NA values will be shown with a light grey that has alpha blending, and the position of the legends has been made consistent between the plots.
NEW FEATURES
- Added the function
frame_limits()
and introduced theauto_crop
argument tovis_clus()
,vis_gene()
and all related functions. This new function enables automatically cropping the image and thus adjusting the plotting area which is useful in cases where the image is not centered and is not a square. This was based on work by @lahuuki at https://github.com/LieberInstitute/spatialDLPFC/blob/2dfb58db728c86875a86cc7b4999680ba1f34c38/code/analysis/99_spatial_plotting/01_get_frame_limits.R and https://github.com/LieberInstitute/spatialDLPFC/blob/ef2952a5a0098a36b09488ebd5e36a902bb11b48/code/analysis/99_spatial_plotting/vis_gene_crop.R.
BUG FIXES
- Fixed a bug related to
edgeR::filterByExpr()
inside ofregistration_pseudobulk()
. - Moved the
min_ncells
filtering step toregistration_pseudobulk()
rather thanregistration_wrapper()
since you should drop lowncells
before usingedgeR::filterByExpr()
.
BUG FIXES
- Fixed some bugs in
registration_stats_anova()
in cases where we only had two different unique values to compute F-statistics with, when we need at least
- Made some parts of
registration_stats_anova()
andregistration_stats_pairwise()
more flexible. registration_model()
now provides a more informative error message when you have an empty factor level, thus leading to a non-full rank model matrix.
NEW FEATURES
- Added functions for computing the modeling statistics used by the spatial
registration process. See
registration_wrapper()
and related functions. - Added a function for using the output of
layer_stat_cor()
and for labeling the clusters. This can help interpret the spatial registration results. Seeannotate_registered_clusters()
for more details.
BUG FIXES
- Fixed bugs in
gene_set_enrichment()
forreverse = TRUE
reported by @sparthib. - Added a
reverse
option on the shiny app under the gene set enrichment tab, that we tested with the examplespe
data.
SIGNIFICANT USER-VISIBLE CHANGES
- Improved the automatic color palette selector when you switch discrete variables. It also now supports the ManualAnnotation option.
- Discrete variable (cluster) legend is no longer duplicated under the clusters interactive tab.
- You can now search the model test, which helps if you have lots of tests to choose from (this most likely occurs when you are looking at the pairwise results).
SIGNIFICANT USER-VISIBLE CHANGES
- Made the shiny application more memory efficient in different areas.
- Changed the default
point_size
from 1.25 to 2. - Added the option to show or hide the spatial images on the grid panels in the shiny web application. Turn off by default since it is more efficient.
BUG FIXES
- Fix #41. Reported by @abspangler13. Now the gene selector changes automatically when you change the 'model results' (model type) or 'model test' inputs. The gene selector is now only shown inside the 'model boxplots' panel since it only affects that one.
BUG FIXES
- Fix #40. Reported by @Erik-D-Nelson.
BUG FIXES
- Added a more informative error message when 'stats' does not have ENSEMBL
gene IDs as the
rownames()
. Reported by @abspangler13 and @sparthib at #33 (comment)
SIGNIFICANT USER-VISIBLE CHANGES
- Documentation of the
layer-level data
panel atrun_app()
has been significantly increased. You can now also visualize more than 2 reduced dimensions computed on the pseudo-bulk level data (layer-level for the Maynard et al, Nature Neurosci, 2021 data). - Users can now control the font and point size on the reduced dimension plots, as well as the overall font size on the model boxplots.
- Image edit scenarios you might be interested in for having a uniform color background image are now documented; for example if you want a white or black background, or actually any valid R color name or color HEX value.
SIGNIFICANT USER-VISIBLE CHANGES
run_app()
now offers the option to chose any of thepaletteer::paletteer_d
color palettes for discrete variables.Polychrome
has been replaced as a dependency bypaletteer
. Note thatPolychrome::palette36
is still the default.run_app()
now looks for columns that end with '_colors' in their name which can be used to pre-specify colors for any companion variables. For example if you havespe$my_groups
andspe$my_groups_colors
then the second one can specify the colors that will be used for visualizingspe$my_groups
. This makes specifying default colors more flexible than before, and the user is still free to change them if necessary.
BUG FIXES
- Fix bugs in
layer_boxplot()
where it was too specific to the Maynard et al 2021 data. We have made it more flexible now. - Made the y-axis space more dynamic in
gene_set_enrichment_plot()
andlayer_matrix_plot()
.
BUG FIXES
- Fixed a bug in
sig_genes_extract()
when there's only one set of t-statistics or F statistics to extract.
SIGNIFICANT USER-VISIBLE CHANGES
- The visualization functions
vis_*()
ofSpatialLIBD
in this version match the Bioconductor 3.15 version ofSpatialExperiment
. Note that if you usedSpatialExperiment::read10xVisium()
, the names of the spatial coordinates changed at https://github.com/drighelli/SpatialExperiment/commit/6710fe8b0a7919191ecce989bb6831647385ef5f and thus you might need to switch them back if you created yourSpatialExperiment
object before this change. You can do so withspatialCoordsNames(spe) <- rev(spatialCoordsNames(spe))
.read10xVisiumWrapper()
usesSpatialExperiment::read10xVisium()
internally, so this change onSpatialExperiment
would then also affect you.
NEW FEATURES
- Now
layer_stat_cor()
has thetop_n
argument which can be used for subsetting the marker genes prior to computing the correlation as part of the spatial registration process.
NEW FEATURES
- Added the
add_key()
function to reduce code duplication and resolve #31.
NEW FEATURES
- This version is now compatible with the bioc-devel version of SpatialExperiment where spatialData() was deprecated. Details at https://github.com/LieberInstitute/spatialLIBD/pull/29/files.
BUG FIXES
- Fixed a bug where the using the left-mouse click was not working for annotating individual spots under the "gene (interactive)" tab.
NEW FEATURES
vis_gene_p()
,vis_clus_p()
and all related functions now have an argumentpoint_size
which lets you control how big the points are plotted. This can be useful for visualization purposes.- The shiny app now has an input controlling the point size. If you increase it
to say
5
, then if you zoom in theclusters (interactive)
panel, you can see larger spots when zooming in. - These features are related to #28 although the spot diameter is still not the true spot diameter. However, now you have more flexibility for visualizing the spots.
NEW FEATURES
- Expanded the Using spatialLIBD with 10x Genomics public datasets vignette to show how you can deploy your web application. See https://libd.shinyapps.io/spatialLIBD_Human_Lymph_Node_10x/ for the live example.
BUG FIXES
vis_gene()
andvis_grid_gene()
now supportgeneid
s that are found in therownames(spe)
. This makese these functions more flexible.vis_grid_gene()
andvis_grid_clus()
now have thesample_order
argument which gives you more control in case you want to plot a subset of samples. This should also reduced the memory required as discovered at LieberInstitute/spatialDLPFC#45.
NEW FEATURES
- Added support for more than one background picture per sample. This was done
through the new argument
image_id
. Resolves #25. - Added options for side by side visualization of the background image and the clusters or gene expression values in the static versions. Resolves #19.
- Allow changing the transparency level of the spots with the
alpha
argument. Resolves #20. - Add support for image manipulation with the
magick
package. Adds functionsimg_edit()
,img_update()
andimg_update_all()
as well as new features on the web application. Resolves #21. - Added support for more control over the gene color scale and in the web application also added support for reversing the order of the scale. Resolves #22 and #23.
- Added
export_cluster()
andimport_cluster()
to help export/import clustering results instead of having to save largespe
objects when exploring different clustering methods. - Added
locate_images()
andadd_images()
for adding non-standard images to aspe
object.
BUG FIXES
- Fixed an issue introduced by newer versions of
shiny
. This version ofspatialLIBD
works withshiny
version 1.7.1, though it's likely backwards compatible. Resolves #24. - Fix an issue where
as.data.frame(colData(spe))
usescheck.names = TRUE
by default and then changes the column names unintentionally.
NEW FEATURES
- Added
read10xVisiumWrapper()
and related functions that make it easier to read in the SpaceRanger output files and launch a shiny web application usingrun_app()
. These new functions read in the analysis output from SpaceRanger by 10x Genomics, in particular, the clustering and dimension reduction (projection) results.
SIGNIFICANT USER-VISIBLE CHANGES
spatialLIBD
has been updated to work withSpatialExperiment
version 1.1.701 which will be released as part of Bioconductor 3.13. This changes internal code ofspatialLIBD
which will work with any objects created withSpatialExperiment
version 1.1.700.
SIGNIFICANT USER-VISIBLE CHANGES
- The citation information has changed now that
spatialLIBD
has a bioRxiv pre-print at https://www.biorxiv.org/content/10.1101/2021.04.29.440149v1.
SIGNIFICANT USER-VISIBLE CHANGES
- We now use
plotly::toWebGL()
to make the web application more responsive.
SIGNIFICANT USER-VISIBLE CHANGES
- The documentation and help messages shown in the web application have been revamped and improved.
NEW FEATURES
- We added a new vignette that shows how you can use
spatialLIBD
with any 10x Genomics Visium dataset processed withspaceranger
. The vignette uses the publicly available human lymph node example from the 10x Genomics website.
NEW FEATURES
- Overall the package has been updated to use
SpatialExperiment
version 1.1.427 available on Bioconductor 3.13 (bioc-devel). Several functions were re-named such assce_image_gene_p()
now has a shorter namevis_gene_p()
. This update also changes these visualization functions to ONLY supportSpatialExperiment
objects instead of the original modifiedSingleCellExperiment
objects. - Updated citation information to reflect that https://doi.org/10.1038/s41593-020-00787-0 is now public. Also added a link on the README to https://doi.org/10.6084/m9.figshare.13623902.v1 for the manuscript high resolution images.
NEW FEATURES
- The functions
sce_image_gene_p()
,sce_image_gene()
,sce_image_grid()
,sce_image_grid_gene()
,sce_image_clus()
,sce_image_clus_p()
,geom_spatial()
now work with VisiumExperiment objects thanks to the new functionread_image()
andve_image_colData()
. This work was done by Brenda Pardo and Leonardo.
NEW FEATURES
fetch_data()
takes the data from sce object and creates a VisiumExperiment object containing these data thanks to the functionsce_to_ve()
. VisiumExperiment object can be obtained withfetch_data("ve")
. This work was done by Brenda Pardo and Leonardo.
NEW FEATURES
fetch_data()
now usesBiocFileCache()
when downloading the data from Dropbox.
SIGNIFICANT USER-VISIBLE CHANGES
- Added the function
enough_ram()
which is used to control the execution of examples. If it fails when usingfetch_data("sce")
thenfetch_data()
will show a warning. fetch_data(type = "sce_example")
is now supported and used visibly in the vignette, eliminating the need foreval = FALSE
chunks. This should enable testing the vignette code on the Bioconductor Single Package Builder on Windows (max 2.5 GB of RAM available).
BUG FIXES
- Fixed the example in
get_colors()
. - Fixed
layer_stat_cor_plot()
for whenmin
and/ormax
are specified.
SIGNIFICANT USER-VISIBLE CHANGES
- Documentation website is now available at http://LieberInstitute.github.io/spatialLIBD/. It gets updated with every commit on the master branch (bioc-devel) using GitHub Actions and pkgdown.
BUG FIXES
- Remove the spatialLIBD.Rproj file =( since BioC's SBP is asking me to do so http://bioconductor.org/spb_reports/spatialLIBD_buildreport_20200303135350.html
- Use
system2()
instead ofsystem()
. - Move the
set.seed()
call outside oflayer_boxplot()
as noted by Martin Morgan Bioconductor/Contributions#1389 (comment) . - Use
\linkS4class
as I see being done at https://github.com/drisso/SingleCellExperiment/search?q=linkS4class&unscoped_q=linkS4class. - Use
vapply()
instead ofsapply()
. - Fix (or attempt to) some doc links.
BUG FIXES
- Check if removing the
RcppAnnoy
line in the DESCRIPTION actually works now based on Aaron Lun's comment at eddelbuettel/rcppannoy#57 (comment).
SIGNIFICANT USER-VISIBLE CHANGES
- Include AWS links to the image TIFF files (~500mb each) as requested by Qian Zhu [email protected] for visualizing the data on the Giotto Viewer https://www.biorxiv.org/content/10.1101/701680v1.
BUG FIXES
- Fix
fetch_data()
and the vignette by specifying themode = "wb"
forutils::download.file()
in order to resolve an issue with Windows OS reported here http://bioconductor.org/spb_reports/spatialLIBD_buildreport_20200302120158.html#tokay2_buildsrc_anchor.
SIGNIFICANT USER-VISIBLE CHANGES
- Link to https://doi.org/10.1101/2020.02.28.969931 now that its public.
SIGNIFICANT USER-VISIBLE CHANGES
- https://spatial.libd.org/spatialLIBD is not supported since we are using Shiny Server and not Shiny Server Pro. So all links have now been updated to http://spatial.libd.org/spatialLIBD.
BUG FIXES
- Run a test that might help with r-lib/pkgdown#1230.
SIGNIFICANT USER-VISIBLE CHANGES
- Add mirrors for the shiny app and change the main location.
SIGNIFICANT USER-VISIBLE CHANGES
- Make
fetch_data()
more flexible. Should now work when the data is absent.
BUG FIXES
- Fix Travis badges
- Fix Kristen's name on the vignette
- Add the same welcome information to the top of the vignette, since this will be what Bioconductor users see first. Basically, we have made sure that users will see the same information first regardless if they find the package README, open the shiny app, or find the package vignette.
SIGNIFICANT USER-VISIBLE CHANGES
- Further refine the READMEs (pkg and shiny). They now include the list of links to the raw 10x Genomics files as well as a short description of the project at the top. This was in response to feedback by Andrew Jaffe.
SIGNIFICANT USER-VISIBLE CHANGES
- Update main package READMEs to reflect the changes to the shiny web app README.md.
NEW FEATURES
- Added Kristen R Maynard to the DESCRIPTION file.
- Improved the shiny app page footer.
- Moved around the documentation and added a new main tab with an overview in response to the feedback by Stephanie Hicks.
NEW FEATURES
- Added a
NEWS.md
file to track changes to the package. - First full version of the package to be submitted to Bioconductor. Note that
the
ExperimentHub::ExperimentHub()
functionality won't work until they approve the package. However, for nowfetch_data()
has a backup mechanism in place. - Submitted to Bioconductor here.