This file contains 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 | |
# -*- coding:utf-8 -*- | |
# Written by Wu, Yang <wuyang@vt.edu> | |
''' | |
Usage: | |
python stringtie_FPKM.py <stringtie_output_dir>|<sample_list> | |
For example: | |
python stringtie_FPKM.py /foo/stringtie_output/ |
This file contains 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 [ -f $1 ]; then | |
for SRA in `grep -o "SRR[0-9]\{7\}" $1`; do | |
echo $SRA | |
fastq-dump --defline-seq '@$sn[_$rn]/$ri' --split-files $SRA & | |
done | |
else | |
fastq-dump --defline-seq '@$sn[_$rn]/$ri' --split-files $1 | |
fi |
This file contains 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
import matplotlib | |
# To solve remote session issues: | |
matplotlib.use("Agg") | |
# To make fonts editable (Type 3 to Type 2): | |
matplotlib.rcParams['pdf.fonttype'] = 42 | |
matplotlib.rcParams['ps.fonttype'] = 42 | |
plt.savefig("foo.pdf", transparent = True) # PDF is the best. | |
# subplots settings: |
This file contains 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
import datetime | |
start_time = datetime.datetime.now() | |
end_time = datetime.datetime.now() | |
cost_time = (end_time - start_time).seconds | |
print "Done in %ss." % cost_time |