> For the complete documentation index, see [llms.txt](https://gitbook.bergelsonlab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.bergelsonlab.com/data-pipeline/use-seedlings-nouns-in-the-scripts.md).

# Use SEEDLingS-Nouns in the scripts

## Get the most recent public version

<details>

<summary>(Do this only once) Clone the seedlings-nouns repository to the "BLAB_DATA" folder in your home directory</summary>

Check if you've done this before with

```bash
git -C ~/BLAB_DATA/seedlings-nouns git status
```

One way to do this is to run the following in the terminal:

```bash
# It is ok if you already have the BLAB_DATA folder.
mkdir -p ~/BLAB_DATA &&
cd ~/BLAB_DATA &&
git clone https://github.com/BergelsonLab/seedlings-nouns.git
```

</details>

Run in the R console:

```r
library(blabr)
get_latest_version('seedlings-nouns')
```

It will print the latest available public version. Let's say it was `v1.0.0`. Then use the following line in your code:

```
library(blabr)
seedlings_nouns <- get_seedlings_nouns('v1.0.0')
```

Repeat to update the version.

### Get other files from the dataset

To get the information stored in `regions.csv`, `recordings.csv`, `sub-recordings.csv` (see [SEEDLingS - Nouns](/data-pipeline.md#files) or `README.md` in the repository), use

```r
get_seedlings_nouns(version = 'v?.?.?', table = 'regions')
```

To get the codebooks, set the `get_codebook` parameter to TRUE. It can be combined with the `table` parameter.

#### Why are regions so weird?

Only the parts that were listened to are in the dataset. So, a (02:12:06-03:12:06) original annotated subregion that overlaps with a (02:52:06-03:32:06) silent region, will be represented as a (02:12:06-02:52:06) subregion in the dataset.

## Get the most current development version

If recent changes to the annotations haven't made it to the public version of seedlings-nouns yet, and you really need those changes, you can use the development version. Here is how:

* Clone the seedlngs-nouns\_private repository to `~/BLAB_DATA`:

  ```sh
  mkdir -p ~/BLAB_DATA
  git clone https://github.com/BergelsonLab/seedlings-nouns_private.git
  ```
* Find the latest development version:

  ```
  blabr::get_latest_version('seedlings-nouns_private')
  ```
* Then use the printed-out version in the `get_seedlings_nouns` call.&#x20;
* Set a reminder to switch to the public version before sending the script outside of BLab.

## I use all\_basiclevel, do I need to switch to SEEDLingS-Nouns?

{% hint style="warning" %}
If you don't know what `all_basiclevel` is - ignore this section.
{% endhint %}

`all_basiclevel` will keep being updated. So, if your script is using it and you don't want to switch to `seedlings-nouns` yet - that's fine. However, `all_basiclevel` doesn't have a public version, so you will still need to do the switch before sharing your code outside of BLab.
