把snp注释结果文件按指定ROH区间输出
- 把ROH区间构建为如下结构的字典
{
chrom: {
(start, end): set([gene1, gene2, ...]),
...
#!/usr/bin/env python | |
#-*- encoding: utf8 -*- | |
import sys | |
import logging | |
class MyLogger(logging.Logger): | |
def __init__(self, | |
name=None, | |
level=logging.DEBUG, |
#!/bin/sh | |
part_bytes=$((1024 * 1024 * 1024)) | |
USAGE() { | |
echo -e "usage: $0 [options] <url> | |
options: | |
-o <str> the prefix of output | |
-s run curl on silent mode | |
-b <int> the bytes of each part[default: $part_bytes] |
#!/bin/sh | |
set -eo pipefail | |
# ******************************************* | |
# Script to perform DNA seq variant calling | |
# using a single sample with fastq files | |
# named 1.fastq.gz and 2.fastq.gz | |
# ******************************************* | |
# Update with the fullpath location of your sample fastq | |
fastq_folder="/home/pipeline/samples" |
#!/usr/bin/env python | |
#-*- encoding: utf8 -*- | |
'''\033[1;32m | |
参考基因组每条染色体总长度和N的数量统计 | |
\033[0m''' | |
import os | |
import sys | |
import json | |
import textwrap | |
import logging |
#!/usr/bin/env python2 | |
# encoding: utf-8 | |
'''\033[1;3;32m | |
normalizing file with multiple encodings to utf8 | |
\033[0m''' | |
import sys | |
import signal | |
import textwrap | |
import chardet |
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
PS1="\[\e[0;35m\][\u@\h\[\e[33m\] \t \[\e[36m\]\w]\n\[\e[36m\]$\[\e[m\]" |
#!/usr/bin/env python | |
#-*- encoding: utf-8 -*- | |
import os | |
import argparse | |
import getpass | |
import socket | |
import glob | |
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use Pod::Usage; | |
use Getopt::Long; | |
our $VERSION = '$Revision: ba2461d35c1c0732560fce2c19319479f5232d60 $'; | |
our $LAST_CHANGED_DATE = '$LastChangedDate: 2012-10-23 23:32:05 -0700 (Tue, 23 Oct 2012) $'; | |
''' | |
pileup 获取指定区间reads的比对情况 | |
truncate=True,只输出指定位点 | |
stepper='samtools' 同samtools depth一样的过滤 | |
stepper='nofilter' 不进行任何过滤 | |
fetch 抓取指定区间内的所有reads | |
''' | |
import pysam |