From: Cyril P. <cpo...@us...> - 2005-12-07 15:49:28
|
Update of /cvsroot/gmod/apollo/src/java/apollo/dataadapter/gamexml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25446/java/apollo/dataadapter/gamexml Modified Files: TransactionXMLAdapter.java Log Message: Corrected the Name modification bug (need a new version of the triggers for this to work), the merging of tmp and existing transcripts and a gameXML roundtrip problem. ChadoTransactionTransformer : - added the transactions for keeping peptides naming logic in apollo : now peptides will have theire name(genename-peptide#) + theire uniquename (RICE#) . This was needed for bug 1374177 - Correcting the exon naming which was using geneId:start-stop instead of geneName:start-stop TransactionXMLAdapter.java: -When deleting an alternate transcript, adding the transcript's parent to the tnxml file. This is needed to commit alt transcripts transactions properly when roundtrippping with gameXML AnnotationEditor : Merging temp transcript with an existing one (bug# 1374224) . Now if the user merge a temp gene with an existing one, all the exons of the temp are moved to the existing, and the resulting transcript retains the name of the existing one. In this case, there is no more dialog asking the merged transcript's name. Index: TransactionXMLAdapter.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/dataadapter/gamexml/TransactionXMLAdapter.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** TransactionXMLAdapter.java 29 Nov 2005 10:26:52 -0000 1.40 --- TransactionXMLAdapter.java 7 Dec 2005 15:49:20 -0000 1.41 *************** *** 253,256 **** --- 253,267 ---- buffer.append("\" id=\""); buffer.append(feature.getId()); + + //Alternate transcripts need theire parent. + //If the feature is a transcript, the it's parent (ie gene) childrens are the alternates transcripts + if (feature instanceof Transcript ){ + //No Exception if the parent is null. On transcript deletion, this can happend after several game save + //The parent is the curationSet's gene. So the transcript to delete has already been removed, so >=1 + if (parent != null && parent.getNumberOfChildren()>=1){ + buffer.append("\" parentName=\""); + buffer.append(parent.getName()); + } + } } else { // parent should not be null *************** *** 969,972 **** --- 980,990 ---- if (parentName != null && parentName.length() > 0) { SeqFeatureI parentFeature = getFeatureByName(curation, parentName); + //Handle error when deleting a transcript + //See saveDeleteTransaction for the reason of this test (alternate transcripts) + if (parentFeature == null && deletedFeature instanceof Transcript) + throw new IllegalArgumentException("TransactionXMLAdapter.loadDeleteTransaction: " + + " in transaction file " + fileName + ",\n " + + "The gene of transcript" + deletedFeature.getName() + "can not be found, potential bug in game transaction save."); + if (parentFeature == null) throw new IllegalArgumentException("TransactionXMLAdapter.loadDeleteTransaction: " + |