基因数据处理118之SSW运行

更多代码请见:https://github.com/xubo245

基因数据处理系列

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.结果:

xubo@xubo:~/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 

遇到的问题:

xubo@xubo:~/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/
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页