Skip to content

Instantly share code, notes, and snippets.

@ChrisWills
ChrisWills / .screenrc-main-example
Created November 3, 2011 17:50
A nice default screenrc
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - cwills.sys@gmail.com
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
@KartikTalwar
KartikTalwar / Documentation.md
Last active May 9, 2026 23:00
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@davfre
davfre / bamfilter_oneliners.md
Last active December 9, 2025 09:48
SAM and BAM filtering oneliners
@mariozig
mariozig / migrate_repo.sh
Last active September 16, 2024 18:48
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@PoisonAlien
PoisonAlien / VarScan2_format_converter.py
Last active May 3, 2021 12:26
Takes output file generated by VarScan2 somatic programme and converts the formats. See here for updated versions https://github.com/PoisonAlien/varscan_accessories
__author__ = "Anand M"
'''
Takes output file generated by VarScan2 somatic programme and converts the formats.
'''
import argparse, math, re
parser = argparse.ArgumentParser(
description="Converts VarScan2 somatic vcf to native format and vice-versa.\nInput is automatically detected")
@PoisonAlien
PoisonAlien / oncotate.r
Last active February 18, 2019 16:13
Takes variants as input and annotates them using borads oncotator api (http://www.broadinstitute.org/oncotator/). Output is a dataframe of annotated variants in maf format.
# Usage
#
# oncotate(maflite, header = FALSE, basename = NULL)
# Arguments
#
# maflite
# input tsv file with chr, start, end, ref_allele, alt_allele columns. (rest of the columns, if present will be attached to the output maf)
#
# header
# logical. Whether input has a header line. Default is FALSE.
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 30, 2026 19:49
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@sbamin
sbamin / r_packages_verhaakenv.tsv
Last active June 18, 2019 01:25
List of R packages under default VerhaakEnv, using R 3.3: Updates, if any are pushed daily; For R 3.4, view https://gist.github.com/sbamin/34c60e74a3d9c20a63016a570d00b81d
Package Version LibPath Built
abind 1.4-5 /projects/verhaak-lab/verhaak_env/verhaak_libs/R/3.3.2 3.3.2
ABSOLUTE 1.2.1 /projects/verhaak-lab/verhaak_env/verhaak_libs/R/3.3.2 3.3.2
acepack 1.4.1 /projects/verhaak-lab/verhaak_env/verhaak_libs/R/3.3.2 3.3.2
ade4 1.7-8 /projects/verhaak-lab/verhaak_env/verhaak_libs/R/3.3.2 3.3.2
afex 0.20-2 /projects/verhaak-lab/verhaak_env/verhaak_libs/R/3.3.2 3.3.2
affy 1.52.0 /projects/verhaak-lab/verhaak_env/verhaak_libs/R/3.3.2 3.3.2
affyio 1.44.0 /projects/verhaak-lab/verhaak_env/verhaak_libs/R/3.3.2 3.3.2
animation 2.5 /projects/verhaak-lab/verhaak_env/verhaak_libs/R/3.3.2 3.3.2
annotate 1.52.1 /projects/verhaak-lab/verhaak_env/verhaak_libs/R/3.3.2 3.3.2
@schochastics
schochastics / umap.R
Last active October 10, 2018 19:24
Quick and dirty way of using UMAP in R using rPyhton
#install UMAP from https://github.com/lmcinnes/umap
#install.packages("rPython")
umap <- function(x,n_neighbors=10,n_components=2,min_dist=0.1,metric="euclidean"){
x <- as.matrix(x)
colnames(x) <- NULL
rPython::python.exec( c( "def umap(data,n,d,mdist,metric):",
"\timport umap" ,
"\timport numpy",
"\tembedding = umap.UMAP(n_neighbors=n,n_components=d,min_dist=mdist,metric=metric).fit_transform(data)",
@ilevantis
ilevantis / bedtools_cheatsheet.md
Last active December 8, 2025 06:57
Bedtools cheatsheet

Bedtools Cheatsheet

General:

Tools Description
flank Create new intervals from the flanks of existing intervals.
slop Adjust the size of intervals.
shift Adjust the position of intervals.
subtract Remove intervals based on overlaps b/w two files.