2012年3月31日 星期六
Ubuntu 架站
http://tw.myblog.yahoo.com/jw!KvU5AFqRR0DHJfVJlmU-/article?mid=581
架設完成後的調校也可以參考 「Ubuntu 8.04 安裝手札」
http://norman56.blogspot.com/2008/04/ubuntu-804.html
芋圓小棧部落格 ubuntu 8.04.1 server 架設主機的教學說明
http://smalldd.pixnet.net/blog
2012年3月30日 星期五
Linux rar
or
1. wget http://www.rarlab.com/rar/rarlinux-4.1.1.tar.gz
2. tar zxvf rarlinux-4.1.1.tar.gz
3. cp rar ../../bin
4. cp unrar ../../bin
但是 run 時出現
kevet@c-120:~/dataset2$ rar
Floating point exception
用另一個檔案 rar_static
5. cp rar_static ../../bin
解壓:rar a FileName.rar
壓缩:rar e FileName.rar
ok fine !!
背景執行
nohup xxxxxx & <-- 最後要加 & 代表打入背景
kevet@c-110:~/ConSurf$ nohup python2.6 1_parsepdb_557_consider_whole_chains_case_heavy_bu_normal.py 1BGA_A Y &
[1] 14576
kevet@c-110:~/ConSurf$ nohup: appending output to `nohup.out'
kevet@c-110:~/ConSurf$ ps -fC python2.6
UID PID PPID C STIME TTY TIME CMD
kevet 14576 14500 99 13:43 pts/0 00:09:14 python2.6 1_parsepdb_557_consider_whole_chains_case_heavy_bu_normal.py 1BGA_A Y
kevet@c-110:~/ConSurf$ top
top - 13:52:41 up 42 days, 11:16, 1 user, load average: 0.99, 0.90, 0.53
Tasks: 108 total, 2 running, 106 sleeping, 0 stopped, 0 zombie
Cpu(s): 22.4% us, 2.6% sy, 0.0% ni, 74.9% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 8168684k total, 4400976k used, 3767708k free, 12k buffers
Swap: 16008732k total, 4748k used, 16003984k free, 3938400k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14576 kevet 40 0 380m 269m 4056 R 99.9 3.4 9:28.52 python2.6
14642 kevet 40 0 9488 1192 904 R 0.3 0.0 0:00.01 top
1 root 40 0 4880 560 520 S 0.0 0.0 0:16.17 init.orig
nohup (no hang up,不要掛斷)。當使用者利用 ssh 等指令或軟體登入主機後,想要執行某個指令,但一旦登出或關掉 ssh 軟體,那個在背景執行的工作會跟著消失,主要原因是它的父行程被關閉了,也就是使用者剛剛關閉的 bash,那怎麼辦?nohup 可以為您強制保存背景工作,即便父行程被關閉,以下為示範
bang@linuxdiary:~$ nohup sleep 500 &此時關閉 shell,重新登入
[1] 8544
bang@linuxdiary:~$ nohup: appending output to `nohup.out'
bang@linuxdiary:~$ ps -fC sleep (用 ps 查詢正在用 sleep 命令執行的行程)
UID PID PPID C STIME TTY TIME CMD
root 8544 8014 0 16:41 pts/1 00:00:00 sleep 500
bang@linuxdiary:~$ ps -fC sleep
UID PID PPID C STIME TTY TIME CMD
root 8544 1 0 16:42 pts/1 00:00:00 sleep 500
會發現它還存在著,但 PPID 變為 1,亦即父行程被指派為 init,這個背景工作不會再受父行程關閉而關閉影響,因為如果想關閉 init,那就關機吧。
screen -ls 顯示目前個人所有的 screen
screen -r 就是重新回到(resume)screen 裡 ex: % screen -r 1188
kevet@c-120:~/dataset2$ screen rar_static a hssp.rar ./hssp &
[1] 6321
kevet@c-120:~/dataset2$ [screen is terminating]
kevet@c-120:~/dataset2$ man
What manual page do you want?
[1]+ Done screen rar_static a hssp.rar ./hssp
screen S mm /usr/local/kaillerasrv-0.86/kaillerasrv &
-S 後面加的字是用來分辨那個 process用的,在範例中是叫做"mm",
最後面加的就是你要跑的process名稱
當你要把畫面叫回來時
這個 "mm" 就是之前定的名稱
2012年3月28日 星期三
R package 安裝
> install.packages("igraph", repos = "http://cran.csie.ntu.edu.tw")
Other no fine
v install.packages("graph", repos = "http://cran.csie.ntu.edu.tw")
v install.packages("RBGL", repos = "http://cran.csie.ntu.edu.tw")
install.packages("Rgraphviz", repos = "http://www.bioconductor.org/biocLite.R")
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘RBGL’ is not available (for R version 2.14.2)
Link
1. > source("http://bioconductor.org/biocLite.R")
2. > biocLite("Rgraphviz")
3. > library(Rgraphviz) => test !
Link
1. > source("http://bioconductor.org/biocLite.R")
2. > biocLite("graph")
1. > source("http://bioconductor.org/biocLite.R")
2. > biocLite("RBGL")
3. > install.packages("gRbase")
4. > library(gRbase) => test !
2012年3月26日 星期一
Mini KMS Activator v1.3
请进入注册表编辑器,删掉以下注册表键值:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft \OfficeSoftwareProtectionPlatform,重新(或修复)安装Office 2010并进行激活操作。
RSA defined
Relative sidechain solvent accessibility : Three classes of relative sidechain solvent accessibility were defined based on the method of Lee and Richards (35). Residues with sidechain relative accessibilities of:
-
<17% were defined as inaccessible
-
17–43% were defined as partially accessible
-
>43% were defined as accessible
Link
Link
Link
2012年3月16日 星期五
R command
Assignment
To assign a value to a variable, use the assignment operator<-
like this
x <- 23
Vectors
The basic R data type is not a single number, but a "vector", which is what R calls a sequence of numbers. R uses vectors to represent whole data sets. The R functionc
collects numbers into a single
vector object, for example,
x <- c(2,4,11,17) creates a vector of length 4
Data Frames
Often data sets consist of several vectors of the same length, which consist of measurements of different variables on the same individuals. R has a data structure that caters to this situation called a data frame. Ifx
, y
, and z
are vectors of the same length, then fred <- data.frame(x, y, z)很好的介紹
http://data.princeton.edu/R/linearModels.html
------------------------------------------------------------------ par(mfrow=c(2,2)) fpe <- read.table("effort.dat") attach(fpe) summary(fpe) mean(effort) cor(effort,change) lmfit = lm( change ~ setting + effort ) lmfit summary(lmfit) anova(lmfit) plot(lmfit) fitted(lmfit) coef(lmfit) residuals(lmfit) names(lmfit) #png("cor2.png", height=600, width=600) #plot(effort, change, pch=21, bg="gold") #title("Scatterplot of Change by Effort", col.main="#3366CC") # dev.off()
2012年3月15日 星期四
Mac port 安裝 進階
r 要升級到 2.14.1
step1. 升級 R
>> port install R @2.14.1
step2. 安裝模組
>> install.packages("sem", repos = "http://cran.csie.ntu.edu.tw")
step3. 測試程式碼 Structual Equation Modeling ( save as: sem.r )
>> rscript sem.r
ps. sem manual PDF
2012年3月14日 星期三
2012年3月12日 星期一
Delaunay tessellation
1. Voronoi Diagrams (VD) , 又名 Dirichlet tessellations
2. Tessellation
ps. google key in "Voronoi Diagrams" 資料較多
Delaunay tessellation of proteins: four body nearest-neighbor propensities of amino acid residues
J Comput Biol. 1996
Abstract
Delaunay tessellation is applied for the first time in the analysis of protein structure. By representing amino acid residues in protein chains by C alpha atoms, the protein is described as a set of points in three-dimensional space. Delaunay tessellation of a protein structure generates an aggregate of space-filling irregular tetrahedra, or Delaunay simplices. The vertices of each simplex define objectively four nearest neighbor C alpha atoms, i.e., four nearest-neighbor residues. A simplex classification scheme is introduced in which simplices are divided into five classes based on the relative positions of vertex residues in protein primary sequence. Statistical analysis of the residue composition of Delaunay simplices reveals nonrandom preferences for certain quadruplets of amino acids to be clustered together. This nonrandom preference may be used to develop a four-body potential that can be used in evaluating sequence-structure compatibility for the purpose of inverted structure prediction.
Related Link
0 易懂 Voronoi Diagram
1 ADCGALsrc0.01a.zip
2 Java 康乃爾大學
3 Matlab
4 iPad 的Voronoi Diagram
5
Find Book
Delaunay Tessellation protein key in here
MayaVi
This example shows how to use Mayavi in a purely algorithmic way, to compute a Delaunay from data points, extract it and pass it to network. It also shows how to plot a graph using quiver.
建構 3D 要看好此例 example
Delny 0.4.1
Python package to create N-dimensional Delaunay triangulations. It uses the libqhull library from the Qhull project for the triangulation so a proven algorithm is used.
matplotlib
Link 1
Qhull
利用 port 安裝
sh-3.2# port install qhull
---> Computing dependencies for cmake
---> Fetching archive for cmake
---> Attempting to fetch cmake-2.8.7_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/cmake
---> Fetching cmake
example
.
2012年3月11日 星期日
BioPerl
link2 6steps
The strategy I used to install BioPerl was as follows:
1. Use MacPorts to install Perl.
2. Use CPAN to install BioPerl.
Here are the nitty gritty details. You need a live internet connection, as both MacPorts and CPAN expect to be able to download packages.
Step One: XCode Tools
Before MacPorts can be installed, XCode Tools needs to be installed. This is free from Apple and can be installed from the original OS X 10.6 DVD or downloaded from Apple's developer site.
You can tell that XCode Tools is installed by looking for a Developer directory at the root of your hard drive.
Step Two: MacPorts
I simply downloaded the MacPorts Package Installer from the MacPorts site.
Step Three: Install Perl
sudo port install perl5.12
Step Four: Install GraphViz
This is a prerequisite of BioPerl and the BioPerl build will fail if it is not installed. It will download a ton of prequisites first. After typing the following, get a coffee and a sandwich.
sudo port install graphviz
Step Five: Configure CPAN
CPAN likes to have YAML installed. So:
sudo cpan YAML
At this point cpan will realize it's being run for the first time and ask you some questions like
Would you like me to configure as much as possible automatically? [yes]
Selecting the defaults worked fine.
It's nice to have LWP too.
To install LWP, first get to the cpan command prompt:
sudo cpan
Then install it:
install Bundle::LWP
Step Six: Build BioPerl
To install BioPerl, first get to the cpan command prompt:
sudo cpan
At the command prompt, tell CPAN that you want it to automatically get and install any prerequisites it comes across (this saves you hours of choosing "Yes"):
cpan[1]> o conf prerequisites_policy follow
And now, at the cpan prompt, install BioPerl:
install C/CJ/CJFIELDS/BioPerl-1.6.1.tar.gz
It will stop several times along the way. Except for the following question where my selection was to install all optional external modules, the defaults were fine.
Install [a]ll optional external modules, [n]one, or choose [i]nteractively? [n] a
During the tests that BioPerl runs, I saw the following:
Replacement list is longer than search list at Bio/Range.pm line 251.
According to this post, The above are warnings from perl 5.12 that can be ignored (they have been fixed in bioperl-live on github).
For a quick test of BioPerl, put the following into a file named test.pl:
use Bio::Perl;
# this script will only work if you have an internet connection on the
# computer you're using, the databases you can get sequences from
# are 'swiss', 'genbank', 'genpept', 'embl', and 'refseq'
$seq_object = get_sequence('embl',"AI129902");
write_sequence(">roa1.fasta",'fasta',$seq_object);
Then run it:
perl test.pl
and sure enough, a file named roa1.fasta gets written. Yay!
If you are installing BioPerl on a Mac that has multiple user accounts, you'll need to make sure that the following exists in each user's .profile
file (at /Users/john/.profile
, for example):
# MacPorts Installer addition on 2010-10-04_at_15:32:08: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
This makes it so that when you type perl
the Mac will find and use the Perl from MacPorts instead of the system Perl. Also, be aware of scripts that say #!/usr/bin/perl
at the top.
2012年3月10日 星期六
delphi 5.1 vs Biskit
input model = PDBModel( 'mystructure.pdb' ) ;http://biskit.pasteur.fr/use/workflows/delphi
D = Delphi( inputmodel ) ;
result = D.run() >>> result
2012年3月9日 星期五
計算 cavity cleft
Cavities and Atomic Packing in Protein Structures and Interfaces
1. 新的? 試用中
http://3vee.molmovdb.org/
2. McVol
- 有 source code 用過
- INSTALLATION:
- Download the file
- type
tar -jxf McVol.tar
- Go to the directory McVol/test:
cd McVol/test
- Type
../src/McVol all
3. SURFNET
- 要填寫同意書 所以沒用過
4. CAVER
5. dxTuber link1 link2
有 source code, 含 python code analysis
ps. 有另一套 Inflategro 用於 MD 的 -> inflategro.pl (only one)
6. MolSpace (SurfVol)
plugin 於 VMD
7. MetaPocket 2.0
LIGSITEcs, PASS, Q-SiteFinder, SURFNET, Fpocket, GHECOM, ConCavity and POCASA
2012年3月8日 星期四
delphi 5.1
執行後缺少檔案?
mms-MacBook-Air:Desktop mm$ ./delphi5.1
dyld: Library not loaded: /usr/local/lib/libgfortran.3.dylib
Referenced from: /Users/mm/Desktop/./delphi5.1
Reason: image not found
爬文後到 http://hpc.sourceforge.net/ 下載這檔案
gcc-lion.tar.gz, gfortran-lion.tar.gz (gfortran only), updated Feb 2012 (10.7 Lion only).
解壓後 找到 libgfortran.3.dylib
用 sudo su 權限 cp 到 /usr/local/lib/
再執行又少了一個檔案
sh-3.2# ./delphi5.1
dyld: Library not loaded: /usr/local/lib/libquadmath.0.dylib
Referenced from: /Users/mm/Desktop/./delphi5.1
Reason: image not found
Trace/BPT trap: 5
所以再找到這個檔案 cp 過去 即可
完成畫面
sh-3.2# ./delphi5.1
______ DelPhi V. 5 Release 1.0 __________
| |
| A program to solve the PB equation |
| in 3D, using non-linear form, incorporating |
| many dielectric regions, multisalt ionic |
| strength, different probe radii, periodic |
| and focussing boundary conditions, utilizing |
| stripped optimum successive over-relaxation |
| and an improved algorithm for mapping the |
| Mol. Surface to the finite-Difference grid |
| Recompiled on Linux and PC |
| August 2011, Maintained by Delphi |
| Development Team |
|____________ ____________|
DelPhi V. 5.1
Program started on 2012-03-08 at 23:50:02
parameter file fort.10 does not seem to exist.
Therefore stopping
網頁版 http://compbio.clemson.edu/sapp/delphi_webserver/userInput.html
好像比較方便
2012年3月6日 星期二
Plos one publish 格式
Export High Resolution Images from PyMol
To get a 300 ppi PNG file for a 4.92 inch by 9.25 inch image:
Ray-traced:
ray 3500,2500
png /Users/kevet/Desktop/ex.png, dpi=300
Enable the use of Arial in R
First, convert the Arial .ttf files to afm:
ttf2afm /usr/share/fonts/msttcorefonts/arial.ttf > ~/arial.afm
ttf2afm /usr/share/fonts/msttcorefonts/ariali.ttf > ~/ariali.afm
ttf2afm /usr/share/fonts/msttcorefonts/arialbd.ttf > ~/arialbd.afm
ttf2afm /usr/share/fonts/msttcorefonts/arialbi.ttf > ~/arialbi.afm
and then do the following in R:
postscript(file="try.ps", horizontal=F,
onefile=F,
width=4, height=4,
family=c("/home/stephen/arial.afm",
"/home/stephen/arialbd.afm",
"/home/stephen/ariali.afm",
"/home/stephen/arialbi.afm"),
pointsize=12)
hist(rnorm(100))
dev.off()
ps.
1. 若無 ttf2afm, 先至 http://www.tug.org/mactex/2011/ 安裝 MacTex
2. Mac 路徑
a. Lee-Kevinteki-MacBook:Fonts kevet$ ls Arial*
Arial Black.ttf Arial Rounded Bold.ttf
Arial Narrow Bold Italic.ttf Arial Unicode.ttf
Arial Narrow Bold.ttf ArialHB.ttf
Arial Narrow Italic.ttf ArialHBBold.ttf
Arial Narrow.ttf
b. /Library/Fonts/Microsoft/Arial.ttf
3. my commands:
ttf2afm /Library/Fonts/Microsoft/Arial.ttf > /Users/kevet/Library/Fonts/Arial.afm
ttf2afm /Library/Fonts/Microsoft/Arial.ttf > /Users/kevet/Library/Fonts/Ariali.afm
ttf2afm /Library/Fonts/Microsoft/Arial.ttf > /Users/kevet/Library/Fonts/Arialbd.afm
ttf2afm /Library/Fonts/Microsoft/Arial.ttf > /Users/kevet/Library/Fonts/Arialbi.afm
Macintosh OS X and PowerPoint 2008:
Step I: Convert PowerPoint File to PNG or PDF
- Go to PowerPoint Preferences. Under the Save tab, at the bottom, set Advanced Resolution Settings to 1600 DPI.
- File → Save As. In the Format pull-down menu, select either PNG or PDF. Save. Your PNG will be oversize at 72ppi, but will resize properly to 300ppi in Photoshop or GIMP. Your PDF will be the exact size of your PowerPoint slide at 300ppi. All other formats save as 72ppi no matter what you set in Preferences.
Step II: Convert Individual Files to TIFFs
In Photoshop:
- File→Open the PNG or PDF.
- Use the Crop Tool (fifth from the top of the toolbar) to select an area close to the borders of your image. Hit Enter to apply the crop.
- Layer→Flatten Image
- If you opened a PNG, go Image→Image Size. Uncheck the Resample Image checkbox. If the Width is over 17.35cm, type 17.35 in the Width box (17.35cm is our maximum allowable width for figures). The Resolution will go up automatically as the Width decreases. If the resolution does not hit 300 when you make the Width 17.35, type 300 in Resolution and as long as Width doesn't go below 8.3cm, everything is fine. Also, the height cannot be more than 23.35. If the Height and Width are within these prescribed limits, no adjustment to your figure size needs to be made.
- If you opened a PDF, go Image→Image Size and check to make sure the PDF is within our dimension limits. Resize it down to fit within these limits if need be.
- File→Save As. Save as TIFF, Image Compression set to LZW, Pixel Order set to Interleaved, Byte Order set to IBM PC.
SCRATCH
1. SSpro/ACCpro 4.03: Protein Secondary Structure and Solvent Accessibility Prediction
2. MUpro 1.1: Prediction of Stability Changes (ΔΔG) of Single Site Mutations from Protein Sequences
3. DOMpro 1.0: Protein Domain Prediction
4. DIpro 2.0: Protein Disulfide Bond Prediction ........
2012年3月2日 星期五
Lab website
Lab website 9529901
WCN http://wcn.life.nctu.edu.tw/
SAS http://140.113.239.214/~weilun/
old link