Skip to content

Instantly share code, notes, and snippets.

View brentp's full-sized avatar

Brent Pedersen brentp

View GitHub Profile

fgbio -> annotated-filtered-vcf

run fgbio via netxflow:

echo "sample,fastq_1,fastq_2,read_structure" > sheet.csv
for f in /scratch/ucgd/lustre-work/quinlan/data-shared/datasets/spermseq/final_seq/Fastq/merged/*_R1*.fastq.gz; do
   # s=$(basename $f _R1.merged.fastq.gz)
   # R2=${f/_R1/_R2}
   # echo "$s,$f,$R2,\"$structure $structure\""
import futhark
import std/typetraits
type CFile* = typeof(File.pointerBase)
importc:
sysPath "/usr/lib/clang/13/include"
path "./WFA2-lib"
"wavefront/wavefront_align.h"
rename FILE, CFile
WGS:
http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/data_collections/HGDP/
from: "Insights into human genetic variation and population
history from 929 diverse genomes"
WGS, exome, RNA-Seq
many samples available from St Jude via DNA Nexus
https://platform.stjude.cloud/requests/cohorts
@brentp
brentp / README.md
Last active January 13, 2020 18:38
allele balance invenstigation in CEPH
nim c -d:danger -d:release -r abs.nim > abs.txt
mkdir -p pngs
python abs.py
rm -f pngs/NA*
rm -f pngs/HG*
convert -delay 25 pngs/*.png -loop 0 abs.gif
import bitops
{.passC:"-mavx512f -mavx512vl -mavx512bw -mpopcnt"}
{.passL:"-mavx512f -mavx512vl -mavx512bw -mpopcnt"}
when defined(vcc):
{.pragma: x86, noDecl, header:"<intrin.h>".}
else:
{.pragma: x86, noDecl, header:"<x86intrin.h>".}
@brentp
brentp / ex.pyx
Created April 24, 2019 16:41
how to access pysam internals from external cython project
from pysam.libcalignmentfile cimport AlignmentFile
cdef AlignmentFile samfile = AlignmentFile("../normal.bam", "rb")
print samfile.reference_filename
print samfile.b == NULL
import times
type AThing = ref object
i: int
iterator items(a:AThing): int =
when defined(dodefer):
defer:
a.i = 11
import times
import intsets
import tables
import sets
# cardinality for builtin sets is slow.
# nim c -d:release -r t.nim
# vs
# nim c -d:card -d:release -r t.nim
import hts/vcf
import os
var gnomad_path = commandLineParams()[0]
var
gvcf:VCF
total:int
mid:int