Project

General

Profile

Statistics
| Revision:

# Date Author Comment
5566 10/16/2012 10:57 PM Aaron Marcuse-Kubitza

mappings/Veg+-VegCore.csv: Added height

5565 10/16/2012 10:57 PM Aaron Marcuse-Kubitza

mappings/Veg+-VegCore.csv: Added height

5564 10/16/2012 10:52 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Removed no longer used height mapping. Use height_m, height_ft instead.

5563 10/16/2012 10:39 PM Aaron Marcuse-Kubitza

README.TXT: Data import: import_all: Added NCBI backbone to note about import_all not immediately returning control to the shell

5562 10/16/2012 10:30 PM Aaron Marcuse-Kubitza

inputs/FIA/Organism/map.csv: Height: Remapped to height_ft, assuming units based on the range of values, the height of the tallest tree, and location inside the U.S.

5561 10/16/2012 10:23 PM Aaron Marcuse-Kubitza

inputs/FIA/Organism/test.xml.ref: Accepted new inserted row count

5560 10/16/2012 10:01 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped height_ft

5559 10/16/2012 09:58 PM Aaron Marcuse-Kubitza

schemas/functions.sql: Added _ft_to_m()

5558 10/16/2012 09:52 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added height_ft

5557 10/16/2012 09:38 PM Aaron Marcuse-Kubitza

inputs/SALVIAS/stems/map.csv: stem_height_m: Remapped to height_m using units from <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>

5556 10/16/2012 09:37 PM Aaron Marcuse-Kubitza

inputs/SALVIAS-CSV/Organism/map.csv: stem_height_m: Re-sourced units to stem_height_m rather than height_m definition in SALVIAS data dictionary

5555 10/16/2012 09:29 PM Aaron Marcuse-Kubitza

Regenerated vegbien.ERD exports

5554 10/16/2012 09:23 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: taxonconcept_update_ancestors() trigger: Fixed bug where matched_concept_id needed to be changed to NULL when equal to taxonconcept_id, to avoid including the node itself with its parent's ancestors (which would violate the taxonconcept_ancestor pkey)

5553 10/16/2012 09:19 PM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Ensuring into's out_pkey is different from in_pkey: Prepend "out." instead of out_table to avoid long column names for the output pkey

5552 10/16/2012 09:18 PM Aaron Marcuse-Kubitza

sql_gen.py: concat(): Allow multiple "column" suffixes with "." when matching the existing suffix

5551 10/16/2012 08:47 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: taxonconcept_update_ancestors() trigger: Corrected comment explaining why we don't need an ON DELETE trigger to say that this is because the foreign key for taxonconcept_ancestor.ancestor_id, not taxonconcept.parent_id, is ON DELETE CASCADE. The auto-deletion will also occur if taxonconcept.parent_id is ON DELETE CASCADE, because taxonconcept_ancestor.taxonconcept_id is ON DELETE CASCADE, but it is not actually necessary to have cascading deletes on taxonconcept.parent_id (and SET NULL may in fact sometimes be more appropriate).

5550 10/16/2012 08:33 PM Aaron Marcuse-Kubitza

schemas/tree_cross-links.sql: Removed header comments added by pgAdmin

5549 10/16/2012 08:30 PM Aaron Marcuse-Kubitza

schemas/tree_cross-links.sql: Updated for new taxonconcept_update_ancestors() trigger

5548 10/16/2012 08:21 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Rewrote taxonconcept() trigger to avoid completely reinserting the taxonconcept_ancestor entries of all descendants every time taxonconcept changes or using trigger recursion to find descendants. Instead, just delete the old parent's ancestors from and add the new parent's ancestors to each descendant, using taxonconcept_ancestor itself (with the new taxonconcept_ancestor_descendants index) to find all descendants. As an additional optimization, only update taxonconcept_ancestor if the parent_id or matched_concept_id has actually changed. This fixes a bug in NCBI where inserting taxonconcepts out of dependency order caused taxonconcept_ancestor entries to be repeatedly regenerated, slowing the import down to a crawl.

5547 10/16/2012 07:42 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Added taxonconcept_3_parent_id_avoid_self_ref() trigger to avoid recursive references in root taxonconcepts (taxonconcepts with no parent). This will simplify the new taxonconcept_update_ancestors() trigger.

