Skip to content

Instantly share code, notes, and snippets.

@bpow
bpow / get-important-k8s-resources.sh
Created June 30, 2023 14:56
Gets the non-transient resources in a kubernetes/openshift namespace, outputting by resource types with bonus of decoding secrets to stringData
#!/bin/sh
<<comment
REQUIREMENTS:
- kubectl (of course)
- krew "neat" plugin to remove some extra cruft
- yq to decode secrets to stringData
The resource types are:
### Keybase proof
I hereby claim:
* I am bpow on github.
* I am bpow (https://keybase.io/bpow) on keybase.
* I have a public key ASB_4EE6sX3jIuLAkQFDo_M-24lqAxWXNhJjGy_FNzBJugo
To claim this, I am signing this object:
@bpow
bpow / jsonld_embed_link.py
Last active September 19, 2017 19:59
Demonstration of '@embed': '@link' handling in pyld
@bpow
bpow / varinterp001.json
Created December 6, 2016 18:29
possible more-SEPIO-like interpretation model
{
"cg:id": "VarInterp001",
"cg:type": "VariantInterpretation",
"variant": {
"cg:id": "CanAll035",
"cg:type": "CanonicalAllele",
"preferredCtxAllele": "CtxAll039",
"identifier": "http://reg.genome.network/allele/CA090919"
},
"condition": {
##fileformat=VCFv4.1
##FORMAT=<ID=AD,Number=.,Type=Integer,Description="Allelic depths for the ref and alt alleles in the order listed">
##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Approximate read depth (reads with MQ=255 or with bad mates are filtered)">
##FORMAT=<ID=GQ,Number=1,Type=Float,Description="Genotype Quality">
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
##FORMAT=<ID=PL,Number=G,Type=Integer,Description="Normalized, Phred-scaled likelihoods for genotypes as defined in the VCF specification">
##INFO=<ID=AC,Number=A,Type=Integer,Description="Allele count in genotypes, for each ALT allele, in the same order as listed">
##INFO=<ID=AF,Number=A,Type=Float,Description="Allele Frequency, for each ALT allele, in the same order as listed">
##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
##INFO=<ID=BaseQRankSum,Number=1,Type=Float,Description="Z-score from Wilcoxon rank sum test of Alt Vs. Ref base qualities">
@bpow
bpow / xci.md
Last active September 11, 2015 01:07
an illustration of the stochastic nature of x-chromosome inactivation

An illustration of how stochastic X-chromosome inactivation leads to functional mosaicism.

@bpow
bpow / lldxfuse.py
Created August 15, 2013 02:42
Use FUSE (filesystem in userspace) to access files on DNAnexus
#!/usr/bin/python
import errno
import stat
import sys
import llfuse
import time
import dxpy
import os
import json
@bpow
bpow / Makefile
Created March 21, 2013 01:27
Makefile for running lumpy-sv
.SECONDARY:
LUMPY:=./lumpy-sv
YAHADB:=./refs/hg19.X11_01_65525S
YAHA:=./yaha
BWA:=./bwa-0.6.2/bin/bwa
BWADB:=./refs/hg19.fa
READ_LENGTH=100
%.um.fq : %.bam
@bpow
bpow / gist:5088067
Created March 5, 2013 04:40
merge together bam files, optionally remapping sample names and optionally providing a single chromosome of output
#!/bin/bash
JAVA_OPTS="-Dgroovy.grape.report.downloads=true" //usr/bin/env groovy "$0" $@; exit $?
@GrabResolver(name="maven-sandbox-picard", root="https://github.com/bpow/maven-sandbox/raw/master/picard")
@Grab(group="net.sf.picard", module="picard", version="1.86-SNAPSHOT")
import net.sf.samtools.*
import net.sf.picard.sam.*
def mergeAndRemap(chromosome, mapfile, infiles, outfile) {