基因資料處理118之SSW執行
阿新 • • 發佈:2018-12-25
基因資料處理系列
1.解釋
SSW是一個更快的SW演算法,並且提供了c語言lib和java的呼叫
程式碼:
https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library
論文:
Zhao, M., et al. (2013). "SSW Library: an SIMD Smith-Waterman C/C++ library for use in genomic applications." PloS one 8(12): e82138.
2.程式碼:
git clone https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library.git cd Complete-Striped-Smith-Waterman-Library cd src make java java -Djava.library.path=. -jar ssw.jar ssw.Example
3.結果:
[email protected]:~/xubo/tools/Complete-Striped-Smith-Waterman-Library/src$ java -Djava.library.path=. -jar ssw.jar ssw.Example
Aligning nucleotides
score1=21 score2=8 ref_begin1=8 ref_end1=21 read_begin1=0 read_end1=14 ref_end2=4 cigar=9M1I5M
遇到的問題:
[email protected]:~/xubo/tools/Complete-Striped-Smith-Waterman-Library/src$ java -jar ssw.jar -Djava.library.path=. ssw.Example Cannot find libsswjni.so. Has the library been built and LD_LIBRARY_PATH or -Djava.library.path set appropriately? java.lang.UnsatisfiedLinkError: no sswjni in java.library.path Exception in thread "main" java.lang.UnsatisfiedLinkError: no sswjni in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886) at java.lang.Runtime.loadLibrary0(Runtime.java:849) at java.lang.System.loadLibrary(System.java:1088) at ssw.Example.main(Example.java:12)
原因:
-Djava.library.path 應該放在-jar前面
參考
【1】https://github.com/xubo245
【4】http://blog.csdn.net/xubo245/