参考Eadpred项目中EadpredAnalysisService.groovy文件的def pred和def excPerl方法
调用过程是java调用perl,perl调用muscle(或muscle.exe)
生成.final文件,生成与标准序列比对好的序列
(此步优先级最低)
调用过程是java调用perl,perl调用muscle(或muscle.exe)
生成.final文件,生成与标准序列比对好的序列
(此步优先级最低)
解决方案 »
- 关联表和外键
- ■■跪求■■JAVA实现 CRC16■。已经有C 和 C#版本了。仅做成JAVA版本即可
- S2SH问题
- web.xml里的错误,高手指点
- 急救 关于SmartUpload上传图片的问题
- 关于struts的标签
- 一台服务器,在tomcat5.0如何修改server.xml,使支持多个泛域名解析的主机?????
- 不知道struts怎么想的,还是关于传多个参数的问题
- 为什么我用 common-net ftpclient 访问目录时,目录有文件。ftpclient.listFiles() 长度死活都是0
- idea无法自动报错
- java问题,在线等。。急急。。。。
- java.sql.SQLException: ORA-03115: 不支持的网络数据类型或表示法
eac.currentid=id
def tmpwebRootDir = JniManager.libPath
def webRootDir= Helper.safePath(tmpwebRootDir)
def tmpDataDir = "${webRootDir}tmp/${id}"
def dllDir = "${webRootDir}internTools"
def seqsaf = "seqsa"
def seqsbf = "seqsb"
/**
* all sequences need to handle -,wrong,unknown X by alignment with standard sequences
* for H1N1\B\H3N2 subtype
*/
def perl1 = "${dllDir}/align_win.pl"
def flaga = "${tmpDataDir}/${seqsaf}.final"
def flagb = "${tmpDataDir}/${seqsbf}.final"
def muscleWin = "muscle.exe"
def muscleLin = "muscle"
FileService fs = new FileService()
fs.delFileFlag(flaga)
fs.delFileFlag(flagb)
Properties prop = System.getProperties();
String os = prop.getProperty("os.name")
if(os.toUpperCase().startsWith("WIN")){
def perla = "perl ${perl1} ${tmpDataDir} ${dllDir} ${seqsaf} ${subtype} ${muscleWin} "
excPerl(perla,flaga)
def perlb = "perl ${perl1} ${tmpDataDir} ${dllDir} ${seqsbf} ${subtype} ${muscleWin}"
excPerl(perlb,flagb) }else{
def perla = "perl ${perl1} ${tmpDataDir} ${dllDir} ${seqsaf} ${subtype} ${muscleLin} "
excPerl(perla,flaga)
def perlb = "perl ${perl1} ${tmpDataDir} ${dllDir} ${seqsbf} ${subtype} ${muscleLin}"
excPerl(perlb,flagb)
}
if (subtype == "H1N1") {
def finalResult
try{
JniManager jni = new JniManager()
List<String> result = jni.displayPairDist("${dllDir}/",flaga,flagb)
//println("result"+result)
int size = result.size();
//println("Size:" + size/3)
def content = [result:result,subtype:subtype]
finalResult = getDistances(content)
fs.printDistancesFile("${tmpDataDir}/distancePred",finalResult)
}catch(IOException ex){
throw new RuntimeException("dll is not found!",ex)
}
updateStep()
}
else if(subtype == "B" || subtype == "H3N2"){
def perl2 = "${dllDir}/eadpred_win.pl"
def perlab="perl ${perl2} ${tmpDataDir} ${dllDir} ${seqsaf} ${seqsbf} ${subtype}"
excPerl(perlab,"${tmpDataDir}/distancePred")
}
killperl()
}
def excPerl(sh,file){
try{
// get Process to execute perl, get the output and exitValue
FileService fs = new FileService()
sh.execute()
fs.fileFlag(file)
}catch(IOException ex){
throw new RuntimeException("perl utility must be installed and on path,or path set in perl.executable.Download from http://www.perl.org",ex)
}
updateStep()
}
根据这个代码,去看看java是通过哪个接口去调用的perl。急求