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 | |
""" | |
Get a GEO series matrix file describing an experiment and | |
parse it into project level and sample level data. | |
""" | |
import os | |
from typing import Tuple, Union | |
import tempfile |
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
# You can download this config from: http://surge.run/config-example/ios.conf | |
# Edit with your computer and copy back to iOS device via iTunes, URL, AirDrop | |
# or iCloud Drive | |
# Version 2.0 | |
[General] | |
# Log level: warning, notify, info, verbose (Default: notify) | |
loglevel = notify | |
# Skip domain or IP range. These hosts will not be processed by Surge Proxy. | |
# (In macOS version when Set as System Proxy enabled, these hosts will be |
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
## Syntax to use when search ClinVar using chrom:pos style info | |
(17[Chromosome]) AND 41244124[Base Position for Assembly GRCh37] |
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
--- | |
# this is a demo of how the user commands work and how to reference salted passwords | |
# in vars sections. You could also use vars_files if you like (see other examples) | |
- hosts: "193" | |
remote_user: username | |
gather_facts: no | |
vars: | |
# created with: | |
# python -c 'import crypt; print crypt.crypt("This is my Password", "$1$SomeSalt$")' |
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
# refer to this doc for instruction about compiling the ngrok server/client binary | |
https://imququ.com/post/self-hosted-ngrokd.html | |
# step1_prepare_crt.bash, run this in ngrok directory | |
export NGROK_DOMAIN="yourdomain.com" | |
/usr/bin/openssl genrsa -out base.key 2048 -config ./openssl.cnf | |
/usr/bin/openssl req -new -x509 -nodes -key base.key -days 10000 -subj "/CN=$NGROK_DOMAIN" -out base.pem -config ./openssl.cnf | |
/usr/bin/openssl genrsa -out server.key 2048 -config ./openssl.cnf | |
/usr/bin/openssl req -new -key server.key -subj "/CN=$NGROK_DOMAIN" -out server.csr -config ./openssl.cnf |
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
# print 2 line into one | |
awk 'NR%2{printf "%s ",$0;next;}1' yourFile | |
# copy files using rsync | |
rsync -avz -h --progress --files-from=./fastq_list user@host:/ . | |
# change password from script | |
# this is used not often, yet can be very useful when you need to change passwd from VPS provider's dasgboard | |
`echo "newpasswd" | passwd root --stdin` | |
# transform head line to a vector |
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
# add user "hwang" | |
# this method is old way on Ubuntu nowadays, for modern way of doing this, should use "adduser" | |
sudo useradd hwang -m -b /data/home -s /bin/bash | |
# add to group | |
sudo usermod -g dev hwang # For primary group "dev" | |
sudo usermod -a -G admin hwang # For secondary group "admin" | |
#add new user named "zhangshan" | |
sudo useradd zhangsan group001 |
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
# variant_demo_simplify.tsv hold basic info of variant, looks like: | |
# chr1 69511 . A G | |
# chr1 865694 . C T | |
# 1. split input tsv file, cause if records are too many, a server error will be returned, | |
## although offical site stat that up to 50000 VCF rows may be posted one time | |
# 2. use NCBI variation services API to post all rows which are stored in a file | |
split -l 10000 /path/to/variant_demo_simplify.tsv | |
for s in $(echo "xa?"); do | |
curl -X POST \ | |
--header "Content-Type: text/plain; charset=utf-8" --header "Accept: text/plain; charset=utf-8" \ |