Greetings,
The plan sounds good, all around.
Regarding the "type = ?" clause in our SQL, recall that the "?"s in the query are placeholders for actual parameter values. If you follow where that last setString call (which thus sets the right side of the "type = ?" clause) gets its value, you'll see where that comes from (and what it leads to in the GDB). Hint: "GeneId" is one of the values that this clause takes. :)
The doubling up of Sa is interesting. Either there is a bug in your Species column string building code, or there are multiple taxon IDs that actually have the same species name. I think some judicious debug logging will resolve that.
Once these GDBs have been duly vetted, I think we can move on to the relationship tables.
John David N. Dionisio, PhD
Associate Professor, Computer Science
Loyola Marymount University
On Aug 22, 2011, at 10:03 AM, Richard Brous wrote:
> OK, I have exported single species Sa and Pa GDBs from the current working build and from the pre-multispecies build (all from my existing Pa and Sa postgres databases.
>
> Then exported a multipspecies Sa and Pa gdb from the current working build from my existing Sa/Pa multispecies postrgres database.
>
> I will post all GDB exports to the db wiki shortly...
>
> -----------------------------------------------------------------------------------------------------------------------------------------------
> getSystemTableManager()
>
>
> So in effort to check the correctness of the multispecies changes to the System table I was going to run the SQL commands from within PGAdmin then compare the results to those within the multispecies GDB.
>
> Is my method correct?
>
> -----------------------------------------------------------------------------------------------------------------------------------------------
> would use sql command (with errors =/):
>
> SELECT distinct id FROM dbreferencetype
> INNER JOIN (SELECT entrytype.hjid FROM entrytype
> INNER JOIN organismtype ON (entrytype.organism = organismtype.hjid)
> INNER JOIN dbreferencetype ON(dbreferencetype.organismtype_dbreference_hjid = organismtype.hjid)
> WHERE dbreferencetype.type = 'NCBI Taxonomy' and (id = 287 or id = 282458))
> as species_entry on dbreferencetype.entrytype_dbreference_hjid = species_entry.hjid where type = ?;
>
>
> But I get an error for the = signs on line 5 and I'm not sure what the ? is at the end of the last line... I thought it was taxonID but then thought maybe it was something else.
>
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
> getInfoTableManager()
>
> To check the Info Table I opened the multispecies GDB in Access and did a visual check.
>
> All colums looked ok (when compared to single species exports) except for the Species column which had one too many entries. Will have to determine why Sa is listed twice but a quick review of the loop didn't reveal any issues.
> Info
> Species
> Pseudomonas aeruginosa|Staphylococcus aureus (strain MRSA252)|Staphylococcus aureus (strain MRSA252)
>
>
>
> Richard
>
>
> On Sat, Aug 20, 2011 at 9:37 AM, John David N. Dionisio <do...@lm...> wrote:
> Hi Rich,
>
> The JDBC mention was meant mainly to help with your use of PreparedStatement. If you've gotten that working, it's fine to move along. I think it would be good now to see how the system and info table code does with multiple species (if you haven't already done so). I prefer this way before going into the relationship tables, just so we know that the work done so far is OK for the full case, and because the relationship code will be tougher to navigate.
>
> The main thing about the old-school loop when dealing solely with the count was just that I prefer not to declare variables that I don't use (in this case, the iterated object). Plus, with the use of an index, you also obviate the need for that boolean first variable. Admittedly not an issue of correctness here (as you said, your original code ran fine), but more of a refinement/"best fit" choice.
>
>
> John David N. Dionisio, PhD
> Associate Professor, Computer Science
> Loyola Marymount University
>
>
> On Aug 20, 2011, at 9:17 AM, Richard Brous <rbr...@gm...> wrote:
>
>> also, I have compiled and run a new export.
>>
>> the GDB looks good for single species so which method should I go to next OR do you want me to read JDBC before proceeding?
>>
>> richard
>>
>> On Sat, Aug 20, 2011 at 9:07 AM, Richard Brous <rbr...@gm...> wrote:
>> Interesting about the looping through species profiles vs old-school int loop:
>>
>> My choice of looping through the species still provided the correct count, but what I think you are saying is that it is more appropriate to use int looping because i'm not actually using the species profile objects for anything?
>>
>>
>> I'll check out the JDBC portion shortly... I'm still working on the details surrounding question #1 on the syllabus. I have been reading the text in time slots avail when awaiting your feedback but honestly attempting to prioritize GM builder coding. I have finished digesting E/R and am working through UML...
>>
>> Richard
>> On Sat, Aug 20, 2011 at 12:02 AM, John David N. Dionisio <do...@lm...> wrote:
>> Hi Rich,
>>
>> Having now taken a closer look at the code, I definitely recommended that you do what was suggested in the previous reply, which is to form and issue the SQL query directly before coding it up. More details have been committed in comments, so go ahead and take a look.
>>
>> You are also now getting further exposure to the JDBC (Java Database Connectivity) API. There is a section in the textbook that provides a brief introduction to JDBC, and there are extensive tutorials and references available on the web. If you haven't already done so, it might be worthwhile to glance at these. Looking at the PreparedStatement class in particular may help solidify your understanding of the code in question.
>>
>> Happy querying :)
>>
>> John David N. Dionisio, PhD
>> Associate Professor, Computer Science
>> Loyola Marymount University
>>
>>
>>
>> On Aug 19, 2011, at 8:47 PM, Richard Brous wrote:
>>
>> > Fatal error during export which was related to "as" which I suspect I left out a right parens when building the ps string.
>> >
>> > Rerunning export now but must head to bed.
>> >
>> > Will commit the changes I have and look for email comments in the morn.
>> >
>> > Richard
>> >
>> > On Fri, Aug 19, 2011 at 8:04 PM, Richard Brous <rbr...@gm...> wrote:
>> > OK, made changes to getSystemTableManager() based on your comments below.
>> >
>> > The ps string is programmatically created by adding "id = ?" for each species profile within selectedSpeciesProfiles
>> >
>> > also added for loops below to cycle through the ps.set...
>> >
>> > and a for loop to grab each species customization.
>> >
>> > Running an export now which will be done in an hour or so to review prior to submitting changes to sourceforge.
>> >
>> > Richard
>> >
>> > On Thu, Aug 18, 2011 at 11:19 PM, John David N. Dionisio <do...@lm...> wrote:
>> > Greetings,
>> >
>> > OK, the transitional prep code (i.e., using the get(0) trick) looks good. Looks like we can safely hunker down now, starting with getSystemTableManager.
>> >
>> > I agree that the clause:
>> >
>> > WHERE dbreferencetype.type = 'NCBI Taxonomy' and id = ?
>> >
>> > ...where "?" becomes the single taxon ID to be exported should now become:
>> >
>> > WHERE dbreferencetype.type = 'NCBI Taxonomy' and (id = ? or id = ? or id = ? ......)
>> >
>> > ...where the "?"s each get a taxon ID. This requires that this single large string must be built programmatically before being passed into prepareStatement. Plus, the ps.set.... calls now change from a single statement into a loop.
>> >
>> > On a side note, you can change ps.setString to ps.setLong, thus avoiding the concatenation with the empty string.
>> >
>> > I traced where that speciesCustomizeTextField value leads and found that it ultimately goes into the getSpeciesName property of the species profile, which is in turn what is used in the Species column of the ID tables. It appears that the purpose of speciesCustomizeTextField was to allow the user to modify the species name; seeing as we hardly (if ever) made use of this customization, I propose that we just auto-set this property in the species profiles to the actual species name stored in the UniProt records.
>> >
>> > John David N. Dionisio, PhD
>> > Associate Professor, Computer Science
>> > Loyola Marymount University
>> >
>> >
>> >
>> > On Aug 18, 2011, at 8:17 PM, Richard Brous wrote:
>> >
>> > > Posted new working copy to the db wiki
>> > > Committed changes to SourceForge
>> > >
>> > > On Thu, Aug 18, 2011 at 7:41 PM, Richard Brous <rbr...@gm...> wrote:
>> > > getRelationsTableManager()
>> > > Interim changes complete using selectedSpeciesProfiles.get(0)
>> > > we skipped this one as its pretty complex. Need to discuss how I need to tackle this.
>> > >
>> > > getSystemTableManager()
>> > > Interim changes complete using selectedSpeciesProfiles.get(0)
>> > > After reviewing the code I think the way to update this method is to loop through each selected species profile prior to if conditional at line 525?
>> > > Seem sound?
>> > >
>> > > getRelationshipTableManager()
>> > > Interim changes complete using selectedSpeciesProfiles.get(0)
>> > > Not quite sure how to make method aware of multispecies. Use looping or a single command vs actually changing the sql table commands?
>> > >
>> > > getSecondPassTableManager()
>> > > Interim change complete using selectedSpeciesProfiles.get(0)
>> > > I think we need to loop through each species profile here, to add the customizations for each species
>> > >
>> > > -------------------------------------------------------------------------------------------------------------------------------------
>> > >
>> > > Attempted another Ms export and this time figured out what was going on.
>> > >
>> > > As Dr. D noted, no IDs existed in the previous GDB attempt and this is related to the speciesCustomizeTextField which we had commented out a few weeks ago. I changed it to speciesCustomizeTextField.setText(selectedSpecies.get(0).getName()); to ensure the field was populated with something and that did the trick. Now exports are nearly identical for Ms for pre-multispecies build and the current working build.
>> > >
>> > > I'm going to place my current working multispecies build (which only exports a single species still) up on the db class wiki for your review.
>> > >
>> > > Look for SourceForge changes soonish...
>> > >
>> > > Richard
>> > >
>> > >
>> > >
>> > > On Thu, Aug 18, 2011 at 11:40 AM, Kam Dahlquist <kda...@lm...> wrote:
>> > > Hi,
>> > >
>> > > That's good news. Let me know when there's a build that I can run.
>> > >
>> > > Also, would you guys mind changing the subject line to more closely
>> > > reflect the task being described in the message?
>> > >
>> > > Thanks,
>> > > Kam
>> > >
>> > > At 10:29 AM 8/18/2011, you wrote:
>> > > >Greetings,
>> > > >
>> > > >FYI I've committed some changes to the GO import handling. The most
>> > > >recent "breakage" in GO importing was caused by GO's addition of an
>> > > ><ontology> element to the <header>. Interestingly, the text in this
>> > > >element was simply "go" --- an interesting change, implying that
>> > > >other ontologies may be accommodated.
>> > > >
>> > > >In any case, I've updated the GO database libraries and source code,
>> > > >and I did a successful test import on a daily OBO file downloaded
>> > > >yesterday. So, it looks like we can use the latest OBO files again,
>> > > >at least until another element gets added to the schema.
>> > > >
>> > > >John David N. Dionisio, PhD
>> > > >Associate Professor, Computer Science
>> > > >Loyola Marymount University
>> > >
>> > >
>> > > ------------------------------------------------------------------------------
>> > > Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
>> > > user administration capabilities and model configuration. Take
>> > > the hassle out of deploying and managing Subversion and the
>> > > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>> > > _______________________________________________
>> > > xmlpipedb-developer mailing list
>> > > xml...@li...
>> > > https://lists.sourceforge.net/lists/listinfo/xmlpipedb-developer
>> > >
>> > >
>> > > <ATT00001..txt><ATT00002..txt>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
>> > user administration capabilities and model configuration. Take
>> > the hassle out of deploying and managing Subversion and the
>> > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>> > _______________________________________________
>> > xmlpipedb-developer mailing list
>> > xml...@li...
>> > https://lists.sourceforge.net/lists/listinfo/xmlpipedb-developer
>> >
>> >
>> > <ATT00001..txt><ATT00002..txt>
>>
>>
>> ------------------------------------------------------------------------------
>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
>> user administration capabilities and model configuration. Take
>> the hassle out of deploying and managing Subversion and the
>> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>> _______________________________________________
>> xmlpipedb-developer mailing list
>> xml...@li...
>> https://lists.sourceforge.net/lists/listinfo/xmlpipedb-developer
>>
>>
>> ------------------------------------------------------------------------------
>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
>> user administration capabilities and model configuration. Take
>> the hassle out of deploying and managing Subversion and the
>> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>> _______________________________________________
>> xmlpipedb-developer mailing list
>> xml...@li...
>> https://lists.sourceforge.net/lists/listinfo/xmlpipedb-developer
>
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> _______________________________________________
> xmlpipedb-developer mailing list
> xml...@li...
> https://lists.sourceforge.net/lists/listinfo/xmlpipedb-developer
>
>
> <ATT00001..txt><ATT00002..txt>
|