From a5503ae51c5c8f84df4e0ed8dd0a1fcdb78d07c5 Mon Sep 17 00:00:00 2001 From: Garrett Stevens Date: Wed, 11 Dec 2024 16:31:09 -0700 Subject: [PATCH] Several typo fixes an improvements --- .../docs/admin/user-guide/upload-assembly.md | 2 +- .../try-it-out/01-setting-up.md | 59 ++---------------- .../try-it-out/02-loading-data.md | 60 ++++++++++++++++++- 3 files changed, 65 insertions(+), 56 deletions(-) diff --git a/packages/website/docs/admin/user-guide/upload-assembly.md b/packages/website/docs/admin/user-guide/upload-assembly.md index b8bcde8b8..c6931c61e 100644 --- a/packages/website/docs/admin/user-guide/upload-assembly.md +++ b/packages/website/docs/admin/user-guide/upload-assembly.md @@ -18,7 +18,7 @@ Apollo3. ![alt text](image-1.png) - Upload gff3 file containing annotation along with sequence. If we want to - upload annotations along with the sequence, we needc to select + upload annotations along with the sequence, we need to select `Also load features from GFF3 file`. ![alt text](image-2.png) diff --git a/packages/website/docs/getting-started/try-it-out/01-setting-up.md b/packages/website/docs/getting-started/try-it-out/01-setting-up.md index 661b0bbae..927002b72 100644 --- a/packages/website/docs/getting-started/try-it-out/01-setting-up.md +++ b/packages/website/docs/getting-started/try-it-out/01-setting-up.md @@ -19,59 +19,11 @@ unzip data.zip rm data.zip ``` -You'll now have a folder called `data/` in your directory. - -## Setting up the Apollo CLI - -The Apollo CLI is used to configure and load data into Apollo. We'll need a -config file for our CLI configuration. For simplicity, we'll create an empty -file called `config.yml` in a new directory. - -```sh -mkdir cli -touch cli/config.yml -``` - -We'll use Docker to run the Apollo CLI. To avoid having to re-type the Docker -commands, we use this function: - -```sh -function apollo() { - docker \ - run \ - --rm \ - --interactive \ - --add-host host.docker.internal=host-gateway \ - --volume ./cli:/root/.config/apollo-cli \ - --volume ./data:/data \ - ghcr.io/gmod/apollo-cli \ - "$@" -} -``` - -Paste and run the above command in your terminal to create the function, then -run `apollo version` in your terminal. You should see something like this -output: - -``` -$ apollo --version -@apollo-annotation/cli/0.1.20 linux-x64 node-v18.20.4 -``` - -:::tip - -If you're familiar with installing Node.js packages you can install the Apollo -CLI instead of using Docker. - -```bash npm2yarn -npm install -g @apollo-annotation/cli -``` - -::: +You'll now have two directories called `data/` and `jbrowse_data/`. ## Running Apollo -Create a file called `config.yml` and paste the following contents into the +Create a file called `compose.yml` and paste the following contents into the file: ```yml title="compose.yml" @@ -90,6 +42,7 @@ services: ALLOW_GUEST_USER: true GUEST_USER_ROLE: admin ALLOW_ROOT_USER: true + ROOT_USER_NAME: root ROOT_USER_PASSWORD: password JWT_SECRET: local_testing_only SESSION_SECRET: local_testing_only @@ -170,6 +123,6 @@ volumes: uploads: null ``` -Now in the terminal, run `cd apollo3-annotation/` and `docker compose up`. -Apollo is now running! You can use Ctrl + C to stop it -when you are done. +Now in the terminal, run `docker compose up`. You should see a stream of logs +from the Docker containers. If you do, Apollo is now running! You can use +Ctrl + C in the terminal to stop Apollo when you are done. diff --git a/packages/website/docs/getting-started/try-it-out/02-loading-data.md b/packages/website/docs/getting-started/try-it-out/02-loading-data.md index 1c11aeb1e..373ba6587 100644 --- a/packages/website/docs/getting-started/try-it-out/02-loading-data.md +++ b/packages/website/docs/getting-started/try-it-out/02-loading-data.md @@ -1,12 +1,62 @@ # Loading data +## Setting up the Apollo CLI + +The Apollo CLI is used to configure and load data into Apollo. We'll need a +config file for our CLI configuration. For simplicity, we'll create an empty +file called `config.yml` in a new directory. + +```sh +mkdir cli +touch cli/config.yml +``` + +We'll use Docker to run the Apollo CLI. To avoid having to re-type the Docker +commands, we use this function: + +```sh +function apollo() { + docker \ + run \ + --rm \ + --interactive \ + --add-host host.docker.internal=host-gateway \ + --volume ./cli:/root/.config/apollo-cli \ + --volume ./data:/data \ + ghcr.io/gmod/apollo-cli \ + "$@" +} +``` + +Paste and run the above command in your terminal to create the function, then +run `apollo version` in your terminal. You should see something like this +output: + +``` +$ apollo --version +@apollo-annotation/cli/0.1.20 linux-x64 node-v18.20.4 +``` + +:::tip + +If you're familiar with installing Node.js packages you can install the Apollo +CLI instead of using Docker. + +```bash npm2yarn +npm install -g @apollo-annotation/cli +``` + +::: + +## Configuring the Apollo CLI + Open a new terminal in the same directory where you ran the setup commands. To use the Apollo CLI, we need to configure it with the information for the running Apollo installation. You can have multiple profiles configured, but we will use a single default profile. Run these commands: ```sh -apollo config address http://localhost/apollo +apollo config address http://host.docker.internal/apollo apollo config accessType root apollo config rootCredentials.username root apollo config rootCredentials.password password @@ -16,6 +66,8 @@ apollo login If you need to log in again, run `apollo logout` first, or use `apollo login --force`. +## Adding assemblies + The next step is to add an assembly. We're going to use use trimmed-down assembly that only includes a single chromosome. This is so that the data is small enough to be self-contained inside this repository, without the need for @@ -34,7 +86,7 @@ apollo assembly \ --assembly 'Schistosoma mansoni' ``` -Now that we have an assembly, lets add the annotations we want to curate. They +Now that we have an assembly, let's add the annotations we want to curate. They are stored in a GFF3 file. Run this command to import the annotations: ```sh @@ -44,6 +96,8 @@ apollo feature \ --assembly 'Schistosoma mansoni' ``` +## Adding annotations + Next we're going to add a second assembly and set of annotations. This assembly is from the related species Schistosoma haematobium. Run these two commands to add the assembly and annotations: @@ -62,6 +116,8 @@ apollo feature \ --assembly 'Schistosoma haematobium' ``` +## Adding evidence tracks + Apollo is now set up to be able to annotate these genomes. In order to help with the annotation, though, it's often useful to include evidence tracks. Apollo is built on top of JBrowse 2, so we'll add these evidence tracks to the underlying