\r
import org.apache.log4j.Logger;\r
\r
-import compbio.data.sequence.Alignment;\r
+import compbio.data.sequence.JpredAlignment;\r
import compbio.data.sequence.AlignmentMetadata;\r
import compbio.data.sequence.Program;\r
-import compbio.data.sequence.ScoreManager;\r
import compbio.data.sequence.SequenceUtil;\r
import compbio.engine.client.CommandBuilder;\r
import compbio.engine.client.Executable;\r
import compbio.engine.client.SkeletalExecutable;\r
import compbio.metadata.ResultNotAvailableException;\r
-import compbio.runner.Util;\r
\r
/**\r
* Command line\r
* \r
- * jpred.pl -in d16vpa_.fas -outfile res_d16vpa_ -dbname ported_db -dbpath /data/UNIREFdb -ncpu 4\r
+ * jpred.pl -in d16vpa_.fas -outfile res_d16vpa_ -dbname ported_db -dbpath\r
+ * /data/UNIREFdb -ncpu 4\r
* \r
* @author asherstnev\r
* \r
public static final String STAT_FILE = "stat.txt";\r
\r
public Jpred() {\r
+ String dbpath = ph.getProperty("jpred.data.uniref.path");\r
+ String dbname = ph.getProperty("jpred.data.uniref.name");\r
addParameters(Arrays.asList("-logfile " + STAT_FILE));\r
+ addParameters(Arrays.asList("-dbpath " + dbpath));\r
+ addParameters(Arrays.asList("-dbname " + dbname));\r
}\r
\r
// HashMap<Method, float[]>\r
+ @SuppressWarnings("unchecked")\r
@Override\r
- public Alignment getResults(String workDirectory)\r
- throws ResultNotAvailableException {\r
- Alignment annotations = null;\r
+ public JpredAlignment getResults(String workDirectory) throws ResultNotAvailableException {\r
+ JpredAlignment annotations = null;\r
try {\r
InputStream inStream = new FileInputStream(new File(workDirectory, getOutput()));\r
- annotations = new Alignment(SequenceUtil.readJpredFile(inStream), new AlignmentMetadata(Program.Jpred, '-'));\r
+ annotations = new JpredAlignment(SequenceUtil.readJpredFile(inStream), new AlignmentMetadata(Program.Jpred, '-'));\r
} catch (FileNotFoundException e) {\r
log.error(e.getMessage(), e.getCause());\r
throw new ResultNotAvailableException(e);\r
\r
@Override\r
public CommandBuilder<Jpred> getParameters(ExecProvider provider) {\r
- // If number of cores is provided, set it for the cluster execution only!\r
+ // If number of cores is provided, set it for the cluster execution\r
+ // only!\r
if (provider == Executable.ExecProvider.Cluster) {\r
int cpunum = SkeletalExecutable.getClusterCpuNum(getType());\r
cpunum = (cpunum == 0) ? 1 : cpunum;\r