to ScoreManager.
\r
import org.apache.log4j.Logger;\r
\r
-import compbio.runner.structure.RNAalifold;\r
-\r
// Utility class for reading alifold output\r
\r
public class RNAStructReader {\r
return new RNAStructScoreManager(structs, data);\r
}\r
\r
- // Just for the purpose of creating nee TreeSet<Score> objects of length one\r
+ // Just for the purpose of creating new TreeSet<Score> objects of length one\r
// for adding to a 'data' list to make a ScoreManager\r
private static TreeSet<Score> newSetScore(Enum<?> res, List<Float> scores) {\r
// first convert List<Float> to float[]\r
\r
\r
public RNAStructScoreManager(List<String> structs, List<TreeSet<Score>> data) {\r
+ \r
assert(structs.size() == data.size());\r
\r
List<ScoreHolder> seqScores = new ArrayList<ScoreHolder>();\r
data.add(sch.scores);\r
}\r
return data;\r
+ \r
}\r
\r
// Send this data Structure back to something approximating the stdoutFile\r
\r
import javax.xml.bind.annotation.XmlAccessType;\r
import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlSeeAlso;\r
import javax.xml.bind.annotation.XmlTransient;\r
\r
+@XmlSeeAlso({RNAStructScoreManager.class})\r
@XmlAccessorType(XmlAccessType.FIELD)\r
public class ScoreManager {\r
\r
}\r
\r
private ScoreManager(Map<String, Set<Score>> data) {\r
+ System.out.println("A ScoreManager was created!!");\r
+\r
+ \r
List<ScoreHolder> seqScores = new ArrayList<ScoreHolder>();\r
for (Map.Entry<String, Set<Score>> singleSeqScores : data.entrySet()) {\r
seqScores.add(new ScoreHolder(singleSeqScores.getKey(),\r
}\r
\r
public static ScoreManager newInstance(Map<String, Set<Score>> data) {\r
+ System.out.println("A ScoreManager was created!!");\r
+\r
+ \r
return new ScoreManager(data);\r
}\r
\r
public static ScoreManager newInstanceSingleScore(\r
Map<String, Score> seqScoresMap) {\r
+ \r
+ System.out.println("A ScoreManager was created!!");\r
+\r
+ \r
Map<String, Set<Score>> multipleScoresMap = new TreeMap<String, Set<Score>>();\r
for (Map.Entry<String, Score> seqScore : seqScoresMap.entrySet()) {\r
Set<Score> scores = new TreeSet<Score>();\r
}\r
\r
public static ScoreManager newInstanceSingleSequence(Set<Score> data) {\r
+ System.out.println("A ScoreManager was created!!");\r
+\r
+ \r
return new ScoreManager(ScoreManager.SINGLE_ENTRY_KEY,\r
new TreeSet(data));\r
}\r
import compbio.data.sequence.ClustalAlignmentUtil;
import compbio.data.sequence.ConservationMethod;
import compbio.data.sequence.FastaSequence;
+import compbio.data.sequence.RNAStructScoreManager;
import compbio.data.sequence.ScoreManager;
import compbio.data.sequence.SequenceUtil;
import compbio.data.sequence.UnknownFileFormatException;
import compbio.metadata.UnsupportedRuntimeException;
import compbio.metadata.WrongParameterException;
import compbio.runner.conservation.AACon;
+import compbio.runner.structure.RNAalifold;
import compbio.util.SysPrefs;
import compbio.ws.server.RNAalifoldWS;
public class TestRNAalifoldWS {
SequenceAnnotation<RNAalifoldWS> foldws;
+// RNAalifoldWS foldws;
@BeforeTest(groups = {AllTestSuit.test_group_webservices})
void initConnection() {
try {
JABAService client = Jws2Client.connect(
"http://localhost:8080/jabaws", Services.RNAalifoldWS);
+// foldws = (RNAalifoldWS) client;
foldws = (SequenceAnnotation<RNAalifoldWS>) client;
} catch (ConnectException e) {
e.printStackTrace();
public void testFold() throws FileNotFoundException, IOException,
UnknownFileFormatException {
+
// String CURRENT_DIRECTORY = SysPrefs.getCurrentDirectory()
// + File.separator;
String jobId = foldws.customAnalize(fsl, options);
System.out.println("J: " + jobId);
- ScoreManager result = foldws.getAnnotation(jobId);
+ RNAStructScoreManager result = (RNAStructScoreManager)foldws.getAnnotation(jobId);
+
+
+ // standard and RNAStruct specific ways of formatting scoremanager
System.out.println("fold results: \n" + result.toString());
Writer writer = new OutputStreamWriter(System.out);
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "cancelJob", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "cancelJob", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "cancelJob", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "cancelJob", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class CancelJob {\r
\r
@XmlElement(name = "jobId", namespace = "")\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "cancelJobResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "cancelJobResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "cancelJobResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "cancelJobResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class CancelJobResponse {\r
\r
@XmlElement(name = "return", namespace = "")\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "getJobStatus", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "getJobStatus", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "getJobStatus", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "getJobStatus", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class GetJobStatus {\r
\r
@XmlElement(name = "jobId", namespace = "")\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "getJobStatusResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "getJobStatusResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "getJobStatusResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "getJobStatusResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class GetJobStatusResponse {\r
\r
@XmlElement(name = "return", namespace = "")\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "getLimit", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "getLimit", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "getLimit", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "getLimit", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class GetLimit {\r
\r
@XmlElement(name = "presetName", namespace = "")\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "getLimitResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "getLimitResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "getLimitResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "getLimitResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class GetLimitResponse {\r
\r
@XmlElement(name = "return", namespace = "")\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "getLimits", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "getLimits", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "getLimits", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "getLimits", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class GetLimits {\r
\r
\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "getLimitsResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "getLimitsResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "getLimitsResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "getLimitsResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class GetLimitsResponse {\r
\r
@XmlElement(name = "return", namespace = "")\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "getPresets", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "getPresets", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "getPresets", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "getPresets", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class GetPresets {\r
\r
\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "getPresetsResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "getPresetsResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "getPresetsResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "getPresetsResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class GetPresetsResponse {\r
\r
@XmlElement(name = "return", namespace = "")\r
public class GetResultResponse {\r
\r
@XmlElement(name = "return", namespace = "")\r
- private compbio.data.sequence.RNAstruct _return;\r
+ private compbio.data.sequence.Alignment _return;\r
\r
/**\r
* \r
* @return\r
- * returns RNAstruct\r
+ * returns Alignment\r
*/\r
- public compbio.data.sequence.RNAstruct getReturn() {\r
+ public compbio.data.sequence.Alignment getReturn() {\r
return this._return;\r
}\r
\r
* @param _return\r
* the value for the _return property\r
*/\r
- public void setReturn(compbio.data.sequence.RNAstruct _return) {\r
+ public void setReturn(compbio.data.sequence.Alignment _return) {\r
this._return = _return;\r
}\r
\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "getRunnerOptions", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "getRunnerOptions", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "getRunnerOptions", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "getRunnerOptions", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class GetRunnerOptions {\r
\r
\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "getRunnerOptionsResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "getRunnerOptionsResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "getRunnerOptionsResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "getRunnerOptionsResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class GetRunnerOptionsResponse {\r
\r
@XmlElement(name = "return", namespace = "")\r
* Generated source version: 2.2.3\r
* \r
*/\r
-@XmlRootElement(name = "JobSubmissionException", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "JobSubmissionException", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "JobSubmissionException", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "JobSubmissionException", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class JobSubmissionExceptionBean {\r
\r
private String message;\r
* Generated source version: 2.2.3\r
* \r
*/\r
-@XmlRootElement(name = "LimitExceededException", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "LimitExceededException", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "LimitExceededException", namespace = "http://msa.data.compbio/01/01/2010/", propOrder = {\r
+@XmlType(name = "LimitExceededException", namespace = "http://msa.data.compbio/01/12/2010/", propOrder = {\r
"actualNumberofSequences",\r
"message",\r
"numberOfSequencesAllowed",\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "pullExecStatistics", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "pullExecStatistics", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "pullExecStatistics", namespace = "http://msa.data.compbio/01/01/2010/", propOrder = {\r
+@XmlType(name = "pullExecStatistics", namespace = "http://msa.data.compbio/01/12/2010/", propOrder = {\r
"jobId",\r
"position"\r
})\r
import javax.xml.bind.annotation.XmlRootElement;\r
import javax.xml.bind.annotation.XmlType;\r
\r
-@XmlRootElement(name = "pullExecStatisticsResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "pullExecStatisticsResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "pullExecStatisticsResponse", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "pullExecStatisticsResponse", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class PullExecStatisticsResponse {\r
\r
@XmlElement(name = "return", namespace = "")\r
* Generated source version: 2.2.3\r
* \r
*/\r
-@XmlRootElement(name = "ResultNotAvailableException", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "ResultNotAvailableException", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "ResultNotAvailableException", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "ResultNotAvailableException", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class ResultNotAvailableExceptionBean {\r
\r
private String message;\r
* Generated source version: 2.2.3\r
* \r
*/\r
-@XmlRootElement(name = "UnsupportedRuntimeException", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "UnsupportedRuntimeException", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "UnsupportedRuntimeException", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "UnsupportedRuntimeException", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class UnsupportedRuntimeExceptionBean {\r
\r
private String message;\r
* Generated source version: 2.2.3\r
* \r
*/\r
-@XmlRootElement(name = "WrongParameterException", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlRootElement(name = "WrongParameterException", namespace = "http://msa.data.compbio/01/12/2010/")\r
@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "WrongParameterException", namespace = "http://msa.data.compbio/01/01/2010/")\r
+@XmlType(name = "WrongParameterException", namespace = "http://msa.data.compbio/01/12/2010/")\r
public class WrongParameterExceptionBean {\r
\r
private String message;\r
public RNAalifoldWS() {\r
super (new RNAalifold(), log);\r
}\r
-\r
- \r
-// // for testing\r
-// @Override\r
-// public RNAStructScoreManager getAnnotation(String jobId) \r
-// throws ResultNotAvailableException {\r
-// return WSUtil.getAnnotation(jobId, log);\r
-// }\r
- \r
\r
- // Only purpose of Overrides is to replace "analize" with "fold" method \r
+ // Only purpose is to replace "analize" with "fold" method \r
// so that a clustal input file and not fasta will be generated\r
@Override\r
public String analize(List<FastaSequence> sequences)\r
getLimit(""));\r
}\r
\r
- // Only purpose of Overrides is to replace "analize" with "fold" method \r
+ // Only purpose is to replace "analize" with "fold" method \r
// so that a clustal input file and not fasta will be generated\r
@Override\r
public String customAnalize(List<FastaSequence> sequences,\r
\r
import compbio.data.sequence.Alignment;\r
import compbio.data.sequence.FastaSequence;\r
+import compbio.data.sequence.RNAStructScoreManager;\r
import compbio.data.sequence.ScoreManager;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
ConfiguredExecutable<T> aacon = (ConfiguredExecutable<T>) asyncEngine\r
.getResults(jobId);\r
\r
- \r
ScoreManager mas = aacon.getResults();\r
\r
log.trace(jobId + " getConservation : " + mas);\r
return mas;\r
}\r
+ \r
\r
/*\r
* UNUSED\r