From c4be6a13cf2e1d2ef207ea5a3a445081a64e73eb Mon Sep 17 00:00:00 2001 From: Gregory Jefferis Date: Tue, 31 Dec 2024 09:17:37 +0000 Subject: [PATCH] readme polishing * including updating Schlegel et al to published citation * information about installing released versions * using static flywire cell types when building --- README.Rmd | 24 +++++++++----- README.md | 92 ++++++++++++++++++++++++++++-------------------------- 2 files changed, 65 insertions(+), 51 deletions(-) diff --git a/README.Rmd b/README.Rmd index 6d86f57..addbae5 100644 --- a/README.Rmd +++ b/README.Rmd @@ -11,6 +11,9 @@ knitr::opts_chunk$set( fig.path = "man/figures/README-", out.width = "100%" ) +# use released flywire cell types even if you have access to in progress +# information +options(fafbseg.use_static_celltypes = TRUE) ``` @@ -62,15 +65,22 @@ anticipated late 2024. ## Installation -You can install the development version of **coconatfly** like so: +We recommend installing the latest version of **coconatfly** from github like so: -``` r +```{r eval=FALSE} install.packages('natmanager') natmanager::install(pkgs = 'coconatfly') ``` -Some of the datasets exposed by **coconatfly** require authentication for access or -are still being annotated in private pre-release. Please consult individual +but you may also choose a specific +[released version](https://github.com/natverse/coconatfly/releases) +for enhanced reproducibility: +```{r eval=FALSE} +natmanager::install(pkgs = 'coconatfly@v0.2.2') +``` + +Some of the datasets exposed by **coconatfly** require authentication for access +or are still being annotated in private pre-release. Please consult individual package dependencies for authentication details and do not be surprised if you do not have access to all datasets at this time. @@ -96,7 +106,7 @@ library(dplyr) Two important functions are `cf_ids()` which allows you to specify a set of neurons from one or more datasets and `cf_meta()` which fetches information -about the cell type. +about each neuron including its cell type. For example let's fetch information about DA1 projection neurons: ```{r} @@ -191,7 +201,7 @@ cell type of two cells / hemisphere (i.e. they should not have been split into two cell types in the hemibrain). You can also see that cells from one hemibrain hemisphere often cluster slightly -oddly (e.g. 387687146) - this is likely due to truncation of the axons or dendrites of these cells +oddly (e.g. `387687146`) - this is likely due to truncation of the axons or dendrites of these cells or a paucity of partners from the left hand side of the hemibrain. ## Going further @@ -208,7 +218,7 @@ In addition in order to justify continued development of natverse tools in gener coconatfly in particular, we would appreciate two citations for * For the natverse: [Bates et al eLife 2020](https://doi.org/10.7554/eLife.53350) -* For coconatfly: [Schlegel et al bioRxiv 2023](https://doi.org/10.1101/2023.06.27.546055) +* For coconatfly: [Schlegel et al Nature 2024](https://doi.org/10.1038/s41586-024-07686-5) Should you make significant use of natverse packages in your paper (e.g. multiple panels or >1 figure), we would also strongly diff --git a/README.md b/README.md index 99c0340..d1eb84a 100644 --- a/README.md +++ b/README.md @@ -60,13 +60,22 @@ anticipated late 2024. ## Installation -You can install the development version of **coconatfly** like so: +We recommend installing the latest version of **coconatfly** from github +like so: ``` r install.packages('natmanager') natmanager::install(pkgs = 'coconatfly') ``` +but you may also choose a specific [released +version](https://github.com/natverse/coconatfly/releases) for enhanced +reproducibility: + +``` r +natmanager::install(pkgs = 'coconatfly@v0.2.2') +``` + Some of the datasets exposed by **coconatfly** require authentication for access or are still being annotated in private pre-release. Please consult individual package dependencies for authentication details and @@ -97,8 +106,8 @@ library(dplyr) Two important functions are `cf_ids()` which allows you to specify a set of neurons from one or more datasets and `cf_meta()` which fetches -information about the cell type. For example let’s fetch information -about DA1 projection neurons: +information about each neuron including its cell type. For example let’s +fetch information about DA1 projection neurons: ``` r cf_meta(cf_ids('DA1_lPN', datasets = 'hemibrain')) @@ -110,47 +119,44 @@ cf_meta(cf_ids('DA1_lPN', datasets = 'hemibrain')) #> 5 722817260 701 2435 2435 5635 Traced Roughly traced 1104413432 #> 6 754534424 646 2364 2364 5309 Traced Roughly traced 1265805547 #> 7 754538881 623 2320 2320 4867 Traced Roughly traced 1217284590 -#> cropped instance type lineage notes soma side class group dataset -#> 1 FALSE DA1_lPN_R DA1_lPN AVM02 TRUE R hemibrain -#> 2 FALSE DA1_lPN_R DA1_lPN AVM02 TRUE R hemibrain -#> 3 FALSE DA1_lPN_R DA1_lPN AVM02 TRUE R hemibrain -#> 4 FALSE DA1_lPN_R DA1_lPN AVM02 FALSE R hemibrain -#> 5 FALSE DA1_lPN_R DA1_lPN AVM02 FALSE R hemibrain -#> 6 FALSE DA1_lPN_R DA1_lPN AVM02 TRUE R hemibrain -#> 7 FALSE DA1_lPN_R DA1_lPN AVM02 TRUE R hemibrain -#> key -#> 1 hb:1734350788 -#> 2 hb:1734350908 -#> 3 hb:1765040289 -#> 4 hb:5813039315 -#> 5 hb:722817260 -#> 6 hb:754534424 -#> 7 hb:754538881 +#> cropped instance type lineage notes soma side class subclass subsubclass +#> 1 FALSE DA1_lPN_R DA1_lPN AVM02 TRUE R +#> 2 FALSE DA1_lPN_R DA1_lPN AVM02 TRUE R +#> 3 FALSE DA1_lPN_R DA1_lPN AVM02 TRUE R +#> 4 FALSE DA1_lPN_R DA1_lPN AVM02 FALSE R +#> 5 FALSE DA1_lPN_R DA1_lPN AVM02 FALSE R +#> 6 FALSE DA1_lPN_R DA1_lPN AVM02 TRUE R +#> 7 FALSE DA1_lPN_R DA1_lPN AVM02 TRUE R +#> group dataset key +#> 1 hemibrain hb:1734350788 +#> 2 hemibrain hb:1734350908 +#> 3 hemibrain hb:1765040289 +#> 4 hemibrain hb:5813039315 +#> 5 hemibrain hb:722817260 +#> 6 hemibrain hb:754534424 +#> 7 hemibrain hb:754538881 ``` We can also do that for multiple brain datasets ``` r da1meta <- cf_meta(cf_ids('DA1_lPN', datasets = c('hemibrain', 'flywire'))) -#> Updating 6641 ids -#> flywire_rootid_cached: Looking up 6641 missing keys -#> Updating 5480 ids -#> flywire_rootid_cached: Looking up 5480 missing keys +#> Loading required namespace: git2r head(da1meta) -#> id side class type lineage group instance dataset -#> 1 720575940604407468 R central DA1_lPN ALl1_ventral DA1_lPN_R flywire -#> 2 720575940623543881 R central DA1_lPN ALl1_ventral DA1_lPN_R flywire -#> 3 720575940637469254 R central DA1_lPN ALl1_ventral DA1_lPN_R flywire -#> 4 720575940614309535 L central DA1_lPN ALl1_ventral DA1_lPN_L flywire -#> 5 720575940617229632 R central DA1_lPN ALl1_ventral DA1_lPN_R flywire -#> 6 720575940619385765 L central DA1_lPN ALl1_ventral DA1_lPN_L flywire -#> key -#> 1 fw:720575940604407468 -#> 2 fw:720575940623543881 -#> 3 fw:720575940637469254 -#> 4 fw:720575940614309535 -#> 5 fw:720575940617229632 -#> 6 fw:720575940619385765 +#> id side class subclass subsubclass type lineage +#> 1 720575940604407468 R central ALPN uniglomerular DA1_lPN ALl1_ventral +#> 2 720575940623543881 R central ALPN uniglomerular DA1_lPN ALl1_ventral +#> 3 720575940637469254 R central ALPN uniglomerular DA1_lPN ALl1_ventral +#> 4 720575940614309535 L central ALPN uniglomerular DA1_lPN ALl1_ventral +#> 5 720575940617229632 R central ALPN uniglomerular DA1_lPN ALl1_ventral +#> 6 720575940619385765 L central ALPN uniglomerular DA1_lPN ALl1_ventral +#> group instance dataset key +#> 1 DA1_lPN_R flywire fw:720575940604407468 +#> 2 DA1_lPN_R flywire fw:720575940623543881 +#> 3 DA1_lPN_R flywire fw:720575940637469254 +#> 4 DA1_lPN_L flywire fw:720575940614309535 +#> 5 DA1_lPN_R flywire fw:720575940617229632 +#> 6 DA1_lPN_L flywire fw:720575940619385765 ``` ``` r @@ -275,10 +281,8 @@ seems to work very well for this purpose. ``` r cf_cosine_plot(cf_ids('/type:LAL0(08|09|10|42)', datasets = c("flywire", "hemibrain"))) -#> Updating 6641 ids -#> Updating 5480 ids -#> Matching types across datasets. Dropping 510/1052 output partner types with total weight 9007/24134 -#> Matching types across datasets. Dropping 793/1493 input partner types with total weight 11121/27588 +#> Matching types across datasets. Keeping 542/1052 output connections with total weight 15127/24134 (63%) +#> Matching types across datasets. Keeping 700/1493 input connections with total weight 16467/27588 (60%) ``` @@ -293,7 +297,7 @@ constitute a single cell type of two cells / hemisphere (i.e. they should not have been split into two cell types in the hemibrain). You can also see that cells from one hemibrain hemisphere often cluster -slightly oddly (e.g. 387687146) - this is likely due to truncation of +slightly oddly (e.g. `387687146`) - this is likely due to truncation of the axons or dendrites of these cells or a paucity of partners from the left hand side of the hemibrain. @@ -313,8 +317,8 @@ we would appreciate two citations for - For the natverse: [Bates et al eLife 2020](https://doi.org/10.7554/eLife.53350) -- For coconatfly: [Schlegel et al bioRxiv - 2023](https://doi.org/10.1101/2023.06.27.546055) +- For coconatfly: [Schlegel et al Nature + 2024](https://doi.org/10.1038/s41586-024-07686-5) Should you make significant use of natverse packages in your paper (e.g. multiple panels or \>1 figure), we would also strongly appreciate