Skip to content

Instantly share code, notes, and snippets.

View natefoo's full-sized avatar

Nate Coraor natefoo

View GitHub Profile
name: galaxy_training_material
channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- binutils_impl_linux-64=2.36.1=h193b22a_2
- ca-certificates=2022.6.15=ha878542_0
- gcc=12.1.0=h9ea6d83_10
#!/bin/bash
# stopgap to build mod_zip DSO for nginx-galaxy before that package goes away entirely
set -euo pipefail
nginx_version='1.12.2'
upload_module_version='2.255-nfs'
auth_pam_module_version='1.4'
mod_zip_version='808fb55e7235a201ea862e02dab612b87787d5a4'
gid=$(id -g)
uid=$(id -u)
---
# Manage static Galaxy configuration files
- name: Static config setup
block:
- name: Ensure Galaxy version is set
include_tasks: _inc_galaxy_version.yml
when: __galaxy_major_version is undefined
import os
import subprocess
import time
from datetime import (
date,
datetime,
)
import click
import psutil
#!/usr/bin/env python3
import os
import traceback
import click
from rich import progress
from tusclient.fingerprint import fingerprint
from bioblend import ConnectionError
from bioblend.galaxy import GalaxyInstance
#!/usr/bin/env python3
# Quick and dirty script to update usegalaxy-tools with missing tools fron GTN trainings. Note that this installs the
# newest versions of things, not necessarily the version specified in the training json.
import argparse
import os
import pathlib
import string
import subprocess
import sys
@natefoo
natefoo / manumull.md
Last active March 8, 2023 18:57
Galaxy/BioContainers mulled container command line utilities

Manually mulling container images

This is occasionally necessary e.g. when trying to build images for old software or old versions that won't be supported by BioContainers, custom channels, etc.

Another common use case is for when you are trying to run a Galaxy tool that is missing a requirement specification for something it depends on (this is common especially with older tools that assumed Python would be present) or that requires older conda packages that did not fully specify their dependencies.

Prerequisites

You will need Docker on whatever host you plan to run on. Singularity is not required (even if building Singularity images) since the Singularity build occurs in Docker.

#!/usr/bin/env python
"""
Finds datasets on disk that shouldn't be there.
This script is not object-store aware. You just point it at directories that are DiskObjectStore backends (e.g.
file_path in the Galaxy config by default).
"""
from __future__ import absolute_import, print_function
import sys
#!/usr/bin/env python3
# run with:
# find topics -name \*.md -type f -print0 | xargs -0 python3 lamefix.py
import fileinput
import sys
def fix(mdfileobj):
in_diff = False
min_length = sys.maxsize