Skip to content

Instantly share code, notes, and snippets.

View brentp's full-sized avatar

Brent Pedersen brentp

View GitHub Profile
@max-sixty
max-sixty / config.kdl
Last active January 12, 2024 08:16
Zellij Config
// This Zellij config offers a more modal experience than the default. There are
// very few keybindings in the mode that you spend most of your time in, and we
// need to hit `C-space` to go into a mode where we navigate.
// The only keybindings in the normal mode are:
// - `C-space` to go into the tmux mode
// - `C-n` for a new pane
// - `C-t` for a new tab
// - `A-[` & `A-]` to go to the previous/next tab
// - `S-arrow` to navigate between panes
@brwnj
brwnj / i3-ssd.sh
Created November 27, 2018 20:28
AMI with docker container storage
# setting up AMI
sudo service docker stop
sudo rm -rf /var/lib/docker
# update the image
sudo yum update -y
sudo yum install -y mdadm
sudo yum install -y wget
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -f -p $HOME/miniconda
@jmarshall
jmarshall / Dockerfile
Created September 21, 2018 14:23
Basic Dockerfile for fully-featured HTSlib/SAMtools/BCFtools
ARG ubuntu_version=latest
FROM ubuntu:${ubuntu_version}
USER root
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libbz2-dev \
@17twenty
17twenty / GoWithC.go
Last active July 11, 2016 04:29
Cross Compiling and Language Interop oh my!
package main
import (
"./binding"
"fmt"
)
func main() {
binding.PrintHello()
binding.Seed(1)
fmt.Println(binding.Random())
@lh3
lh3 / 00_cmd.sh
Last active December 16, 2021 13:02
Scripts and command lines to create universal mask for hs37d5
#
# generate 01compositional.bed.gz
#
# low-complexity by mDUST
mdust hs37d5.fa -c -w7 -v28 \
| hs37d5.mdust-w7-v28.txt \
| cut -f1,3,4 \
| gawk -vOFS="\t" '{--$2;print}' \
| bgzip > 01compositional/hs37d5.mdust-w7-v28.bed.gz
@lh3
lh3 / 0.00README.md
Last active April 28, 2022 21:04
Mapping short reads with a ~50bp INDEL

This is a small experiment on the alignment of ~50bp INDELs. The query sequences are shown in 0.01.fq below, where seq_ori is a 204bp sequence extracted from the human reference genome, seq_del54 contains a 54bp deletion in the middle, seq_del84 contains a 84bp deletion in a 120bp read, and seq_ins40 contains a 40bp insertion in a 140bp read. These four short sequences were mapped to the human reference genome with Bowtie2, BWA-MEM, LAST, Novoalign, SNAP and Stampy with default settings. Non-default scoring functions were also tested for Bowtie2 (--rdg 5,1 --rfg 5,1), BWA-MEM (-A2 -E1) and LAST (-r2 -q4). The output by various mappers/settings can be found in this gist. The following table gives my summary:

Mapper Setting -84bp -54bp +40bp
BBMAP default Yes Yes Yes
Bowtie2 default No No No
Bowtie2 --rdg 5,1 --rfg 5,1 as insertion as insertion Yes
BWA-MEM default as split Yes Yes
BWA-MEM -A2 -E1 Yes Yes Yes
LAST default as split as split
@CamDavidsonPilon
CamDavidsonPilon / 538.json
Last active November 28, 2021 07:37
Use the two files below to mimic graphs on 538. www.dataorigami.net/blogs/fivethirtyeight-mpl
{
"lines.linewidth": 2.0,
"examples.download": true,
"patch.linewidth": 0.5,
"legend.fancybox": true,
"axes.color_cycle": [
"#30a2da",
"#fc4f30",
"#e5ae38",
"#6d904f",
@cridenour
cridenour / gist:74e7635275331d5afa6b
Last active August 7, 2023 13:52
Setting up Vim as your Go IDE

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

@arq5x
arq5x / inheritance_scenarios.md
Last active March 28, 2022 21:45
mendelian violations
dad mom kid Inheritance description
HOM_REF HOM_REF HOM_REF Expected
HOM_REF HOM_REF HET Mendelian violation (plausible de novo)
HOM_REF HOM_REF HOM_ALT Mendelian violation (implausible de novo)
HOM_REF HOM_ALT HOM_REF Mendelian violation (uniparental disomy)
HOM_REF HOM_ALT HET Expected
HOM_REF HOM_ALT HOM_ALT Mendelian violation (uniparental disomy)
HOM_REF HET HOM_REF Expected
HOM_REF HET HET Expected
@bsima
bsima / clojure-resources.md
Last active October 25, 2016 15:35
As I'm learning Clojure, I'm finding all kinds of awesome resources for learning, tools for building and testing, etc. Here's what I'm finding.

For most of the tools on here, if you follow the GitHub repos back to the user that owns the repo, they usually have other cool Clojure tools they build. Just a general observation about the Clojure community.

Learnings

  • Clojure home - There's a ton of good stuff here, like the rationale behind the design and explanations of the best features of Clojure.
  • Clojure.github.io - The core Clojure documentation. Useful for looking up functions and such.
  • Clojuredoc - Community written Clojure documentation and articles
  • Clojure Koans - Learn Clojure with Koans
  • 4Clojure - Solve simple problems to stretch your Clojure skills