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/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 ); |
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
# Author : Shujia Huang | |
# Date : 2013-01-10 | |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
my ( $posFile, $regionFile ); |
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
// 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; |
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
""" | |
Test pysam | |
""" | |
import pysam | |
import numpy as np | |
def Test1 () : | |
samfile = pysam.Samfile('1006-01.bam', 'rb') |
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/perl | |
use warnings; | |
use strict; | |
use PerlIO::gzip; | |
die "perl $0 <.gz file in> <.gz file out>" unless @ARGV==2; |
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
#Author : Shujia Huang | |
#Date : 2010/11/27 | |
#!/usr/bin/perl -w | |
use strict; | |
use warnings; | |
my ( $file, $outfile_prefix, @bin_num ) = @ARGV; | |
my %region2num = ( "1000upstream" => 0, "first-exon" => 1, "intron" => 2, | |
"mid-exon" => 3, "last-exon" => 4, "1000downstream" => 5 ); |
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 | |
# If you adapt this script for your own use, you will need to set these two variables based on your environment. | |
# SV_DIR is the installation directory for SVToolkit - it must be an exported environment variable. | |
# SV_TMPDIR is a directory for writing temp files, which may be large if you have a large data set. | |
#export SV_DIR=`cd .. && pwd` | |
SV_DIR=/home/siyang/bin/software_pip/svtoolkit | |
SV_TMPDIR= | |
runDir= |
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/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
# https://gist.github.com/mxcl/1173223 | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
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
### Read Fa sequence ### | |
sub ReadFaSeq { | |
my ( $file, $fa ) = @_; | |
my ( $refId, $seq ); | |
open I, $file or die "Cannot open file : $file\n"; | |
$/ = ">"; <I>; $/ = "\n"; | |
while ( <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
### Read Fa sequence ### | |
sub ReadFaSeq { | |
my ( $file, $fa ) = @_; | |
my ( $refId, $seq ); | |
open I, $file or die "Cannot open file : $file\n"; | |
$/ = ">"; <I>; $/ = "\n"; | |
while ( <I> ) { |
OlderNewer