5546 10/16/2012 06:32 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept_ancestor: Added taxonconcept_ancestor_descendants index to support looking up all the descendants for a taxonconcept. This will be used by the new taxonconcept_update_ancestors() trigger, which will support inserting taxonconcepts out of dependency order (such as for NCBI).

5545 10/16/2012 04:35 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: *_update_ancestors(): Made trigger deferred, so that it would run after all rows have been inserted in a bulk insert, such as during column-based import. This ensures that ancestors lists are not populated until all parents are inserted, which may occur out of order for datasources (such as NCBI) whose nodes are not in dependency order. (A node that newly acquires a parent will have to update all its descendants, which will then be updated again when its parent acquires its own parent.)

5544 10/16/2012 04:28 PM Aaron Marcuse-Kubitza

lib/PostgreSQL-MySQL.csv: Also filter out constraint triggers in addition to regular triggers

5543 10/15/2012 05:37 PM Aaron Marcuse-Kubitza

inputs/Madidi/Organism/map.csv: Total height: Remapped to height_m, assuming units based on the range and precision of values

5542 10/15/2012 05:33 PM Aaron Marcuse-Kubitza

inputs/VegBank/stemcount/map.csv: stemheight: Remapped to height_m using units from <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>

5541 10/15/2012 05:29 PM Aaron Marcuse-Kubitza

inputs/SALVIAS/plotObservations/map.csv, inputs/SALVIAS-CSV/Organism/map.csv: height_m, stem_height_m: Remapped to height_m using units from <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>

5540 10/15/2012 05:24 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped height_m

5539 10/15/2012 05:15 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added height_m

5538 10/15/2012 04:20 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv, VegCore-VegBIEN.csv: Removed no longer used and unit-ambiguous organismX, organismY. Use organismX_m, organismY_m instead.

5537 10/15/2012 04:18 PM Aaron Marcuse-Kubitza

inputs/VegBank/stemlocation/map.csv: stemxposition, stemyposition: Remapped to organismX_m/organismY_m using units from <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemlocation&entity=dba_tabledescription&where=where_tablename>

5536 10/15/2012 04:06 PM Aaron Marcuse-Kubitza

