3
3
import static com .dmtavt .fragpipe .cmd .ToolingUtils .BATMASS_IO_JAR ;
4
4
import static com .dmtavt .fragpipe .cmd .ToolingUtils .SMILE_CORE_JAR ;
5
5
import static com .dmtavt .fragpipe .cmd .ToolingUtils .SMILE_MATH_JAR ;
6
+ import static com .github .chhh .utils .OsUtils .isUnix ;
7
+ import static com .github .chhh .utils .OsUtils .isWindows ;
6
8
7
9
import com .dmtavt .fragpipe .Fragpipe ;
8
10
import com .dmtavt .fragpipe .FragpipeLocations ;
@@ -30,7 +32,8 @@ public class CmdMoreRescore extends CmdBase {
30
32
public static final String JAR_MORERESCORE_NAME = "morerescore-1.0.jar" ;
31
33
public static final String JAR_MORERESCORE_MAIN_CLASS = "Features.MainClass" ;
32
34
private static final String [] JAR_DEPS = {SMILE_CORE_JAR , SMILE_MATH_JAR , BATMASS_IO_JAR };
33
- private static final String DIANN_EXE = "diann/win/DiaNN.exe" ;
35
+ private static final String DIANN_WIN = "diann/1.8/win/DiaNN.exe" ;
36
+ private static final String DIANN_LINUX = "diann/1.8/linux/diann-1.8" ;
34
37
private static final Pattern pattern1 = Pattern .compile ("\\ .pepXML$" );
35
38
private static final Pattern pattern2 = Pattern .compile ("_rank[0-9]+\\ .pepXML$" );
36
39
@@ -51,7 +54,16 @@ public boolean configure(Component comp, int ramGb, int threads, Map<InputLcmsFi
51
54
return false ;
52
55
}
53
56
54
- final List <Path > diannPath = FragpipeLocations .checkToolsMissing (Seq .of (DIANN_EXE ));
57
+ final List <Path > diannPath ;
58
+ if (isWindows ()) {
59
+ diannPath = FragpipeLocations .checkToolsMissing (Seq .of (DIANN_WIN ));
60
+ } else if (isUnix ()) {
61
+ diannPath = FragpipeLocations .checkToolsMissing (Seq .of (DIANN_LINUX ));
62
+ } else {
63
+ System .err .println ("DIA-NN only works in Windows and Linux." );
64
+ return false ;
65
+ }
66
+
55
67
if (diannPath == null || diannPath .isEmpty ()) {
56
68
System .err .println ("Cannot find DIA-NN executable file." );
57
69
return false ;
0 commit comments