From: <jld...@pc...> - 2006-01-17 19:48:31
|
Ricardo, The error you received simply means that your mapping file is incomplete. So, in your mapping file, under the mRNA feature, you will need to add a qualifier with the name 'transcript_id' that tells the plugin what to do with transcript IDs. There should be examples of qualifiers for you to follow already in the mapping file. I hope this helps. Jennifer Quoting Ricardo Balbi <rb...@gm...>: > Hi Angel, > > It is all right now with versioning tables. > Now I passed to a next error. > It follows below the error that happened. > > I am using the revision 4422 > > Do you have any idea ? > > ERROR: > In feature map XML file '/GUS/gus_home/config/genbank2gus.xml' <feature > name="mRNA"> does not have a <qualifier> for 'transcript_id', which is found > in the input at /GUS/gus_home/lib/perl/GUS/Supported/BioperlFeatMapper.pm > line 106, <GEN30> line 569. > > STACK TRACE: > at /GUS/gus_home/lib/perl/GUS/Supported/BioperlFeatMapper.pm line 106 > > GUS::Supported::BioperlFeatMapper::_checkTagExists('GUS::Supported::BioperlFeatMapper=HASH(0xa7d23cc)', > 'transcript_id') called at > /GUS/gus_home/lib/perl/GUS/Supported/BioperlFeatMapper.pm line 30 > > GUS::Supported::BioperlFeatMapper::sortTags('GUS::Supported::BioperlFeatMapper=HASH(0xa7d23cc)', > 'db_xref', 'locus_tag', 'product', 'transcript_id') called at > /GUS/gus_home/lib/perl/GUS/Supported/Plugin/InsertSequenceFeatures.pm line > 800 > > GUS::Supported::Plugin::InsertSequenceFeatures::makeImmediateFeature('GUS::Supported::Plugin::InsertSequenceFeatures=HASH(0x9756fdc)', > 'Bio::SeqFeature::Generic=HASH(0xab16364)', 37, 177) called at > /GUS/gus_home/lib/perl/GUS/Supported/Plugin/InsertSequenceFeatures.pm line > 750 > > GUS::Supported::Plugin::InsertSequenceFeatures::makeFeature('GUS::Supported::Plugin::InsertSequenceFeatures=HASH(0x9756fdc)', > 'Bio::SeqFeature::Generic=HASH(0xab16364)', 37, 177) called at > /GUS/gus_home/lib/perl/GUS/Supported/Plugin/InsertSequenceFeatures.pm line > 758 > > GUS::Supported::Plugin::InsertSequenceFeatures::makeFeature('GUS::Supported::Plugin::InsertSequenceFeatures=HASH(0x9756fdc)', > 'Bio::SeqFeature::Generic=HASH(0xabaf3ac)', 37, 177) called at > /GUS/gus_home/lib/perl/GUS/Supported/Plugin/InsertSequenceFeatures.pm line > 727 > > GUS::Supported::Plugin::InsertSequenceFeatures::processFeatureTrees('GUS::Supported::Plugin::InsertSequenceFeatures=HASH(0x9756fdc)', > 'Bio::Seq::RichSeq=HASH(0xa95e35c)', 37, 177) called at > /GUS/gus_home/lib/perl/GUS/Supported/Plugin/InsertSequenceFeatures.pm line > 330 > > GUS::Supported::Plugin::InsertSequenceFeatures::run('GUS::Supported::Plugin::InsertSequenceFeatures=HASH(0x9756fdc)', > 'HASH(0xa49ac04)') called at > /GUS/gus_home/lib/perl/GUS/PluginMgr/GusApplication.pm line 549 > eval {...} called at > /GUS/gus_home/lib/perl/GUS/PluginMgr/GusApplication.pm line 541 > > GUS::PluginMgr::GusApplication::doMajorMode_RunOrReport('GUS::PluginMgr::GusApplication=HASH(0x9538c20)', > 'GUS::Supported::Plugin::InsertSequenceFeatures', 1) called at > /GUS/gus_home/lib/perl/GUS/PluginMgr/GusApplication.pm line 459 > > GUS::PluginMgr::GusApplication::doMajorMode_Run('GUS::PluginMgr::GusApplication=HASH(0x9538c20)', > 'GUS::Supported::Plugin::InsertSequenceFeatures') called at > /GUS/gus_home/lib/perl/GUS/PluginMgr/GusApplication.pm line 357 > > GUS::PluginMgr::GusApplication::doMajorMode('GUS::PluginMgr::GusApplication=HASH(0x9538c20)', > 'GUS::Supported::Plugin::InsertSequenceFeatures') called at > /GUS/gus_home/lib/perl/GUS/PluginMgr/GusApplication.pm line 266 > > GUS::PluginMgr::GusApplication::parseAndRun('GUS::PluginMgr::GusApplication=HASH(0x9538c20)', > 'ARRAY(0x954c728)') called at /GUS/gus_home/bin/ga line 11 > > > Ricardo > > 2006/1/17, Angel Pizarro <an...@ma...>: >> >> Hi Ricardo, >> >> The error did not stem from my patch, but rather from another class that >> failed to add the none-default columns to the version view objects. I >> have edited a few files, so you will need to revert to current SVN >> version of the repository for this patch to work: >> <copy attached file to project home> >> cd $PROJECT_HOME >> svn revert GUS/DBAdmin >> patch -p0 <DBAdmin.diff >> >> Then you should be able to rebuild GUS/DBAdmin and run dbaDump schema as >> before. >> >> An example of the output view and rule follows >> -angel >> >> >> CREATE VIEW DoTSVer.AAFeatureVer AS >> SELECT AA_FEATURE_ID, AA_SEQUENCE_ID, FEATURE_NAME_ID, PARENT_ID, >> NA_FEATURE_ID, SUBCLASS_VIEW, SEQUENCE_ONTOLOGY_ID, DESCRIPTION, >> PFAM_ENTRY_ID, MOTIF_AA_SEQUENCE_ID, REPEAT_TYPE_ID, >> EXTERNAL_DATABASE_RELEASE_ID, SOURCE_ID, PREDICTION_ALGORITHM_ID, >> IS_PREDICTED, REVIEW_STATUS_ID , MODIFICATION_DATE, USER_READ, >> USER_WRITE, GROUP_READ, GROUP_WRITE, OTHER_READ, OTHER_WRITE, >> ROW_USER_ID, ROW_GROUP_ID, ROW_PROJECT_ID, ROW_ALG_INVOCATION_ID, >> VERSION_ALG_INVOCATION_ID, VERSION_DATE, VERSION_TRANSACTION_ID FROM >> DoTSVer.AAFeatureImpVer; >> >> CREATE RULE AAFeatureVer_32675 AS ON INSERT TO DoTSVer.AAFeatureVer DO >> INSTEAD INSERT INTO DoTSVer.AAFeatureImpVer ( AA_FEATURE_ID, >> AA_SEQUENCE_ID, FEATURE_NAME_ID, PARENT_ID, NA_FEATURE_ID, >> SUBCLASS_VIEW, SEQUENCE_ONTOLOGY_ID, DESCRIPTION, PFAM_ENTRY_ID, >> MOTIF_AA_SEQUENCE_ID, REPEAT_TYPE_ID, EXTERNAL_DATABASE_RELEASE_ID, >> SOURCE_ID, PREDICTION_ALGORITHM_ID, IS_PREDICTED, REVIEW_STATUS_ID, >> MODIFICATION_DATE, USER_READ, USER_WRITE, GROUP_READ, GROUP_WRITE, >> OTHER_READ, OTHER_WRITE, ROW_USER_ID, ROW_GROUP_ID, ROW_PROJECT_ID, >> ROW_ALG_INVOCATION_ID, VERSION_ALG_INVOCATION_ID, VERSION_DATE, >> VERSION_TRANSACTION_ID ) VALUES ( new.AA_FEATURE_ID, new.AA_SEQUENCE_ID, >> new.FEATURE_NAME_ID, new.PARENT_ID, new.NA_FEATURE_ID, >> new.SUBCLASS_VIEW, new.SEQUENCE_ONTOLOGY_ID, new.DESCRIPTION, >> new.PFAM_ENTRY_ID, new.MOTIF_AA_SEQUENCE_ID, new.REPEAT_TYPE_ID, >> new.EXTERNAL_DATABASE_RELEASE_ID, new.SOURCE_ID, >> new.PREDICTION_ALGORITHM_ID, new.IS_PREDICTED, new.REVIEW_STATUS_ID, >> new.MODIFICATION_DATE, new.USER_READ, new.USER_WRITE, new.GROUP_READ, >> new.GROUP_WRITE, new.OTHER_READ, new.OTHER_WRITE, new.ROW_USER_ID, >> new.ROW_GROUP_ID, new.ROW_PROJECT_ID, new.ROW_ALG_INVOCATION_ID, >> new.VERSION_ALG_INVOCATION_ID, new.VERSION_DATE, >> new.VERSION_TRANSACTION_ID ); >> >> Angel Pizarro wrote: >> >> > Yes, I have an idea of what is going on ... sloppy copy-paste coding >> > on my part :( >> > >> > I'll add the other columns to the method and get you another patch. >> > >> > -angel >> > >> >> >> >> Index: GUS/DBAdmin/src/java/org/gusdb/dbadmin/model/View.java >> =================================================================== >> --- GUS/DBAdmin/src/java/org/gusdb/dbadmin/model/View.java (revision >> 4068) >> +++ GUS/DBAdmin/src/java/org/gusdb/dbadmin/model/View.java (working >> copy) >> @@ -48,6 +48,10 @@ >> return column; >> } >> >> + public void setColumns( ArrayList<ColumnPair> colpair) { >> + column = colpair; >> + } >> + >> public void addColumn( ColumnPair columnPair ) { >> if ( !this.column.contains( columnPair ) ) { >> this.column.add( columnPair ); >> Index: GUS/DBAdmin/src/java/org/gusdb/dbadmin/writer/PostgresWriter.java >> =================================================================== >> --- GUS/DBAdmin/src/java/org/gusdb/dbadmin/writer/PostgresWriter.java >> (revision 4068) >> +++ GUS/DBAdmin/src/java/org/gusdb/dbadmin/writer/PostgresWriter.java >> (working copy) >> @@ -12,6 +12,7 @@ >> import org.gusdb.dbadmin.model.GusSchema; >> import org.gusdb.dbadmin.model.GusTable; >> import org.gusdb.dbadmin.model.GusView; >> +import org.gusdb.dbadmin.model.VersionView; >> import org.gusdb.dbadmin.model.Schema; >> import org.gusdb.dbadmin.model.Sequence; >> import org.gusdb.dbadmin.model.Table; >> @@ -105,6 +106,8 @@ >> super.writeView( view ); >> if ( view instanceof GusView ) { >> writeViewRules( (GusView) view ); >> + }else if ( view instanceof VersionView ) { >> + writeVersionViewRules( (VersionView) view ); >> } >> } >> >> @@ -112,8 +115,6 @@ >> * Since PostgreSQL doesn't support updatable views, this is a hack >> that >> * uses rules to mimick the updatable view functionality. >> * >> - * TODO: Note that this means version views are now not updatable >> since they >> - * don't have a PK. >> * >> * @param view DOCUMENT ME! >> * @throws IOException DOCUMENT ME! >> @@ -174,7 +175,47 @@ >> oStream.flush( ); >> } >> >> + >> /** >> + * Since PostgreSQL doesn't support updatable views, this is a hack >> that >> + * uses rules to mimick the updatable view functionality. >> + * >> + * Version views are now not updatable since they >> + * don't have a PK, so we limit rules to insertion >> + * >> + * @param view DOCUMENT ME! >> + * @throws IOException DOCUMENT ME! >> + */ >> + private void writeVersionViewRules( VersionView view ) throws >> IOException { >> + oStream.write( "CREATE RULE " + view.getName( ) + "_" + >> random.nextInt( 100000 ) + " AS ON INSERT TO " >> + + view.getSchema( ).getName( ) + "." + view.getName( ) + >> " DO INSTEAD INSERT INTO " >> + + view.getTable( ).getSchema( ).getName( ) + "." + >> view.getTable( ).getName( ) + " ( " ); >> + >> + boolean first = true; >> + for ( ColumnPair columnPair : view.getColumns() ) { >> + if ( !first ) { >> + oStream.write( ", " ); >> + } >> + oStream.write( columnPair.getTableName( ) ); >> + first = false; >> + } >> + >> + oStream.write( " ) VALUES ( " ); >> + >> + first = true; >> + for ( ColumnPair columnPair : view.getColumns() ) { >> + if ( !first ) { >> + oStream.write( ", " ); >> + } >> + oStream.write( "new." + columnPair.getViewName( ) ); >> + first = false; >> + } >> + >> + oStream.write( " );\n\n" ); >> + >> + } >> + >> + /** >> * DOCUMENT ME! >> * >> * @param type DOCUMENT ME! >> Index: >> GUS/DBAdmin/src/java/org/gusdb/dbadmin/util/GusClassHierarchyConverter.java >> =================================================================== >> --- >> GUS/DBAdmin/src/java/org/gusdb/dbadmin/util/GusClassHierarchyConverter.java >> (revision 4068) >> +++ >> GUS/DBAdmin/src/java/org/gusdb/dbadmin/util/GusClassHierarchyConverter.java >> (working copy) >> @@ -363,6 +363,9 @@ >> superClassView.setVersioned( true ); >> verSql = sql.concat( " " ); >> >> + // We need to add the superclass columns to the version view. >> + superClassView.getVersionView( >> ).setColumns((ArrayList<ColumnPair>) superClassView.getColumns().clone()); >> + >> for ( Column column : verHousekeepingColumns ) { >> verSql = verSql.concat( ", " + column.getName( ) ); >> superClassView.getVersionView( ).addColumn( new >> ColumnPair( column.getName( ), column.getName( ) ) ); >> @@ -448,7 +451,8 @@ >> if ( impTable.isVersioned( ) ) { >> subClass.setVersioned( true ); >> verSql = sql.concat( " " ); >> - >> + // We need to add the subclass_view's columns >> + subClass.getVersionView( ).setColumns((ArrayList<ColumnPair>) >> subClass.getColumns().clone()); >> for ( Column column : verHousekeepingColumns ) { >> verSql = verSql.concat( ", " + column.getName( ) ); >> subClass.getVersionView( ).addColumn( new ColumnPair( >> column.getName( ), column.getName( ) ) ); >> >> >> > |