From: elee <gk...@us...> - 2009-07-24 19:57:00
|
Update of /cvsroot/gmod/apollo/src/java/apollo/analysis In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28330 Modified Files: AnalysisGUI.java BlastXMLParser.java Log Message: + Fixed some offset issues when dealing with analysis on minus strand Index: AnalysisGUI.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/analysis/AnalysisGUI.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AnalysisGUI.java 17 Jul 2009 18:28:46 -0000 1.3 --- AnalysisGUI.java 24 Jul 2009 19:56:48 -0000 1.4 *************** *** 603,614 **** int seqStart; int seqEnd; ! if (strand == 1) { ! seqStart = start - cs.getLow(); ! seqEnd = end - cs.getLow() + 1; ! } ! else { ! seqStart = start - cs.getLow() - 1; ! seqEnd = end - cs.getLow(); ! } SequenceI region = new Sequence(cs.getRefSequence().getName(), cs.getRefSequence().getResidues().substring(seqStart, seqEnd)); //String type = blast.runAnalysis(cs, cs.getRefSequence().getSubSequence(start, end), strand, start - 1); --- 603,608 ---- int seqStart; int seqEnd; ! seqStart = start - cs.getLow(); ! seqEnd = end - cs.getLow() + 1; SequenceI region = new Sequence(cs.getRefSequence().getName(), cs.getRefSequence().getResidues().substring(seqStart, seqEnd)); //String type = blast.runAnalysis(cs, cs.getRefSequence().getSubSequence(start, end), strand, start - 1); Index: BlastXMLParser.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/analysis/BlastXMLParser.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BlastXMLParser.java 27 Feb 2009 17:03:09 -0000 1.2 --- BlastXMLParser.java 24 Jul 2009 19:56:48 -0000 1.3 *************** *** 150,155 **** } else { ! queryBegin = offset + genomicLength - Integer.parseInt(getTextContent(elt.getElementsByTagName("Hsp_query-to").item(0))); ! queryEnd = offset + genomicLength - Integer.parseInt(getTextContent(elt.getElementsByTagName("Hsp_query-from").item(0))); queryStrand *= -1; } --- 150,155 ---- } else { ! queryBegin = offset + genomicLength - Integer.parseInt(getTextContent(elt.getElementsByTagName("Hsp_query-to").item(0))) + 1; ! queryEnd = offset + genomicLength - Integer.parseInt(getTextContent(elt.getElementsByTagName("Hsp_query-from").item(0))) + 1; queryStrand *= -1; } |