Skip to content

Instantly share code, notes, and snippets.

View ShujiaHuang's full-sized avatar
:octocat:
Focusing

Shujia Huang ShujiaHuang

:octocat:
Focusing
View GitHub Profile
@ShujiaHuang
ShujiaHuang / TestPysam.py
Created October 18, 2014 08:37
测试pysam 包的使用
"""
Test pysam
"""
import pysam
import numpy as np
def Test1 () :
samfile = pysam.Samfile('1006-01.bam', 'rb')
@ShujiaHuang
ShujiaHuang / InAndOutFa.cpp
Last active August 29, 2015 14:05
读存Fa文件
// C++ read fa-sequence
void ReadFaSeq(const char *file, map<string, string> &fa) {
ifstream I(file);
if (!I){
cerr << "Cannot open file : " << file << endl;
exit(1);
}
string tmp, refId;
@ShujiaHuang
ShujiaHuang / Overlap.pl
Created July 22, 2014 21:17
Find the Overlap region between in the two file
# Author : Shujia Huang
# Date : 2013-01-10
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
my ( $posFile, $regionFile );
@ShujiaHuang
ShujiaHuang / Merge.pl
Last active August 29, 2015 14:03
Common Code In Work
#!/usr/bin/perl
use strict;
use warnings;
#1. 纯区域的Merge
sub Merge {
my ( $dis_delta, @region) = @_; # An array , format: [chrId, start, end]
my ( %prePos, @data, $id, $start, $end );