Skip to content

Instantly share code, notes, and snippets.

@martijnvermaat
martijnvermaat / gencert.sh
Last active July 17, 2018 07:40
Generate self-signed x509 certificates
#!/bin/bash
# Generate a self-signed x509 certificate or certificate signing request and
# key using OpenSSL. DNS and IP addresses can be added as subjectAltName
# entries.
#
# Usage:
# ./gencert.sh <common name (or DNS name)> <DNS names or ip addresses...> [--rsa4096] [--csr]
#
# By default, a 2048 bits RSA key is generated. Supply --rsa4096 at the end to
# generate a 4096 bits key.
@martijnvermaat
martijnvermaat / import.sh
Last active March 24, 2017 07:24
Mutalyzer transcript mapping imports
# NCBI36
wget ftp://ftp.ncbi.nlm.nih.gov/genomes/MapView/Homo_sapiens/sequence/BUILD.36.3/initial_release/seq_gene.md.gz -O - \
| zcat | sort -t $'\t' -k 11,11 -k 2,2 > /tmp/hg18.seq_gene.sorted.md
mutalyzer-admin assemblies import-mapview -a hg18 /tmp/hg18.seq_gene.sorted.md 'reference'
mutalyzer-admin assemblies import-reference -a hg18 'NC_001807.4'
# GRCh37
wget ftp://ftp.ncbi.nlm.nih.gov/genomes/MapView/Homo_sapiens/sequence/ANNOTATION_RELEASE.105/initial_release/seq_gene.md.gz -O - \
| zcat | sort -t $'\t' -k 11,11 -k 2,2 > /tmp/hg19.seq_gene.sorted.md
mutalyzer-admin assemblies import-mapview -a hg19 /tmp/hg19.seq_gene.sorted.md 'GRCh37.p13-Primary Assembly'
@martijnvermaat
martijnvermaat / playbook.yml
Last active November 22, 2016 03:32
Testcase for Ansible #18324
---
- hosts: all
tasks:
- include_vars: vars_plain.yml
- assert: that="var == 'vars_plain_yml'"
- include_vars: vars_vaulted.yml
- assert: that="var == 'vars_vaulted_yml'"
- include_vars: vars_plain
- assert: that="var == 'vars_plain'"
- include_vars: vars_vaulted
@martijnvermaat
martijnvermaat / emacs.md
Last active November 14, 2016 18:08
Emacs notes

Emacs notes

Just some Emacs things that I cannot seem to remember without writing them down. I'm an Emacs newbie (but have been using it for 15 years).

These are random and specific to my setup, so probably not useful to anyone else.

Config can be found here: https://github.com/martijnvermaat/dotfiles

Keybase proof

I hereby claim:

  • I am martijnvermaat on github.
  • I am martijnvermaat (https://keybase.io/martijnvermaat) on keybase.
  • I have a public key ASBU9sNz9RzOg8_nT4dssYbLszQejvkoSlY84KZDTpH_Dwo

To claim this, I am signing this object:

@martijnvermaat
martijnvermaat / hgvs.md
Last active May 30, 2016 19:44
Operational semantics for HGVS

Operational semantics for HGVS

This formalisation is based on the idea that the meaning of a variant description is a set of fixed sequences projected on the referencesequence. (We call them replacements, but they can also be identities.) We explicitely do not mean the result (sequence) of applying these replacements. At least in my understanding, that is not how HGVS is intended to interpreted (and would also make it impossible to combine variants; how do you combine two plain sequences?).

@martijnvermaat
martijnvermaat / plink_dbsnp.md
Last active May 30, 2016 16:02
Rename Plink SNPs to their dbSNP rs#
@martijnvermaat
martijnvermaat / auto-ssh-aliases.bash
Created May 11, 2016 13:55
Auto SSH session aliases for hosts configured in ~/.ssh/config
# Auto SSH session aliases for hosts configured in ~/.ssh/config.
command_not_found_handle() {
if [[ ! "$1" ]] ; then
return 127
fi
if ! grep -q "^Host $1\$" ~/.ssh/config; then
return 127
fi
ssh $*
}
@martijnvermaat
martijnvermaat / README.md
Last active April 29, 2016 12:35
Vagrant configurations

Default Vagrant configurations.

Application IP SSH forward HTTP forward HTTPS forward
Mutalyzer 192.168.111.222 2522 8088 8089
Base server 192.168.111.223 2523
Varda 192.168.111.224 2524 8090 8091
ELK 192.168.111.225 2525 8092 8093
logstash-forwarder 192.168.111.226 2526
Jenkins 192.168.111.227 2527 8094
@martijnvermaat
martijnvermaat / README.md
Last active April 28, 2016 13:55
Genomic GenBank files and transcript identifiers

Genomic GenBank files and transcript identifiers

Using the attached script we check all genomic GenBank files in the server cache for the transcript_id field in their mRNA features.

Using the cache from mutalyzer.nl

Category Files checked Transcripts With ID Without ID %
NG_ 3076 5989 5978 11 0.2 %