Skip to content

Instantly share code, notes, and snippets.

View natefoo's full-sized avatar

Nate Coraor natefoo

View GitHub Profile
@natefoo
natefoo / get_toolbox.py
Created April 17, 2025 19:38
Minimal script to operate on toolbox
from galaxy.app import GalaxyManagerApplication
from galaxy.tool_shed.cache import ToolShedRepositoryCache
global_conf = {
"shed_tool_config_file": "shed_tool_conf.xml",
}
app = GalaxyManagerApplication(**global_conf)
app.tool_shed_repository_cache = app._register_singleton(ToolShedRepositoryCache)
app._configure_tool_data_tables(from_shed_config=False)

Untested Galaxy object store configuration with nested distributed objects stores that allow moving between permanent and scratch

type: distributed
search_for_missing: false
backends:
  - type: distributed
    search_for_missing: false
    allow_selection: true
    name: "Permanent"
# contents of OverlayFS upper mount (will be published)
+ tree /home/idc/brc-cvmfs/work/upper
/home/idc/brc-cvmfs/work/upper
├── config
│   ├── all_fasta.loc
│   ├── bowtie2_indices.loc
│   ├── bowtie_indices.loc
│   ├── bwa_mem_index.loc
│   ├── dbkeys.loc
│   ├── hisat2_indexes.loc
data_managers:
- data_table_reload:
- all_fasta
- __dbkeys__
id: toolshed.g2.bx.psu.edu/repos/devteam/data_manager_fetch_genome_dbkeys_all_fasta/data_manager_fetch_genome_all_fasta_dbkey/0.0.4
params:
- dbkey_source|dbkey: dm6
- reference_source|reference_source_selector: ucsc
- reference_source|requested_dbkey: dm6

Still working on it

Retest in progress

None

Fixing tool data then retest

None

Fixing tool resources then retest

@natefoo
natefoo / 00README.md
Created February 23, 2023 21:39
Re-enable bouncing Mailman3 list members

I upgraded Mailman3 from <3.3.1 to >= 3.3.1 without heeding the instructions and as a result, had a ton of my list members erroneously set to disabled due to bounces.

These scripts scan your bounce log file and re-enable anyone who was disabled. You could also easily modify it to just re-enable everyone, but I didn't want to do it unilaterally just in case.

@natefoo
natefoo / galaxy.yml
Created December 14, 2022 04:01
Playbook for installing Galaxy w/ galaxyproject.miniconda for deps and the Galaxy venv python
---
- hosts: galaxyservers
become: true
become_user: root
vars_files:
- group_vars/secret.yml
pre_tasks:
- name: Install Dependencies
apt:
#name: ['acl', 'bzip2', 'git', 'make', 'python3-psycopg2', 'tar', 'virtualenv']
@natefoo
natefoo / default_tool.yml
Created November 18, 2022 04:33
TPV default tool with resource selector for cluster
# https://github.com/natefoo/total-perspective-vortex/tree/resource-params
global:
default_inherits: default
tools:
default:
cores: 1
mem: cores * 3.9
env: {}
scheduling:
@natefoo
natefoo / 00_default_tool.yml
Created November 17, 2022 15:07
TPV Testing
global:
default_inherits: default
tools:
default:
cores: 1
mem: cores * 3.9
env: {}
context:
partition: normal
@natefoo
natefoo / 00README.md
Created November 1, 2022 19:23
Scan Singularity images for files

I created this to search BioContainers images for https://github.com/NCSC-NL/OpenSSL-2022 before it turned out that the bug is probably practically unexploitable, but should be useful in the future if we have another such case:

$ $HOME/bin/scan-singularity.sh -d 2021-09-01 -i /singularity -l ./log -s $HOME '/usr/local/conda-meta/openssl-3\..*'

For my own personal notes, I ran this on a manually-created LX-Brand CentOS 7 VM (alias: singularity-scan) on rochefort with the singularity zfs dataset lofs-mounted in. From there you can install epel-release and singularity-runtime, which can work with sif files (even though it can't run them in LX). tmpfs created with:

# useradd -d /home/scan -m -s /bin/bash scan