This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version 1.0 | |
task PreprocessIntervals { | |
input { | |
File? intervals | |
File? blacklist_intervals | |
File ref_fasta | |
File ref_fasta_fai | |
File ref_fasta_dict | |
Int? padding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { noop, safe_not_equal } from 'svelte/internal'; | |
/** Callback to inform of a value updates. */ | |
export type Subscriber<T> = (value: T) => void; | |
/** Unsubscribes from value updates. */ | |
export type Unsubscriber = () => void; | |
/** Callback to update a value. */ | |
export type Updater<T> = (value: T) => T; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from time import sleep | |
from typing import Any, Dict | |
import boto3 | |
from zappa.cli import ZappaCLI | |
PROVISIONED_CONCURRENCY = 5 | |
client = boto3.client("lambda") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku config -s -a from-app > ~/Desktop/env.txt | |
cat ~/Desktop/env.txt | tr '\n' ' ' | xargs heroku config:set -a to-app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doSub() { | |
setTimeout(function() { | |
if ($('.subButtons a.add.active').length === 0) { | |
clearTimeout(doSub) | |
} else { | |
var el = $('.subButtons a.add.active:first') | |
console.log(el.parent().parent().parent().find('a:first').text()) | |
$(el).click() | |
doSub() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
def create_app(): | |
app = Flask('testapp') | |
# omitted for brevity: load app config | |
# configure database | |
from app.lib.db import init_engine, db_session | |
init_engine(app.config['DATABASE_URI']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM logstash:6.6.1 | |
ADD ./logstash.conf . | |
ADD ./logstash.yml . | |
ADD ./template.json . | |
ENV LS_JAVA_OPTS="-Dls.cgroup.cpuacct.path.override=/ -Dls.cgroup.cpu.path.override=/ -Djava.security.egd=file:/dev/urandom $LS_JAVA_OPTS" | |
CMD logstash -f ./logstash.conf --path.settings=. --verbose --log.level=debug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(RPostgreSQL) | |
library(pool) | |
library(dplyr) | |
library(dbplyr) | |
pool <- dbPool( | |
drv = PostgreSQL(), | |
host = Sys.getenv("DB_HOST"), | |
port = 5432, | |
dbname = Sys.getenv("DB_NAME"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(tidyr) | |
library(stringr) | |
sort_course_codes <- function(course_codes) { | |
course_with_sorting <- data_frame(course_code = course_codes) %>% | |
mutate(course_code_cleaned = str_trim(tolower(str_replace_all( | |
course_code, "[(\\[\\{][^(\\[\\{]+[)\\]\\}]", "" | |
)))) %>% | |
separate( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
merged_fit <- alply(1:n_samp, 1, function(s) { | |
h_seg_dat_new$h.capseg.d[[merge_ixs[1]]] <- unlist(h_seg_dat_new$h.capseg.d[merge_ixs]) | |
h_seg_dat_new$h.capseg.raw[[merge_ixs[1]]] <- unlist(h_seg_dat_new$h.capseg.raw[merge_ixs]) | |
h_seg_dat_new$h.capseg.annot[[merge_ixs[1]]]$pos <- unlist(lapply(h_seg_dat_new$h.capseg.annot[merge_ixs], "[[", "pos")) | |
h_seg_dat_new$gh.wes.allele.d[[merge_ixs[1]]] <- do.call(cbind, h_seg_dat_new$gh.wes.allele.d[merge_ixs]) | |
h_seg_dat_new$gh.wes.allele.annot[[merge_ixs[1]]]$pos <- unlist(lapply(h_seg_dat_new$gh.wes.allele.annot[merge_ixs], "[[", "pos")) | |
if (n_merge_hets >= 2) h_seg_dat_new$seg_phase_pr[[merge_ixs[1]]] <- 0.5 | |
if (n_merge_hets >= 2) h_seg_dat_new$consensus_phase[[merge_ixs[1]]] <- init_merged_consensus_phase(log_het_phase_prob_list) | |
capture_em_fit_new$log.het.phase.prob[[merge_ixs[1]]] <- data_frame("x1" = rep(NA, n_merge_hets)) | |
capture_em_fit_new$het.phase.prob[[merge_ixs[1]]] <- capture_em_fit_new$log.het.phase.prob[[merge_ixs[1]]] |
NewerOlder