Hi Adi,
adimaron wrote:
>
> Do you think that the problem is with
> expander.io.converters.EnrichmentSolConverter.unmarshal()?
>
> It is a method that was generated to support some DS changes in prev
> versions.
> Should I try to get rid of this converter?
>
> I do not know if this helps but the code of the method is
>
> public Object unmarshal(HierarchicalStreamReader reader,
> UnmarshallingContext arg1) {
> if (! reader.hasMoreChildren())
> return null;
>
> Class cType = arg1.getRequiredType();
> reader.moveDown();
> try
> {
> String nodeName = reader.getNodeName();
> boolean prevVer = false;
> float[][] rawPVals=null, relativeFreqs=null;
> double minRawPVal=2;
> if(nodeName.equals("rawPVals")){ //funcAnal prev version{
> prevVer = true;
> rawPVals = (float[][])arg1.convertAnother(arg1.currentObject(),
> float[][].class);
> }else if(nodeName.equals("relativeFreqs")){//PromAnalSol prevVersion
> prevVer = true;
> relativeFreqs = (float[][])arg1.convertAnother(arg1.currentObject(),
> float[][].class);
> }
================== %< ==============
> if(!prevVer){//default converter can do the work
> reader.moveUp();
> Converter defaultConverter =
> conLookup.lookupConverterForType(GeneralSolution.class);
> Object res = defaultConverter.unmarshal(reader, arg1);
> return res;//defaultConverter.unmarshal(reader, arg1);
================== %< ==============
This snippet that cannot really work. When a converter is invoked, it
expects the parser to be at the current tag, because it might have to read
(system) attributes.
Now, remember that you're reading from a stream model. The code moves in the
stream forward from the start tag to the tags children and then suddenly
expects to handle the original start tag. Actually it was pure incidence,
that it worked with XStream 1.1.2, but this is simply wrong! I am quite
sure, line 72 from the stack trace is here ...
> }
> Hashtable hitsHash=null, pwmLengthHash=null;
> String seqsFilePath=null ;
> reader.moveUp();
> reader.moveDown();
> String next = reader.getNodeName();
> if(cType.equals(FuncAnalSol.class)){
> minRawPVal = Double.parseDouble(reader.getValue());
> reader.moveUp();
> reader.moveDown();
> }
> else//PromoterAnalSol
> {
> hitsHash = (Hashtable)arg1.convertAnother(arg1.currentObject(),
> Hashtable.class);
> reader.moveUp();
> reader.moveDown();
> pwmLengthHash = (Hashtable)arg1.convertAnother(arg1.currentObject(),
> Hashtable.class);
> reader.moveUp();
> reader.moveDown();
> seqsFilePath = (String)arg1.convertAnother(arg1.currentObject(),
> String.class);
> reader.moveUp();
> reader.moveDown();
>
> }
> next = reader.getNodeName();
>
>
> String[] catNames = (String[])arg1.convertAnother(arg1.currentObject(),
> String[].class);
> reader.moveUp();
> reader.moveDown();
> if(reader.getNodeName().equals("coverage")){
> reader.moveUp();
> reader.moveDown();
> }
> float[][] freqs = (float[][])arg1.convertAnother(arg1.currentObject(),
> float[][].class);
> reader.moveUp();
> reader.moveDown();
> float[][] pVals = (float[][])arg1.convertAnother(arg1.currentObject(),
> float[][].class);
> reader.moveUp();
> reader.moveDown();
> String[][][][] enrichmntGenes =
> (String[][][][])arg1.convertAnother(arg1.currentObject(),
> String[][][][].class);
> reader.moveUp();
> reader.moveDown();
> reader.moveUp();
> reader.moveDown();
> double threshPVal = Double.parseDouble(reader.getValue());
> reader.moveUp();
> reader.moveDown();
> if(relativeFreqs == null)
> relativeFreqs = freqs;
> ArrayList<EnrichmentResult> enrichments =
> generateEnrichmentsList(catNames/*,coverage*/, relativeFreqs,
> pVals, rawPVals,enrichmntGenes, threshPVal );
>
> String baseSetsKey = reader.getValue();
> reader.moveUp();
> reader.moveDown();
> String studyID = reader.getValue();
> reader.moveUp();
> reader.moveDown();
> // double minPVal = Double.parseDouble(reader.getValue());
> reader.moveUp();
> reader.moveDown();
> ArrayList opInfo = (ArrayList)
> arg1.convertAnother(arg1.currentObject(),
> ArrayList.class);
> reader.moveUp();
> reader.moveDown();
> reader.moveUp();
> reader.moveDown();
> String solName = reader.getValue();
> reader.moveUp();
> reader.moveDown();
> IOStorage opInput = (IOStorage)arg1.convertAnother(arg1.currentObject(),
> IOMgr.class);
> reader.moveUp();
> reader.moveDown();
> String key = reader.getValue();
> reader.moveUp();
> EnrichmentSol res=null;
> if(cType.equals(FuncAnalSol.class))
> res = new FuncAnalSol(solName, opInfo, opInput, catNames,enrichments,
> baseSetsKey,studyID,baseSetsDetector);
> else if(cType.equals(PromoterAnalSol.class)){
> res = new PromoterAnalSol(solName, opInfo, opInput,
> catNames,enrichments, baseSetsKey,studyID,baseSetsDetector, hitsHash,
> pwmLengthHash);
> ((PromoterAnalSol)res).setSeqsFilePath(seqsFilePath);
>
> }
> if(res!=null)
> res.setKey(key);
> return res;
> }
> catch(Exception e){
> e.printStackTrace();
> return null;
> }
>
>
> }
>
> If this is not what you meant then which method are you referring to?
Yes, see inline comment.
Chrres,
Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email