Skip to content

Commit

Permalink
Merge pull request #30 from brain-bican/sprint_1
Browse files Browse the repository at this point in the history
Sprint 1 completed
  • Loading branch information
hkir-dev authored Oct 31, 2023
2 parents 5c187f4 + be32640 commit cf0279f
Show file tree
Hide file tree
Showing 12 changed files with 512 additions and 29 deletions.
16 changes: 13 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ RUN apt-get update && \
libcurl4-openssl-dev \
openssl \
r-base \
leiningen
leiningen \
gpg

# to speedup R package installations (try apt-cache search r-cran-remotes) https://datawookie.dev/blog/2019/01/docker-images-for-r-r-base-versus-r-apt/
#RUN apt-get update && \
Expand Down Expand Up @@ -71,10 +72,19 @@ RUN mkdir $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/cross_taxonomy.html $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/ols_form.html $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/taxonomy_view.html $WORKSPACE/nanobot/src/resources
ADD nanobot/src/resources/table.html $WORKSPACE/nanobot/src/resources

RUN apt-get install -y aha \
# GH cli on linux is old (2.4.0), get the latest
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
RUN chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null


RUN apt-get update && \
apt-get install -y aha \
sqlite3 \
python3-psycopg2
python3-psycopg2 \
gh

# restore WORKDIR
WORKDIR /tools
Expand Down
58 changes: 55 additions & 3 deletions docs/Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,62 @@ You can download TDT Docker image through following the steps defined in project
docker pull ghcr.io/brain-bican/taxonomy-development-tools:latest
```

## Build Taxonomy Development Tools
# Install requirements

Alternatively, you can build TDT docker image in your local. Checkout the project and run given command in the project root folder:
## Docker

- Install [Docker](https://www.docker.com/get-docker) and make sure its runnning properly, for example by typing `docker ps` in your terminal or command line (CMD). If all is ok, you should be seeing something like:

```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
```

## Git

1. Setup your GitHub user configs

```
git config --global user.name "your_github_user"
git config --global user.email "your_github_email"
```

2. Create a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).

3. Set `GH_TOKEN` environment variable.

- You can use `nano` or any other editor to edit the files.

For bash (Linux):
```
nano ~/.bashrc
```

For zshrc (MacOS):
```
nano ~/.zshrc
```

- When the file opens, add the environment variable in a new line:

```
export GH_TOKEN=my_github_personal_access_token_here`
```

- Reinitialize the configuration file to apply the changes to the current session:

`source ~/.bashrc` or `source ~/.zshrc`

- Test your new config:

```
echo $GH_TOKEN
```


## Build Taxonomy Development Tools (Optional)

Users are suggested to use the [Get Taxonomy Development Tools](#get-taxonomy-development-tools) step to have a TDT Docker Image. But, alternatively, you can build TDT docker image in your local. Checkout the project and run given command in the project root folder:

```
docker build -t "ghcr.io/brain-bican/taxonomy-development-tools" .
docker build --no-cache -t "ghcr.io/brain-bican/taxonomy-development-tools" .
```
12 changes: 1 addition & 11 deletions docs/NewRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,7 @@ instructions here.

We will walk you though the steps to make a new ontology project

## 1. Install requirements

- [docker](https://www.docker.com/get-docker): Install Docker and make sure its runnning properly, for example by typing `docker ps` in your terminal or command line (CMD). If all is ok, you should be seeing something like:

```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
```

- git, for example bundled with [GitHub Desktop](https://desktop.github.com/)

## 2. Download the wrapper script and pull latest ODK version
## 1. Download the wrapper script and pull latest ODK version

- Linux/Mac: [seed-via-docker.sh](https://raw.githubusercontent.com/brain-bican/taxonomy-development-tools/main/seed-via-docker.sh)
- PC: [seed-via-docker.bat](https://raw.githubusercontent.com/brain-bican/taxonomy-development-tools/main/seed-via-docker.bat)
Expand Down
5 changes: 5 additions & 0 deletions examples/nhp_basal_ganglia/AIT115_annotation_sheet_delete.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cluster_id cluster_name level 3 (subclass) level 2 (neighborhood) level1 (class) region.info (Frequency) NSForest markers (Combo)
1 1_MSN D1-Matrix D1-MSN MSN PuR(0.52) | CaH(0.39) EPYC, RELN, GULP1
2 2_MSN D1-Matrix D1-MSN MSN CaH(0.95) SEMA3E, TOX3, RELN, RAP1GAP
3 3_MSN D1-Matrix D1-MSN MSN CaH(0.59) | PuR(0.38) RELN, FGGY, CDH10
4 4_MSN D1-Matrix D1-MSN MSN PuR(0.91) | CaH(0.08) EVC, RXFP2, ETV5, SEMA3E
2 changes: 1 addition & 1 deletion examples/nhp_basal_ganglia/CCN20230601_project_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: CCN20230601
title: NHP Basal Ganglia taxonomy
description: Atlas of human primary motor cortex (M1), developed in collaboration with the BRAIN Initiative Cell Census Network (BICCN).
description: Atlas of non-human primate basal ganglia, developed in collaboration with the BRAIN Initiative Cell Census Network (BICCN).
github_org: hkir-dev
repo: nhp_basal_ganglia_taxonomy
author: https://orcid.org/0000-0002-7073-9172
Expand Down
6 changes: 6 additions & 0 deletions nanobot/nanobot.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,10 @@ commands = [
["git", "pull"],
["git", "-c", "color.ui=always", "status"],
["gh", "release", "create", "--tag", "'{tag}'"],
]

[actions.purl]
label = "Publish PURL"
commands = [
["tdta", "purl-publish", "-i", "./", "-t", "$$TAXONOMY_ID$$", "-u", "'{username}'"]
]
Loading

0 comments on commit cf0279f

Please sign in to comment.