Skip to content

Instantly share code, notes, and snippets.

View leipzig's full-sized avatar

Jeremy Leipzig leipzig

View GitHub Profile
import tiledb
import tiledbvcf
import numpy as np
cloud_uri = "tiledb://TileDB-Inc/vcf-1kg-dragen-v376"
# This is the config I need to pass
cloud_config = tiledb.Config()
cloud_cfg = tiledbvcf.ReadConfig(tiledb_config=cloud_config)
@leipzig
leipzig / mycd.sh
Created January 21, 2012 03:36
directory based history bash profile
function mycd()
{
#if this directory is writable then write to directory-based history file
#otherwise write history in the usual home-based history file
tmpDir=$PWD
echo "#"`date '+%s'` >> $HISTFILE
echo $USER' has exited '$PWD' for '$@ >> $HISTFILE
builtin cd "$@" # do actual cd
if [ -w $PWD ]; then export HISTFILE="$PWD/.dir_bash_history"; touch $HISTFILE; chmod --silent 777 $HISTFILE;
else export HISTFILE="$HOME/.bash_history";
@leipzig
leipzig / sbg.yaml
Created July 1, 2021 15:22
all the public tool descriptions from https://igor.sbgenomics.com/public/apps
- ABRA2:
- https://igor.sbgenomics.com/raw/admin/sbg-public-data/abra2-12-germline/5
- https://igor.sbgenomics.com/raw/admin/sbg-public-data/abra2-12-somatic/2
- Admixture:
- https://igor.sbgenomics.com/raw/admin/sbg-public-data/admixture-1-3-0/4
- AmpliconQC:
- https://igor.sbgenomics.com/raw/admin/sbg-public-data/sbg-ampliconqc-amplicon-coverage/1
- https://igor.sbgenomics.com/raw/admin/sbg-public-data/sbg-ampliconqc-coverage-heatmap/1
- https://igor.sbgenomics.com/raw/admin/sbg-public-data/sbg-ampliconqc-mark-failed-amplicons/1
- https://igor.sbgenomics.com/raw/admin/sbg-public-data/sbg-ampliconqc-merge-coverage-beds/1
@leipzig
leipzig / drexelconnect.expect
Created November 22, 2020 15:12
expect script for connecting to drexel cisco anyconnect vpn
#!/usr/bin/expect
set PASSWD "<<yourpass>>"
set timeout 3
spawn /opt/cisco/anyconnect/bin/vpn connect vpn.drexel.edu
expect "Group:"
send -- "0\r"
expect "*Username:*"
send -- "<<yourusername>>\r"
expect "*Password:*"
send -- "$PASSWD\r"
@leipzig
leipzig / hg19gaps
Created July 31, 2013 16:35
hg19 gaps
#bin chrom chromStart chromEnd ix n size type bridge
0 chr1 124535434 142535434 1271 N 18000000 heterochromatin no
23 chr1 121535434 124535434 1270 N 3000000 centromere no
76 chr1 3845268 3995268 47 N 150000 contig no
85 chr1 13219912 13319912 154 N 100000 contig no
89 chr1 17125658 17175658 196 N 50000 clone yes
101 chr1 29878082 30028082 337 N 150000 contig no
188 chr1 120697156 120747156 1263 N 50000 clone yes
188 chr1 120936695 121086695 1265 N 150000 contig no
188 chr1 121485434 121535434 1269 N 50000 clone no
@leipzig
leipzig / photoselection.R
Created April 4, 2019 14:52
selecting photos
mz<-c('007','011','017','020','025','046','076','077','090','102','104')
sa<-c('008', '017', '037', '058', '069', '109', '097', '102','028')
jl<-c('075','060','061','106','066','070','104','059','017','001','015','014','038','010','005','039','006','020','031','094')
rn<-str_pad(seq(1,109), 3, pad = "0")
pics<-data.frame(id=rn,mz=FALSE,sa=FALSE,jl=FALSE)
pics[pics$id %in% mz,"mz"]<-TRUE
pics[pics$id %in% sa,"sa"]<-TRUE
pics[pics$id %in% jl,"jl"]<-TRUE
@leipzig
leipzig / array2snp.pl
Created August 14, 2012 18:28
This program converts Affy mitoSNP array samples into either HaploGrep or Mitomaster SNV format
#!/usr/bin/perl
use strict;
use Carp;
use Carp::Assert;
use Getopt::Std;
use File::Slurp;
my %opt;
my $opt_string = 'o:d:rh';
@leipzig
leipzig / gist:be08ae5442e32c9ce5b4362de9d61856
Created August 4, 2017 15:41
ImportError: libicuuc.so.54: cannot open shared object file: No such file or directory
python -c 'import rpy2.robjects as robjects'
this is almost certainly caused by conda-forge
to fix
conda install -c r r-base
{
"input_file": {
"class": "File",
"path": "https://raw.githubusercontent.com/briandoconnor/dockstore-tool-md5sum/master/md5sum.input"
},
"output_file": {
"class": "File",
"path": "s3://panoramabatch/md5sum.txt"
}
}
@leipzig
leipzig / gist:a38fadecdf72ccde02fec1e67c404cf4
Created August 4, 2017 15:07
Installing packages in emacs using Melpa
#requires 24.4 or higher, just use conda version
M-x list-packages
C-v to scroll down
hit return on desired packages
C-x o to switch panes
go to [Install] hit return