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
filepath_zi = "grd3_b_cn_zi" | |
filepath_pinyin = "grd3_b_cn_pinyin" | |
filepath_ciyu = "grd3_b_cn_ciyu" | |
lst_zi = [] | |
lst_pinyin = [] | |
lst_ciyu = [] | |
with open(filepath_zi) as f: | |
lst_zi = f.readlines() |
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
# API URL: https://gnomad.broadinstitute.org/api/ | |
# Document: https://github.com/macarthur-lab/gnomadjs/blob/master/projects/gnomad-api/README.md | |
## gene ###################### | |
{ | |
gene(gene_name: "NLRP3") { | |
symbol | |
name | |
full_gene_name | |
hgnc_id |
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
v2ex.com##img[class="avatar"] |
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 { connect } form 'react-redux'; | |
const SAVE_WEATHER = "SAVE_WEATHER"; | |
export default function saveWeather(response) { | |
return { | |
type: SAVE_WEATHER, | |
data: response | |
} | |
} |
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(zoo) | |
# library("lubridate") | |
collectl_fn = list.files("D:/tmp/abruijn/", patter=".*.p.txt", full.names = TRUE); collectl_fn | |
zcolall = list() | |
slurmout_all = list() | |
for (i in seq_along(collectl_fn)) { | |
jobid = gsub(".*mon_(\\d+)-(cn\\d+).*.p.txt", "\\1", collectl_fn[i]) | |
nodeid = gsub(".*mon_(\\d+)-(cn\\d+).*.p.txt", "\\2", collectl_fn[i]) |
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
--- | |
title: "NLP toys" | |
author: "hliang" | |
date: "8/24/2016" | |
output: html_document | |
--- | |
Use NLP tools to analyze song lyrics. | |
load packages required: |
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
# king death | |
kings <- scan("http://robjhyndman.com/tsdldata/misc/kings.dat",skip=3) | |
kings | |
# store the data in a time series object | |
kingstimeseries <- ts(kings) | |
kingstimeseries | |
# the number of births per month in New York city, from January 1946 to December 1959 (originally collected by Newton) | |
births <- scan("http://robjhyndman.com/tsdldata/data/nybirths.dat") | |
birthstimeseries <- ts(births, frequency=12, start=c(1946,1)) |
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
#! /bin/bash | |
GCC_VERSION="6.4.0" | |
WORKDIR="$HOME/gcc" | |
INSTALLDIR="/BIGDATA/app/gcc/6.4.0" | |
# get the source code | |
cd $WORKDIR | |
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz | |
tar -xf gcc-${GCC_VERSION}.tar.xz |
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
#! /usr/bin/env python | |
''' | |
================== | |
ucsc_snapshots | |
================== | |
retrieve pictures from the UCSC Genome Browser based on coordinates | |
specified from BED3+ file and a session ID (hgsid). |
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
# Assumes you've already run coverageBed -hist, and grep'd '^all'. E.g. something like: | |
# find *.bam | parallel 'bedtools -abam {} -b capture.bed -hist | grep ^all > {}.all.txt' | |
setwd("./qc/") | |
# Get a list of the bedtools output files you'd like to read in | |
bedcov_dir = "./bedcov_cds_canol/" | |
print(files <- list.files(path=bedcov_dir, recursive=TRUE, pattern="samp.*all.txt$", full.names=TRUE)) | |
# This regular expression leaves me with "samp01", "samp02", and "samp03" in the legend. |
NewerOlder