Skip to content

Instantly share code, notes, and snippets.

View G-kodes's full-sized avatar

Graeme Ford G-kodes

View GitHub Profile
@G-kodes
G-kodes / docker-commands-win.md
Created August 15, 2023 17:41
A reference of bioinformatics-related docker commands/tools for windows

Docker

The following docker commands make use of curated bioinformatics tools created by the State Public Health Bioinformatics Community (StaPH-B).

docker run --rm -v ${PWD}:/data staphb/bcftools bcftools query -l <my_file>
@G-kodes
G-kodes / Dockerfile
Last active February 6, 2023 19:44
a Dockerfile for HTSLib, SAM Tools, BCF Tools, Plink-2.0 and Python with more on the way.
# SOURCE AND CREDITS: https://github.com/chrishah/samtools-docker/blob/master/Dockerfile
FROM alpine:latest
LABEL version="v1.0" description="A docekr image for the Pharmacogenetics ANalysis Pipeline" maintainer="Graeme Ford <Graeme.Ford@tuks.co.za>"
RUN apk update && apk upgrade
# Install python/pip
ENV PYTHONUNBUFFERED=1
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
@G-kodes
G-kodes / README.md
Last active October 26, 2022 09:10
A light-weight implementation of a Django `views.py` approach to parsing the JQuery QueryBuilder object.
@G-kodes
G-kodes / Canonical_Transcript.py
Last active November 9, 2021 14:19
A quick function that uses the Ensembl REST API to query transcripts overlapping a region of interest, all associated CDS sequence data, and determines the canonical transcript ID using Ensembl's criteria (See comment below)
from ensembl_rest import overlap_region, overlap_translation, sequence_id
def get_transcript(start: int, stop: int, chr: int) -> str:
response = overlap_region(
species="homo_sapiens",
region=f"{chr}:{start}-{stop}",
params={"feature": "transcript"},
)