From: Mark G. <mg...@us...> - 2005-04-28 18:44:26
|
Update of /cvsroot/gmod/apollo/src/java/apollo/dataadapter/gamexml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3507/src/java/apollo/dataadapter/gamexml Modified Files: GAMEAdapter.java GAMESave.java Log Message: so peptide ids(accs) & names(formerly displayId) were being erroneoulsly lumped on name changes. now settting of transcript name ONLY changes the peptide name, peptide acc/id is left untouched. split out a new PEPTIDE_ID subpart. next i need to add changing peptide id on id changes. renamed SequenceI. displayId to name - if this is contentious its trivial to switch it back - but i found displayId confusing - its really a name i think (and once peptides become features thats what it will be). Index: GAMEAdapter.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/dataadapter/gamexml/GAMEAdapter.java,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** GAMEAdapter.java 13 Apr 2005 23:09:03 -0000 1.132 --- GAMEAdapter.java 28 Apr 2005 18:43:41 -0000 1.133 *************** *** 192,196 **** if (seq != null) { this.curated_seq = seq; ! setRegion (seq.getDisplayId()); } } --- 192,196 ---- if (seq != null) { this.curated_seq = seq; ! setRegion (seq.getName()); } } *************** *** 353,358 **** SequenceI genomic_seq = curation.getRefSequence(); return (genomic_seq != null && ! genomic_seq.getDisplayId() != null && ! !curation.getName().equals(genomic_seq.getDisplayId())); } --- 353,358 ---- SequenceI genomic_seq = curation.getRefSequence(); return (genomic_seq != null && ! genomic_seq.getName() != null && ! !curation.getName().equals(genomic_seq.getName())); } *************** *** 1641,1646 **** SequenceI seq = getSpanSequence (element, curation); result.setHitSequence(seq); ! if (seq.getDisplayId() == null || ! seq.getDisplayId().equals ("")) { try { throw (new Exception ("Missing id for seq " + --- 1641,1646 ---- SequenceI seq = getSpanSequence (element, curation); result.setHitSequence(seq); ! if (seq.getName() == null || ! seq.getName().equals ("")) { try { throw (new Exception ("Missing id for seq " + *************** *** 1652,1656 **** } if ( result.getName().equals ("")) ! result.setName (seq.getDisplayId()); } else { --- 1652,1656 ---- } if ( result.getName().equals ("")) ! result.setName (seq.getName()); } else { *************** *** 1881,1885 **** getSpanSequence (element, curation), 0); ! hit.setName (hit.getRefSequence().getDisplayId()); query.addProperty ("description", hit.getRefSequence().getDescription()); --- 1881,1885 ---- getSpanSequence (element, curation), 0); ! hit.setName (hit.getRefSequence().getName()); query.addProperty ("description", hit.getRefSequence().getDescription()); *************** *** 1944,1948 **** seq.setResidueType (SequenceI.DNA); curation.addSequence(seq); ! curation.setName (seq.getDisplayId()); this.setRegion (seq); found = true; --- 1944,1948 ---- seq.setResidueType (SequenceI.DNA); curation.addSequence(seq); ! curation.setName (seq.getName()); this.setRegion (seq); found = true; *************** *** 1983,1987 **** if (element.getType().equals ("name")) { FastaHeader fasta = new FastaHeader(element.getCharData()); ! seq.setDisplayId (fasta.getSeqId()); } else if (element.getType().equals ("description")) { setSeqDescription(seq, element.getCharData(), seq_element.getID()); --- 1983,1987 ---- if (element.getType().equals ("name")) { FastaHeader fasta = new FastaHeader(element.getCharData()); ! seq.setName (fasta.getSeqId()); } else if (element.getType().equals ("description")) { setSeqDescription(seq, element.getCharData(), seq_element.getID()); *************** *** 2178,2182 **** // Am I missing something? --NH if (seq_id == null) ! seq_id = curated_seq.getDisplayId(); if (start <= 0 || end <= 0) { --- 2178,2182 ---- // Am I missing something? --NH if (seq_id == null) ! seq_id = curated_seq.getName(); if (start <= 0 || end <= 0) { *************** *** 2197,2201 **** the main Apollo window is wrong. I don't think this will break anything else. Do we want to remove the version (.3) from the seq_id? */ ! curated_seq.setDisplayId(seq_id); } // end of getGenomePosition --- 2197,2201 ---- the main Apollo window is wrong. I don't think this will break anything else. Do we want to remove the version (.3) from the seq_id? */ ! curated_seq.setName(seq_id); } // end of getGenomePosition *************** *** 2265,2269 **** if (element.getType().equals ("name")) { FastaHeader fasta = new FastaHeader(element.getCharData()); ! seq.setDisplayId (fasta.getSeqId()); } else if (element.getType().equals ("description")) { --- 2265,2269 ---- if (element.getType().equals ("name")) { FastaHeader fasta = new FastaHeader(element.getCharData()); ! seq.setName (fasta.getSeqId()); } else if (element.getType().equals ("description")) { Index: GAMESave.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/dataadapter/gamexml/GAMESave.java,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** GAMESave.java 13 Apr 2005 23:11:39 -0000 1.64 --- GAMESave.java 28 Apr 2005 18:43:42 -0000 1.65 *************** *** 543,547 **** String id = seq.getAccessionNo(); if (id == null || id.equals("")) ! id = seq.getDisplayId(); if ( ! id.equals (name) ) { if ( ! loadedSeqs.contains(seq.getAccessionNo()) ) { --- 543,547 ---- String id = seq.getAccessionNo(); if (id == null || id.equals("")) ! id = seq.getName(); if ( ! id.equals (name) ) { if ( ! loadedSeqs.contains(seq.getAccessionNo()) ) { *************** *** 598,602 **** String id = seq.getAccessionNo(); if (id == null || id.equals("")) ! id = seq.getDisplayId(); buf.append (writeID(id, "seq")); --- 598,602 ---- String id = seq.getAccessionNo(); if (id == null || id.equals("")) ! id = seq.getName(); buf.append (writeID(id, "seq")); *************** *** 950,954 **** (sf.getRefSequence().getAccessionNo() != null ? sf.getRefSequence().getAccessionNo() : ! sf.getRefSequence().getDisplayId()) : null); if (seq_id != null) --- 950,954 ---- (sf.getRefSequence().getAccessionNo() != null ? sf.getRefSequence().getAccessionNo() : ! sf.getRefSequence().getName()) : null); if (seq_id != null) *************** *** 1139,1147 **** String name = null; if (sf instanceof FeaturePairI) ! name = ((FeaturePairI) sf).getHitSequence().getDisplayId(); else if (sf instanceof FeatureSetI) ! name = ((FeatureSetI) sf).getHitSequence().getDisplayId(); else ! name = sf.getRefSequence().getDisplayId(); if (name == null) { System.out.println ("Something seriously wrong with feature " + --- 1139,1147 ---- String name = null; if (sf instanceof FeaturePairI) ! name = ((FeaturePairI) sf).getHitSequence().getName(); else if (sf instanceof FeatureSetI) ! name = ((FeatureSetI) sf).getHitSequence().getName(); else ! name = sf.getRefSequence().getName(); if (name == null) { System.out.println ("Something seriously wrong with feature " + |