This file contains 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
# access aws credentials for a profile from ~/.aws/credentials | |
import boto3 | |
profile = 'default' | |
session = boto3.Session(profile_name=profile) | |
credentials = session.get_credentials() | |
credentials.access_key | |
credentials.secret_key |
This file contains 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
#!/usr/bin/env bash | |
# format | |
sudo mkfs -t ext4 /dev/nvme1n1 | |
# mount ebs volumne | |
sudo mkdir -p /mnt/data | |
sudo mount /dev/nvme1n1 /mnt/data | |
# fix permissions |
This file contains 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
while read line; do | |
mv -v "$line" "${line// - /}" | |
done < <(find . -name '* .png') |
This file contains 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
# genome reference | |
fai_url := s3://broad-references/hg38/v0/Homo_sapiens_assembly38.fasta.fai | |
fai_file := $(notdir $(fai_url)) | |
# original clinvar vcf | |
vcf_url := ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh38/clinvar_20210710.vcf.gz | |
raw_vcf := $(notdir $(vcf_url)) | |
# modified vcf file | |
mod_vcf := $(raw_vcf:%.vcf.gz=%_modified.vcf.gz) |
This file contains 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(osfr) | |
library(purrr) | |
library(tibble) | |
# functions --------------------------------------------------------------- | |
# id: project GUID | |
.osf_list_wikis <- function(id) { | |
api_path <- sprintf("nodes/%s/wikis", id) |
This file contains 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
# Code written by brentp in response to BioStars question: | |
# http://www.biostars.org/post/show/6544/ | |
import random | |
import sys | |
def write_random_records(fqa, fqb, N=100000): | |
""" get N random headers from a fastq file without reading the | |
whole thing into memory""" | |
records = sum(1 for _ in open(fqa)) / 4 |
This file contains 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
############################################################################## | |
# Calendar Heatmap # | |
# by # | |
# Paul Bleicher # | |
# an R version of a graphic from: # | |
# http://stat-computing.org/dataexpo/2009/posters/wicklin-allison.pdf # | |
# requires lattice, chron, grid packages # | |
############################################################################## | |
## calendarHeat: An R function to display time-series data as a calendar heatmap |
This file contains 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
#!/usr/bin/env bash | |
# variables | |
############# | |
tilevcf="dist/bin/tiledbvcf" | |
tmpdir="/mnt/data/tmp" | |
samplefile="$tmpdir/samples.txt" | |
output_dir="data" | |
export_dir="$output_dir/exports" |
This file contains 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
- alias: Announce Door Open | |
trigger: | |
- platform: state | |
entity_id: | |
- binary_sensor.back_door | |
- binary_sensor.front_door | |
to: 'on' | |
for: | |
seconds: 30 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.