Skip to content

Instantly share code, notes, and snippets.

@Nanguage
Nanguage / circos_module_install.pl
Created November 22, 2016 05:23
perl script for install circos perl dependency library
#!/usr/bin/env perl
$module_status = `circos -module`
or die("please ensure circos installed.");
@module_status = split(/\n/, $module_status);
foreach (@module_status) {
chomp;
if ($_ =~ /^missing\s*(.+)$/) {
"Personal setting
" -----------------------------------------------------------------------------------
" 开启行号显示
set nu
" 开启自动缩进
set ai
" 自适应不同语言的智能缩进
filetype indent on
@Nanguage
Nanguage / deseq2-analysis-template.R
Created August 21, 2017 13:42 — forked from stephenturner/deseq2-analysis-template.R
Template for analysis with DESeq2
## RNA-seq analysis with DESeq2
## Stephen Turner, @genetics_blog
# RNA-seq data from GSE52202
# http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=gse52202. All patients with
# ALS, 4 with C9 expansion ("exp"), 4 controls without expansion ("ctl")
# Import & pre-process ----------------------------------------------------
# Import data from featureCounts
@Nanguage
Nanguage / call_variance.sh
Created August 24, 2017 01:51
call variance with picard, GATK and samtools
#!/bin/bash
# call variance with picard, GATK and samtools
reference=$1
sample=$2
# path to software
PICARD="/path/to/picard.jar" # broadinstitute-picard-2.9.2-6-gbb529af
SAMTOOLS="/path/to/samtools" # samtools 1.2
@Nanguage
Nanguage / fetch-genecard.py
Last active March 28, 2023 03:47
crawl genecard, fetch gene infos.
# -*- coding: utf-8 -*-
"""
crawl genecard, fetch gene infos.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usage: fetch-genecard.py [-h] [--xpath XPATH] [--base-url BASE_URL]
[--num NUM] [--timeout TIMEOUT]
id_list
"""
提取 S1 壁纸战页面中的壁纸链接并下载
https://bbs.saraba1st.com/2b/thread-1579059-1-1.html
"""
import os
import pathlib
import re
import urllib3
@Nanguage
Nanguage / install-ffmpeg.sh
Last active July 7, 2018 06:25 — forked from sparrc/install-ffmpeg.sh
Installs ffmpeg with libaom and libx265 enabled for av1 and hevc encoding (tested on Ubuntu 16.04)
#!/usr/bin/env bash
# Installs ffmpeg from source (HEAD) with libaom and libx265, as well as a few
# other common libraries
# binary will be at ~/bin/ffmpeg
sudo apt update && sudo apt upgrade -y
mkdir -p ~/ffmpeg_sources ~/bin
export PATH="$HOME/bin:$PATH"
@Nanguage
Nanguage / tabs2spaces.py
Last active July 17, 2018 03:41 — forked from amoilanen/tabs2spaces.py
Python script to replace tabs with spaces recursively for all files matching a specified file mask regex, the number of spaces if configurable
USAGE = '''
Usage example:
python tabs2spaces.py . 4 ".*\.py$"
'''
import io
import argparse
import os
#!/usr/bin/python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@Nanguage
Nanguage / extract_urls.py
Created August 19, 2018 14:04
Use you-get download youtube playlist
"""
Extract the urls from YouTube playlist page html file.
usage:
$ python extract_urls.py PLAYLIST.html OUTPUT.txt
"""
import re
import sys