Skip to content

Commit

Permalink
some extra changes and better doc
Browse files Browse the repository at this point in the history
  • Loading branch information
manulera committed Aug 17, 2023
1 parent 15b6620 commit 5dcedba
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
/.venv
*.pyc
/results
Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ bash run_analysis.sh

## Installing

### Python dependencies

To install the dependencies, we used poetry (see [poetry installation instructions](https://python-poetry.org/docs/)).

In the source directory run:
Expand All @@ -43,6 +45,31 @@ poetry shell

Now when you call `python`, it will be the one from the `.venv`.

### Other dependencies and setting up transvar

This project uses [transvar](https://github.com/zwdzwd/transvar). This requires to install some binaries.

```bash

# If you have linux and you want to install them globally
sudo apt install -y samtools tabix

# If you want to install them locally (see the content of the script)
# > basically downloads the libs and uses make to build the necessary bin files, then deletes all unnecesary source code
bash install_transvar_dependencies_locally.sh

```

Then, regardless of whether you are using local or global installation of `samtools` and `tabix`:

```bash
# Env vars (see script)
. transvar_env_vars.sh

# Build the transvar database, and test that it works
bash set_up_transvar.sh
```

## Getting the data

To download the data from PomBase, run:
Expand Down
7 changes: 2 additions & 5 deletions set_up_transvar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ set -e
transvar config -k reference -v "data/pombe_genome.fa" --refversion pombe_genome
transvar index --ensembl data/pombe_genome.gtf --reference data/pombe_genome.fa

# At this point, we could delete the lib folder, but it's very small
# Hacky way to use the functions inside another script
cp $(which transvar) ./transvar_main_script.py

# See whether it works
transvar panno -i 'SPAC3F10.09:p.E2A' --ensembl data/pombe_genome.gtf.transvardb --reference data/pombe_genome.fa
transvar ganno -i 'I:g.2832796A>T' --ensembl data/pombe_genome.gtf.transvardb --reference data/pombe_genome.fa
transvar ganno -i 'I:g.2832795T>A' --ensembl data/pombe_genome.gtf.transvardb --reference data/pombe_genome.fa

# Hacky way to use the functions inside another script
cp $(which transvar) ./transvar_main_script.py

transvar panno -i 'SPBC1198.04c:p.T566S' --ensembl data/pombe_genome.gtf.transvardb --reference data/pombe_genome.fa
transvar panno -i 'SPAPB1A10.09:p.S372_N374delinsAAA' --ensembl data/pombe_genome.gtf.transvardb --reference data/pombe_genome.fa --gseq
2 changes: 2 additions & 0 deletions transvar_env_vars.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export TRANSVAR_CFG="$(pwd)/data/transvar.cfg"
export TRANSVAR_DOWNLOAD_DIR="$(pwd)/data/transvar_download"

# These are only needed if you install transvar locally, but it does not harm to have them
export PATH="$(pwd)/lib/htslib/bin:$PATH"
export PATH="$(pwd)/lib/samtools/bin:$PATH"

0 comments on commit 5dcedba

Please sign in to comment.