Revision 5835
Added by Aaron Marcuse-Kubitza about 12 years ago
inputs/.NCBI/nodes/create.sql | ||
---|---|---|
18 | 18 |
|
19 | 19 |
-- Make genus (mostly) globally unique by removing kingdom Animalia/Metazoa |
20 | 20 |
DELETE FROM :table WHERE tax_id = 33208; -- delete cascades to descendants |
21 |
|
|
22 |
-- Make genus completely globally unique by removing duplicates |
|
23 |
DELETE FROM :table |
|
24 |
WHERE rank IN ('genus', 'subgenus') |
|
25 |
AND name_txt IN ( |
|
26 |
SELECT name_txt |
|
27 |
FROM :table |
|
28 |
WHERE rank IN ('genus', 'subgenus') |
|
29 |
GROUP BY name_txt |
|
30 |
HAVING count(*) > 1 |
|
31 |
) |
|
32 |
; |
Also available in: Unified diff
inputs/.NCBI/nodes/create.sql: Make genus completely globally unique by removing duplicates. Note that only duplicates with ranks at or below the genus level need be removed, which for this dataset is just genus and subgenus.