Skip to content

Instantly share code, notes, and snippets.

View pansapiens's full-sized avatar

Andrew Perry pansapiens

  • Melbourne, Australia
View GitHub Profile
@pansapiens
pansapiens / get_latest_container.sh
Created August 17, 2022 02:29
Grab the latest Singularity container for a bioconda package
#!/bin/bash
#
# ./get_latest_container.sh
# Given a bioconda package name as the first argument, downloads
# the most recent corresponding Singularity image from quay.io/biocontainers
#
# Usage:
#
# ./get_latest_container.sh <package_name>
#
@pansapiens
pansapiens / _README.md
Last active April 14, 2022 11:01
The Aspera ascp key you are looking for

Installing and running ascp is a PITA.

Here's the private key you need (at least for NCBI/ENA downloads).

ascp is now available in a Docker container. This makes things easier.

Do this:

# We need the not-actually-secret private key that comes packaged with Aspera Connect but is inexplicably not used as the default
# when no key is specified. Here's one I prepared earlier.
@pansapiens
pansapiens / make_tiled_composite_video.py
Created November 28, 2016 03:46
Generate a composite tiled video from multiple input videos
#!/usr/bin/env python
"""
Given a list of video files, creates a tiled output video with each
input video playing simulutaneously with mixed audio.
The result is something like a composite security camera feed, or the
"Brady Bunch" opening credits.
DISCLAIMER: The author holds no responsibility for your actions if you
become criminally insane from watching all nine Puppet Master films
simultaneously. You have been warned.
@pansapiens
pansapiens / Dockerfile
Created March 23, 2021 04:26
rnasik in docker (via conda/mamba)
FROM continuumio/miniconda3
#
# docker build -t pansapiens/rnasik:latest -t pansapiens/rnasik:1.5.4 .
# docker run --rm -it -v $(pwd):/data pansapiens/rnasik --help
#
RUN conda install --yes -c conda-forge mamba
RUN mamba install --yes -c bioconda -c conda-forge -c serine -c serine/label/dev -c anaconda -c defaults -c r -c conda-forge/label/broken \
python=3.6 rnasik=1.5.4 qualimap=2.2.2b=0 "pandas<1" && \
@pansapiens
pansapiens / grab_from_cloudstor_pw_protect.py
Last active March 2, 2021 22:52
Download a password protected file from CloudStor / ownCloud / NextCloud on the commandline
#!/usr/bin/env python3
# https://colab.research.google.com/drive/1CGOygPAmjTxWnmsywv178dh3u36ZRBgv
# You'll need to install the `robobrowser` Python package.
# Do it in a virtualenv like:
#
# python3 -m venv ~/.virtualenvs/cloudstor
# source ~/.virtualenvs/cloudstor/activate
# pip3 install robobrowser
@pansapiens
pansapiens / test_signals.ipynb
Created November 26, 2020 03:49
test_signals.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pansapiens
pansapiens / switch_docker_image_library_path.sh
Last active November 11, 2020 22:25
Move /var/lib/docker to a new location
##
# Update - no longer works. You need to also:
# edit: /lib/systemd/system/docker.service
# then run: sudo systemctl daemon-reload
# see, https://medium.com/@ibrahimgunduz34/how-to-change-docker-data-folder-configuration-33d372669056
#
# TODO: Fix this to use sed or similar to edit /lib/systemd/system/docker.service
##
# From: https://forums.docker.com/t/how-do-i-change-the-docker-image-installation-directory/1169

How to get firmware onto mutable modules

On Ubuntu 20.04.

(I have not yet tried the Black Magic Probe and gdb parts)

Install compiler

First install the arm compiler:

@pansapiens
pansapiens / Dockerfile
Last active July 21, 2020 09:43
biobloom in Docker
FROM ubuntu:18.04
RUN apt-get -y update && \
apt-get -y install git build-essential autogen autotools-dev automake \
libsdsl-dev libsdsl3 libsparsehash-dev zlib1g-dev libboost-all-dev libgomp1 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /
RUN git clone --depth 1 --branch 2.3.2 https://github.com/bcgsc/biobloom.git && \
cd /biobloom && \
git submodule update --init && ./autogen.sh && \
@pansapiens
pansapiens / custom_environments_in_jupyter.ipynb
Last active July 21, 2020 01:53
Using custom environments in Jupyter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.