Skip to main content

galaxy-library-maker

This set of scripts facilitate the create of Galaxy libraries from files filesystem that the Galaxy process has access to (currently this is the only mechanism supported, more could be added).

Installation

Currently, a git clone + local pip install is required. We will add this to pypi soon.

  • Clone this repo and cd inside.
  • Create a python3 virtual environment:
python3 -m venv myVenvName
source myVenvName/bin/activate
pip install --upgrade pip
pip install wheel
  • Install this package
pip install .

Requirements for running

Galaxy API key

You need to obtain a Galaxy API Key on the instance where you want the files loaded as Galaxy Libraries. To obtain an API key, in the main Galaxy screen, go to User -> Preferences, and there click on Manage API key. Copy the key text (or press Create a new key if there is none).

YAML authentication file for Galaxy

You will need a YAML auth file for Galaxy, following the formatting from parsec:

__default: instance_a

instance_a:
    key: "94c9894706fd97b36dbd1acdaa88b749"
    url: "http://localhost:8080/"

instance_b:
    key: "kajshdkajsdhaksjh3ek3jeh327ycei"
    url: "http://my.galaxy.ins/"

Paste the Galaxy key and the appropiate URL (where you access Galaxy). You can have more than one instance in the same YAML if desired (although will be only connection to one at once).

Library definition YAML file

Libraries to be added to Galaxy are defined for this package in a YAML that follows this schema:

---
- library: 'My data project 1'
  desc: 'Descriptio about my data project'
  synopsis: 'A lot of expression data'
  base_dir: /path/to/files/on/a/filesystem/that/galaxy/can/see/and/read
  recursive: true
  extensions:
    - txt: txt
    - gtf: gtf
- library: 'Another project'
  desc: 'Desc about another project'
  synopsis: 'More cool data'
  base_dir: /other/path
  recursive: true
  extensions:
    - _sce.rds: rdata.sce
    - _tab.txt: tabular

You can have as many libraries on the same YAML, each one will become a separate library in Galaxy, where all files that respond to the extensions listed in extensions will be made available, in the same directory structure starting from the base_dir.

How do I know which datatypes are available in my Galaxy instance to use in the extensions part?

Galaxy datatypes are instance dependant and as such you need to know which datatypes are available in your instance. To do this, you can execute the get-datatypes.py script:

get-datatypes.py -C creds.yaml -G instance_a

Running

Assuming the above examples are available in creds.yaml and libs_def.yaml, and that the Galaxy instance where those directories are available is instance_a (and that the virtualenv is activated):

load-into-galaxy-library.py -C creds.yaml -G instance_a -l libs_def.yaml

Testing the package

Make sure that you have docker installed and that you can execute it without sudo, then run:

bash run_tests_with_containers.sh

Metadata

Release files for galaxy-library-maker 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for galaxy-library-maker 0.0.1
File Size Uploaded
galaxy-library-maker-0.0.1.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for galaxy-library-maker 0.0.1
File Interpreter ABI Platform
galaxy_library_maker-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / galaxy-library-maker-0.0.1.tar.gz

Download URL galaxy-library-maker-0.0.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
09d9c75956b45b3c3a566e9f20c324cdaeba0ae7e2189bc7cf1b122b0408aef8
BLAKE2b-256 checksum
How to use checksums
6fcfb5d33474447ef81979ea09a4a9bd4880714e55efb7a95dbecd5e043717a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release files / galaxy_library_maker-0.0.1-py3-none-any.whl

Download URL galaxy_library_maker-0.0.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bda571296773bdca5f5e6b36e4da0d639da8ccb3cafb1642b2f9ecd8e50c50cf
BLAKE2b-256 checksum
How to use checksums
40568cf95f16a205cb86d0fa2764edd06909ca440251b74c0eb2e8e3410e2a4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page