inputs/TEAM/*/map.csv: 1ha Plot X Coordinate, 1ha Plot Y Coordinate: Remapped to organismX_m/organismY_m using units from <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/TEAM/_src/TEAM-DataPackage-20120920191251_3859/Vegetation+-+Trees+&+Lianas/Vegetation-Tree-and-Liana-Metadata-1.5.pdf>

5535 10/15/2012 03:59 PM Aaron Marcuse-Kubitza

inputs/SALVIAS/plotObservations/map.csv, inputs/SALVIAS-CSV/Organism/map.csv: x_position, y_position: Remapped to organismX_m/organismY_m using units from <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>

5534 10/15/2012 03:51 PM Aaron Marcuse-Kubitza

inputs/Madidi/Organism/map.csv: Subplot X, Subplot Y: Remapped to organismX_m/organismY_m, assuming units based on the size of values relative to the plot area, which has units of ha

5533 10/15/2012 03:44 PM Aaron Marcuse-Kubitza

inputs/CTFS/StemObservation/map.csv: x, y: Remapped to organismX_m/organismY_m, assuming units based on the size of values relative to plot area, which has units of ha

5532 10/15/2012 03:30 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped organismX_m, organismY_m

5531 10/15/2012 03:29 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added organismX_m, organismY_m

5530 10/15/2012 03:23 PM Aaron Marcuse-Kubitza

sql_io.py: put_table(): full_in_table: Create it using new sql.copy_table() instead of sql.run_query_into()

5529 10/15/2012 03:23 PM Aaron Marcuse-Kubitza

sql.py: Added copy_table()

5528 10/15/2012 03:14 PM Aaron Marcuse-Kubitza

sql.mk_select() calls: Removed no longer needed order_by=None when limit=0

5527 10/15/2012 03:11 PM Aaron Marcuse-Kubitza

sql.py: mk_select(): Set order_by to None if limit == 0

5526 10/15/2012 03:09 PM Aaron Marcuse-Kubitza

inputs/.TNRS/schema.sql: Documented that accepted names must be processed before any names that resolve to them, because the entry for the accepted name contains all the ranks parsed out but the resolved name of another entry contains just some ranks and the taxonomic name. Column-based import will do this automatically when the total # of rows is <= the partition_size (because _taxonconcept_set_matched_concept_id()'s accepted taxonconcept is created after the main taxonconcept), but TNRS has more rows than this so sorting is needed to ensure that all the accepted names are processed in the first partitions.

5525 10/15/2012 02:52 PM Aaron Marcuse-Kubitza

sql.py: table_order_by(): Cache the order_by in table.order_by and propagate it when a LIKE table is created

5524 10/15/2012 02:51 PM Aaron Marcuse-Kubitza

sql_gen.py: Table: Added order_by attr to cache the results of table_order_by()

5523 10/15/2012 02:36 PM Aaron Marcuse-Kubitza

sql.select() calls: Removed order_by=None everywhere that a stable row order is required (i.e. consistent between selects, or consistent between table transformations). This causes several tests to return different inserted row counts, because the input table is now being accessed in pkey order instead of in table order. This fixes a bug where tables with more rows than ~100 would return different results for repeated calls of the same non-ordered select.

5522 10/15/2012 02:27 PM Aaron Marcuse-Kubitza

sql.py: mk_select(): Use table_order_by() instead of table_pkey_col() to determine what column(s) to order by if order_by is set to order_by_pkey

5521 10/15/2012 02:26 PM Aaron Marcuse-Kubitza

sql.py: Added table_pkey_index(), index_order_by(), table_cluster_on(), table_order_by()

5520 10/15/2012 01:10 PM Aaron Marcuse-Kubitza

sql.py: Added index_exprs() and use it in index_cols()

5519 10/15/2012 01:08 PM Aaron Marcuse-Kubitza

README.TXT: Data import: On local machine: Added `make inputs/.TNRS/cleanup`, which is necessary because the PostgreSQL collation may differ between vegbiendev's and your DB

5518 10/15/2012 12:24 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: taxonconcept_update_ancestors(): Use matched_concept_id's ancestors instead if available. (Recursively applied, this will use the ancestors of the accepted concept.) This facilitates finding all children of and matches to an accepted concept, which will all have an entry for that concept in taxonconcept_ancestor. Note that the concept's own parents will not be indexed in taxonconcept_ancestor, because only accepted ancestors are now stored in taxonconcept_ancestor. Documented that taxonconcept_ancestor now stores the accepted ancestors of a taxonconcept.

5517 10/15/2012 12:14 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: taxonconcept_2_propagate_accepted_concept_id(): Also update accepted_concept_id on concepts that resolve to this concept, which may have been created before this concept was marked as accepted if concepts are not imported in dependency order (accepted concepts first). Added index on matched_concept_id to speed up finding concepts that resolve to this concept.

5516 10/15/2012 12:10 PM Aaron Marcuse-Kubitza

sql.py: mk_select(): order_by is order_by_pkey: Only order by the table's actual pkey, if it has one, rather than using the first column if it doesn't

5515 10/15/2012 12:08 PM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/test.xml.ref: Updated inserted row count

5514 10/15/2012 10:21 AM Aaron Marcuse-Kubitza

db_xml.py: partition_size: Increased to 1,000,000 (>= NCBI.higher_taxa's size) so NCBI.higher_taxa can be imported completely in one partition. This is necessary because NCBI's taxonconcepts are not in dependency order (parents first), so a later partition cannot rely on the parents of its taxonconcepts having already been imported. Instead, all taxonconcepts must be imported at once and then separately, the parents of all taxonconcepts must be set.

5513 10/15/2012 10:08 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: taxonconcept.parent_id when explicit parent provided: Set taxonconcept.parent_id using new _taxonconcept_set_parent_id() after creating the child taxonconcept, so that the parent_id will point to the already-inserted parent taxonconcept instead of creating a new, empty parent taxonconcept. This creates a two-step import, where first the taxonconcepts are imported, and then the parent_ids are matched up. This is necessary for column-based import because all the parent taxonconcepts are imported in a separate iteration from the child taxonconcepts with only their sourceaccessioncode, so this iteration must occur after the child taxonconcept iteration in order to match up with fully-populated taxonconcepts. Row-based import, on the other hand, does not require _taxonconcept_set_parent_id() but does require the taxonconcepts to be provided in dependency order (parents first), which is unfortunately not the case for NCBI.

5512 10/15/2012 09:57 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: *_update_ancestors(): Telling immediate children to update their ancestors lists: Exclude self to avoid infinite recursion

5511 10/15/2012 09:57 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: *_update_ancestors(): Telling immediate children to update their ancestors lists: Exclude self to avoid infinite recursion

5510 10/15/2012 09:41 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Added _taxonconcept_set_parent_id()

5509 10/15/2012 09:37 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Renamed _set_matched_taxonconcept() to _taxonconcept_set_matched_concept_id() so that the function name is prefixed with the table it applies to

5508 10/15/2012 09:35 AM Aaron Marcuse-Kubitza

db_xml.py: put(): Treat a child node which is a function (starts with _) as a child with fkey to parent rather than as a field in the table. Such a function accepts the table's pkey as one of its arguments.

5507 10/15/2012 09:05 AM Aaron Marcuse-Kubitza

sql_gen.py: map_expr(): Don't replace an unquoted name when followed by ",", as it would be in an into table name for a function with multiple arguments (e.g. family in "_join_words(1=Field family, 2=Field name)")

5506 10/15/2012 08:49 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: locationevent: Moved obsstartdate, obsenddate to top of table so they would be visible in the ERD

5505 10/15/2012 08:45 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): ensure_cond(): track_data_error(): Concatenate the columns in the constraint together using , rather than adding a separate entry for each column, because the constraint is applicable to all columns together rather than to each column separately

5504 10/15/2012 08:26 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Renamed ignore_cond() to ensure_cond() for clarity

5503 10/15/2012 08:22 AM Aaron Marcuse-Kubitza

import_all: Also import the NCBI tree of life, before the TNRS names

5502 10/15/2012 08:17 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Also map acceptedFamily to the corresponding NCBI family

5501 10/15/2012 08:07 AM Aaron Marcuse-Kubitza

lib/PostgreSQL-MySQL.csv: custom types: Also exclude time. Reordered excluded (built-in) types by name.

5500 10/15/2012 07:57 AM Aaron Marcuse-Kubitza

inputs/import.stats.xls: Updated import times

5499 10/15/2012 07:50 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Changed `timestamp with time zone` fields to `date` because time information is not stored in these fields, and it's confusing to have an arbitrary timezone (the server's timezone) and an arbitrary time (midnight) set for input data that only has a precision to the nearest day

5498 10/15/2012 07:43 AM Aaron Marcuse-Kubitza

sql_gen.py: null_sentinels: Added entry for date

5497 10/15/2012 07:40 AM Aaron Marcuse-Kubitza

lib/PostgreSQL-MySQL.csv: custom types: Also exclude date, datetime

5496 10/15/2012 07:11 AM Aaron Marcuse-Kubitza

README.TXT: Documentation: To import and scrub just the test taxonomic names: Run `make backups/TNRS.backup/restore` in the background because it takes awhile

5495 10/15/2012 06:45 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Re-sourced TaxonomicRankEnum fields to the official TCS schema rather than the TCS version in VegX

5494 10/15/2012 06:42 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonrank: Updated source to the TCS schema (rather than VegBank) for the new, expanded list. Note that although the list itself was compiled from the TCS version in VegX, the official TCS download does not differ from the VegX TCS in the TaxonomicRankEnum fields (the xs: namespace has just been replaced with xsd: by VegX).

5493 10/12/2012 05:21 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: analytical_db_view: taxonconcept: Join again on the accepted_concept_id in order to use the accepted taxonconcept rather than the verbatim taxonconcept from the datasource

5492 10/12/2012 05:14 PM Aaron Marcuse-Kubitza

schemas/: svn:ignore log files

5491 10/12/2012 05:11 PM Aaron Marcuse-Kubitza

Added inputs/.NCBI/. This uses many of the new schema and mappings features, such as taxonconcept.sourceaccessioncode and parentTaxonID

5490 10/12/2012 05:07 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: identifyingtaxonomicname: Don't create if taxonconcept has an explicit parent, because the taxonName (which is generally only a component of the full taxonomic name, e.g. specificEpithet) is not globally unique. Datasources that provide name components in such a way that levels at or below family can't be directly concatenated cannot currently receive an identifyingtaxonomicname for input to TNRS.

5489 10/12/2012 04:54 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: taxonName->identifyingtaxonomicname: Don't include the rank with the taxonName, because TNRS only allows the rank to be included in the taxonomic name if it's infraspecific (otherwise, it returns no or an invalid match due to the presence of what it sees as an invalid term or a name component)

5488 10/12/2012 04:48 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped taxonName to the TNRS input taxonconcept's identifyingtaxonomicname

5487 10/12/2012 04:28 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Only forward taxonRank to the parent taxonconcept (which stores the infraspecific taxonconcept when the infraspecificEpithet is provided) if there is no explicit parent provided via parentTaxonID/etc.

5486 10/12/2012 04:09 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped parentScientificNameID, parentTaxonConceptID, parentTaxonID

5485 10/12/2012 04:03 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added parentScientificNameID, parentTaxonConceptID, parentTaxonID

5484 10/12/2012 03:53 PM Aaron Marcuse-Kubitza

input.Makefile: $(inDatasrc): Also include the vegbien_dest $schemas in the search_path, so that the datasource's SQL scripts (create.sql, etc.) can use VegBIEN functions and types

5483 10/12/2012 03:44 PM Aaron Marcuse-Kubitza

lib/common.Makefile: Added $(comma)

5482 10/12/2012 02:41 PM Aaron Marcuse-Kubitza

inputs/test_taxonomic_names/_scrub/public.sql: Regenerated with schema changes

5481 10/12/2012 02:38 PM Aaron Marcuse-Kubitza

input.Makefile: Maps building: %/.map.csv.last_cleanup: Fixed bug where needed to include $(coreMap) as a prerequisite, because even though it is not used directly in this target's recipe, it is used by targets invoked via recursive make after the main recipe runs. In general, whenever targets forward commands to a recursive make target, they also need to forward those recursive targets' prerequisites by including them in their own prerequisites list.

5480 10/12/2012 02:29 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped taxonConceptID, taxonID, scientificNameID to taxonconcept.sourceaccessioncode. Note that taxonconcept stores all of these taxonomic entities, using creator_id+creationdate, taxonname+rank+parent_id, and identifyingtaxonomicname, respectively.

5479 10/12/2012 02:28 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped taxonConceptID, taxonID, scientificNameID to taxonconcept.sourceaccessioncode. Note that taxonconcept stores all of these taxonomic entities, using creator_id+creationdate, taxonname+rank+parent_id, and identifyingtaxonomicname, respectively.

5478 10/12/2012 02:13 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped taxonName

5477 10/12/2012 02:11 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added taxonName

5476 10/12/2012 02:05 PM Aaron Marcuse-Kubitza

schemas/vegbien.ERD.mwb: Fixed lines

5475 10/12/2012 01:55 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Copied functions in the functions schema that are also used by the public schema to the public schema, so that reinstalling the functions schema would not cause anything that depends on a function in it to be cascadingly deleted. Currently, this just affects analytical_db_view, which uses _fraction_to_percent().

5474 10/12/2012 01:44 PM Aaron Marcuse-Kubitza

inputs/test_taxonomic_names/_scrub/public.sql: Regenerated with schema changes

5473 10/12/2012 01:36 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Added taxonconcept_2_propagate_accepted_concept_id() trigger to auto-populate the accepted_concept_id

5472 10/12/2012 12:53 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept.sourceaccessioncode: Added descriptive comment

5471 10/12/2012 12:53 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept.accepted_concept_id: Added descriptive comment

5470 10/12/2012 12:48 PM Aaron Marcuse-Kubitza

Regenerated vegbien.ERD exports

5469 10/12/2012 12:47 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Added sourceaccessioncode, and allow it to scope the taxonconcept when provided

5468 10/12/2012 12:33 PM Aaron Marcuse-Kubitza

inputs/test_taxonomic_names/_scrub/public.sql: Regenerated with schema changes

5467 10/12/2012 12:29 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Renamed canon_concept_id to matched_concept_id, because this is actually the closest-match taxonconcept in the match hierarchy (datasource concept -> parsed concept -> matched concept -> accepted concept) rather than the accepted synonym, which goes in accepted_concept_id