Skip to content

Instantly share code, notes, and snippets.

View edawson's full-sized avatar

Eric T. Dawson edawson

View GitHub Profile
@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


@andy-thomason
andy-thomason / Genomics_A_Programmers_Guide.md
Created May 14, 2019 13:32
Genomics a programmers introduction

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com

@lindenb
lindenb / discordant.c
Created April 12, 2019 07:26
C program finding discordant reads. htslib sam bam read sv structural variant
/**
Pierre Lindenbaum, 2019
gcc -o a.out -O3 -Wall -Isamtools/include discordant.c -Lsamtools/lib -lhts
*/
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
@elowy01
elowy01 / nextflow cheat sheet
Last active November 10, 2023 11:57
nextflow cheat sheet
#Example 1:
#!/usr/bin/env nextflow
params.str = 'Hello world!'
process AFcalc {
"""
echo '${params.str}'
@lindenb
lindenb / calling.nf
Created May 29, 2018 07:18
test nextflow anonymized , multi-calling, 1 vcf per bed line, 3 methods hapcaller|samtools|freebayes
REF="/path/to/human_g1k_v37.fasta"
java_exe="java"
gatk_jar="/path/to/GenomeAnalysisTK.jar"
params.test_flag="F"
params.prefix="20180515.NEXTFLOW"
params.callers=["samtools","freebayes","hapcaller"]
params.description="${params.prefix} : Pierre test Nextflow "
- Skelley et al 2013:
- paper: http://genome.cshlp.org/content/23/9/1496.long
- ena: http://www.ebi.ac.uk/ena/data/view/SRP018005 (includes RNA-seq)
- 22 diverse Scer strains
- Bergstrom et al 2014
- paper: https://academic.oup.com/mbe/article-lookup/doi/10.1093/molbev/msu037
- SGRP2
- 19 Scer
- 22 Spar
@edawson
edawson / import_vcf_into_df.R
Created June 18, 2017 17:55 — forked from sephraim/import_vcf_into_df.R
Import VCF file into data frame in R
library(vcfR)
# Import VCF
my.vcf <- read.vcfR('my.vcf.gz')
# Combine CHROM thru FILTER cols + INFO cols
my.vcf.df <- cbind(as.data.frame(getFIX(my.vcf)), INFO2df(my.vcf))
@f0k
f0k / cuda_check.py
Last active September 18, 2024 08:59
Simple python script to obtain CUDA device information
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Outputs some information on CUDA-enabled devices on your computer,
including current memory usage.
It's a port of https://gist.github.com/f0k/0d6431e3faa60bffc788f8b4daa029b1
from C to Python with ctypes, so it can run without compiling anything. Note
that this is a direct translation with no attempt to make the code Pythonic.
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
# Unzip
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@scottfrazer
scottfrazer / style_guide.md
Last active May 18, 2023 17:37
WDL Best Practices / Style Guide

"My First WDL" Template

task name {
  String in
  command {
    echo '${in}'
  }
  output {
 String out = read_string(stdout())