Project

General

Profile

« Previous | Next » 

Revision 9949

added inputs/IRMNG/, including runscripts to download the names. this is now the 2nd datasource after GBIF to use runscripts, and the 3rd after FIA/GBIF to use new-style import.

View differences:

inputs/IRMNG/genus_homonyms/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>IRMNG</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <locationevent>
11
                            <taxonoccurrence>
12
                                <taxondetermination>
13
                                    <taxonverbatim_id>
14
                                        <taxonverbatim>
15
                                            <taxonlabel_id>
16
                                                <taxonlabel>
17
                                                    <parent_id>
18
                                                        <taxonlabel>
19
                                                            <rank>$taxonRank</rank>
20
                                                            <parent_id>
21
                                                                <taxonlabel>
22
                                                                    <rank>cultivar</rank>
23
                                                                    <parent_id>
24
                                                                        <taxonlabel>
25
                                                                            <rank>forma</rank>
26
                                                                            <parent_id>
27
                                                                                <taxonlabel>
28
                                                                                    <rank>variety</rank>
29
                                                                                    <parent_id>
30
                                                                                        <taxonlabel>
31
                                                                                            <rank>subspecies</rank>
32
                                                                                            <parent_id>
33
                                                                                                <taxonlabel>
34
                                                                                                    <rank>species</rank>
35
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
36
                                                                                                    <parent_id>
37
                                                                                                        <taxonlabel>
38
                                                                                                            <rank>genus</rank>
39
                                                                                                            <taxonepithet>$genus</taxonepithet>
40
                                                                                                            <parent_id>
41
                                                                                                                <taxonlabel>
42
                                                                                                                    <rank>family</rank>
43
                                                                                                                    <taxonepithet>$family</taxonepithet>
44
                                                                                                                    <parent_id>
45
                                                                                                                        <taxonlabel>
46
                                                                                                                            <rank>order</rank>
47
                                                                                                                            <taxonepithet>$order</taxonepithet>
48
                                                                                                                            <parent_id>
49
                                                                                                                                <taxonlabel>
50
                                                                                                                                    <rank>class</rank>
51
                                                                                                                                    <taxonepithet>$class</taxonepithet>
52
                                                                                                                                    <parent_id>
53
                                                                                                                                        <taxonlabel>
54
                                                                                                                                            <rank>phylum</rank>
55
                                                                                                                                            <taxonepithet>$phylum</taxonepithet>
56
                                                                                                                                            <parent_id>
57
                                                                                                                                                <taxonlabel>
58
                                                                                                                                                    <rank>kingdom</rank>
59
                                                                                                                                                    <taxonepithet>$kingdom</taxonepithet>
60
                                                                                                                                                </taxonlabel>
61
                                                                                                                                            </parent_id>
62
                                                                                                                                        </taxonlabel>
63
                                                                                                                                    </parent_id>
64
                                                                                                                                </taxonlabel>
65
                                                                                                                            </parent_id>
66
                                                                                                                        </taxonlabel>
67
                                                                                                                    </parent_id>
68
                                                                                                                </taxonlabel>
69
                                                                                                            </parent_id>
70
                                                                                                        </taxonlabel>
71
                                                                                                    </parent_id>
72
                                                                                                </taxonlabel>
73
                                                                                            </parent_id>
74
                                                                                        </taxonlabel>
75
                                                                                    </parent_id>
76
                                                                                </taxonlabel>
77
                                                                            </parent_id>
78
                                                                        </taxonlabel>
79
                                                                    </parent_id>
80
                                                                </taxonlabel>
81
                                                            </parent_id>
82
                                                        </taxonlabel>
83
                                                    </parent_id>
84
                                                    <rank>$taxonRank</rank>
85
                                                    <sourceaccessioncode>$taxonID</sourceaccessioncode>
86
                                                    <taxonepithet>
87
                                                        <_if name="if taxonomic name is epithet">
88
                                                            <cond>
89
                                                                <_alt>
90
                                                                    <2>true</2>
91
                                                                    <1><_taxonomic_name_is_epithet><rank>$taxonRank</rank></_taxonomic_name_is_epithet></1>
92
                                                                </_alt>
93
                                                            </cond>
94
                                                            <then>$taxonNameOrEpithet</then>
95
                                                        </_if>
96
                                                    </taxonepithet>
97
                                                    <taxonomicname>
98
                                                        <_merge_prefix>
99
                                                            <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
100
                                                            <value>
101
                                                                <_alt>
102
                                                                    <2>
103
                                                                        <_join_words>
104
                                                                            <2><_filter_genus><value>$genus</value></_filter_genus></2>
105
                                                                            <3>$specificEpithet</3>
106
                                                                        </_join_words>
107
                                                                    </2>
108
                                                                    <3>$taxonNameOrEpithet</3>
109
                                                                </_alt>
110
                                                            </value>
111
                                                        </_merge_prefix>
112
                                                    </taxonomicname>
113
                                                </taxonlabel>
114
                                            </taxonlabel_id>
115
                                            <family>$family</family>
116
                                            <genus>$genus</genus>
117
                                            <specific_epithet>$specificEpithet</specific_epithet>
118
                                            <verbatimrank>$taxonRank</verbatimrank>
119
                                        </taxonverbatim>
120
                                    </taxonverbatim_id>
121
                                </taxondetermination>
122
                            </taxonoccurrence>
123
                        </locationevent>
124
                    </location>
125
                </path>
126
            </_simplifyPath>
127
        </path>
128
    </_setDefault>
129
</VegBIEN>
130
Inserted 19 new rows into database
inputs/IRMNG/genus_homonyms/new_terms.csv
1
IRMNG_ID,taxonID,,
2
Homonym,taxonNameOrEpithet,,
3
Homonym_Rank,taxonRank,,
4
Authority,authors,,
inputs/IRMNG/homonyms.run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/table.run
3
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/sh/web.sh
4

  
5
if self_not_included; then
6

  
7
*.htm/make()
8
{
9
	echo_func; set_make_vars; check_wildcard_target_exists
10
	local letter_range="${letter_range-[A-Z]}"
11
	local rank="${table%_homonyms}"
12
	curl --output '#1.htm' "http://www.marine.csiro.au/mirrorsearch/ir_search.list_homonyms?hlevel=$rank&start_letter=$letter_range&restrict_by=pln&output_style=delim_rows"
13
}
14

  
15
*.txt/make()
16
{
17
	echo_func; set_make_vars; deferred_check_target_exists
18
	*.htm/make
19
	for in in "$top_dir"/*.htm; do
20
		stdout="${in/%.htm/.txt}" to_file grep -vE '^<' "$in" # strip tags
21
	done
22
}
23

  
24
func_override import__table_run
25
import()
26
{
27
	echo_func; set_make_vars
28
	*.txt/make
29
	self_make import__table_run "$@"
30
}
31

  
32
fi
0 33

  
inputs/IRMNG/Source/map.csv
1
IRMNG,VegCore,Filter,Comments
2
:primary database,sourceType,,
inputs/IRMNG/Source/VegBIEN.csv
1
IRMNG,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
:primary database,"/_if[@name=""if specimen""]/else/source:[shortname/_first/2/_env:[name=source]]/sourcetype",
inputs/IRMNG/Source/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>IRMNG</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <source>
10
                        <shortname>IRMNG</shortname>
11
                        <sourcetype>primary database</sourcetype>
12
                    </source>
13
                </path>
14
            </_simplifyPath>
15
        </path>
16
    </_setDefault>
17
</VegBIEN>
18
Inserted 0 new rows into database
inputs/IRMNG/species_homonyms/header.csv
1
*row_num,taxonID,taxonNameOrEpithet,taxonRank,authors,kingdom,phylum,class,order,family,genus,specificEpithet
inputs/IRMNG/species_homonyms/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../homonyms.run
3

  
4
letter_range={A} # [A] does not work
0 5

  
inputs/IRMNG/species_homonyms/map.csv
1
IRMNG,VegCore,Filter,Comments
2
*row_num,*row_num,,
3
taxonID,taxonID,,
4
taxonNameOrEpithet,taxonNameOrEpithet,,
5
taxonRank,taxonRank,,
6
authors,authors,,
7
kingdom,kingdom,,
8
phylum,phylum,,
9
class,class,,
10
order,order,,
11
family,family,,
12
genus,genus,,
13
specificEpithet,specificEpithet,,
inputs/IRMNG/species_homonyms/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>IRMNG</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <locationevent>
11
                            <taxonoccurrence>
12
                                <taxondetermination>
13
                                    <taxonverbatim_id>
14
                                        <taxonverbatim>
15
                                            <taxonlabel_id>
16
                                                <taxonlabel>
17
                                                    <parent_id>
18
                                                        <taxonlabel>
19
                                                            <rank>$taxonRank</rank>
20
                                                            <parent_id>
21
                                                                <taxonlabel>
22
                                                                    <rank>cultivar</rank>
23
                                                                    <parent_id>
24
                                                                        <taxonlabel>
25
                                                                            <rank>forma</rank>
26
                                                                            <parent_id>
27
                                                                                <taxonlabel>
28
                                                                                    <rank>variety</rank>
29
                                                                                    <parent_id>
30
                                                                                        <taxonlabel>
31
                                                                                            <rank>subspecies</rank>
32
                                                                                            <parent_id>
33
                                                                                                <taxonlabel>
34
                                                                                                    <rank>species</rank>
35
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
36
                                                                                                    <parent_id>
37
                                                                                                        <taxonlabel>
38
                                                                                                            <rank>genus</rank>
39
                                                                                                            <taxonepithet>$genus</taxonepithet>
40
                                                                                                            <parent_id>
41
                                                                                                                <taxonlabel>
42
                                                                                                                    <rank>family</rank>
43
                                                                                                                    <taxonepithet>$family</taxonepithet>
44
                                                                                                                    <parent_id>
45
                                                                                                                        <taxonlabel>
46
                                                                                                                            <rank>order</rank>
47
                                                                                                                            <taxonepithet>$order</taxonepithet>
48
                                                                                                                            <parent_id>
49
                                                                                                                                <taxonlabel>
50
                                                                                                                                    <rank>class</rank>
51
                                                                                                                                    <taxonepithet>$class</taxonepithet>
52
                                                                                                                                    <parent_id>
53
                                                                                                                                        <taxonlabel>
54
                                                                                                                                            <rank>phylum</rank>
55
                                                                                                                                            <taxonepithet>$phylum</taxonepithet>
56
                                                                                                                                            <parent_id>
57
                                                                                                                                                <taxonlabel>
58
                                                                                                                                                    <rank>kingdom</rank>
59
                                                                                                                                                    <taxonepithet>$kingdom</taxonepithet>
60
                                                                                                                                                </taxonlabel>
61
                                                                                                                                            </parent_id>
62
                                                                                                                                        </taxonlabel>
63
                                                                                                                                    </parent_id>
64
                                                                                                                                </taxonlabel>
65
                                                                                                                            </parent_id>
66
                                                                                                                        </taxonlabel>
67
                                                                                                                    </parent_id>
68
                                                                                                                </taxonlabel>
69
                                                                                                            </parent_id>
70
                                                                                                        </taxonlabel>
71
                                                                                                    </parent_id>
72
                                                                                                </taxonlabel>
73
                                                                                            </parent_id>
74
                                                                                        </taxonlabel>
75
                                                                                    </parent_id>
76
                                                                                </taxonlabel>
77
                                                                            </parent_id>
78
                                                                        </taxonlabel>
79
                                                                    </parent_id>
80
                                                                </taxonlabel>
81
                                                            </parent_id>
82
                                                        </taxonlabel>
83
                                                    </parent_id>
84
                                                    <rank>$taxonRank</rank>
85
                                                    <sourceaccessioncode>$taxonID</sourceaccessioncode>
86
                                                    <taxonepithet>
87
                                                        <_if name="if taxonomic name is epithet">
88
                                                            <cond>
89
                                                                <_alt>
90
                                                                    <2>true</2>
91
                                                                    <1><_taxonomic_name_is_epithet><rank>$taxonRank</rank></_taxonomic_name_is_epithet></1>
92
                                                                </_alt>
93
                                                            </cond>
94
                                                            <then>$taxonNameOrEpithet</then>
95
                                                        </_if>
96
                                                    </taxonepithet>
97
                                                    <taxonomicname>
98
                                                        <_merge_prefix>
99
                                                            <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
100
                                                            <value>
101
                                                                <_alt>
102
                                                                    <2>
103
                                                                        <_join_words>
104
                                                                            <2><_filter_genus><value>$genus</value></_filter_genus></2>
105
                                                                            <3>$specificEpithet</3>
106
                                                                        </_join_words>
107
                                                                    </2>
108
                                                                    <3>$taxonNameOrEpithet</3>
109
                                                                </_alt>
110
                                                            </value>
111
                                                        </_merge_prefix>
112
                                                    </taxonomicname>
113
                                                </taxonlabel>
114
                                            </taxonlabel_id>
115
                                            <family>$family</family>
116
                                            <genus>$genus</genus>
117
                                            <specific_epithet>$specificEpithet</specific_epithet>
118
                                            <verbatimrank>$taxonRank</verbatimrank>
119
                                        </taxonverbatim>
120
                                    </taxonverbatim_id>
121
                                </taxondetermination>
122
                            </taxonoccurrence>
123
                        </locationevent>
124
                    </location>
125
                </path>
126
            </_simplifyPath>
127
        </path>
128
    </_setDefault>
129
</VegBIEN>
130
Inserted 19 new rows into database
inputs/IRMNG/species_homonyms/VegBIEN.csv
1
IRMNG,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Filter; Comments,Comments
2
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank",
3
specificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=species]/taxonepithet",
4
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/taxonepithet",
5
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet",
6
order,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=order]/taxonepithet",
7
class,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=class]/taxonepithet",
8
phylum,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,class,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=phylum]/taxonepithet",
9
kingdom,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,class,phylum,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=kingdom]/taxonepithet",
10
taxonRank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/rank,
11
taxonID,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/sourceaccessioncode,
12
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/cond/_alt:[2=true]/1/_taxonomic_name_is_epithet/rank",
13
taxonNameOrEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/then",
14
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family,
15
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2/_filter_genus/value,
16
specificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1,
17
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
18
taxonNameOrEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/3,
19
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/family,
20
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/genus,
21
specificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/specific_epithet,
22
taxonRank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/verbatimrank,
23
*row_num,,** No join mapping for *row_num ** 
24
authors,,** No join mapping for authors ** 
inputs/IRMNG/species_homonyms/unmapped_terms.csv
1
*row_num
2
authors
inputs/IRMNG/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/runscripts/import.run
3

  
4
if self_not_included; then
5

  
6
subdirs=(family_homonyms genus_homonyms species_homonyms)
7

  
8
import()
9
{
10
	echo_func
11
	fwd "$FUNCNAME" "$@"
12
}
13

  
14
fi
0 15

  
inputs/IRMNG/map.csv
1
IRMNG,VegCore,Filter,Comments
2
row_num,*row_num,,
3
IRMNG_ID,*taxonID,,
4
Homonym,*taxonNameOrEpithet,,
5
Homonym_Rank,*taxonRank,,
6
Authority,*Author,,
7
Kingdom,kingdom,,
8
Phylum,phylum,,
9
Class,class,,
10
Order,order,,
11
Family,family,,
12
Genus,genus,,
13
Species$,specificEpithet,,see species_homonyms for example values
inputs/IRMNG/family_homonyms/header.csv
1
row_num,IRMNG_ID,Homonym,Homonym_Rank,Authority,Kingdom,Phylum,Class,Order,Family,Genus,Species$
inputs/IRMNG/family_homonyms/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../homonyms.run
3

  
4
letter_range={A} # [A] does not work
0 5

  
inputs/IRMNG/family_homonyms/map.csv
1
IRMNG,VegCore,Filter,Comments
2
row_num,*row_num,,
3
IRMNG_ID,taxonID,,
4
Homonym,taxonNameOrEpithet,,
5
Homonym_Rank,taxonRank,,
6
Authority,authors,,
7
Kingdom,kingdom,,
8
Phylum,phylum,,
9
Class,class,,
10
Order,order,,
11
Family,family,,
12
Genus,genus,,
13
Species$,specificEpithet,,
inputs/IRMNG/family_homonyms/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>IRMNG</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <locationevent>
11
                            <taxonoccurrence>
12
                                <taxondetermination>
13
                                    <taxonverbatim_id>
14
                                        <taxonverbatim>
15
                                            <taxonlabel_id>
16
                                                <taxonlabel>
17
                                                    <parent_id>
18
                                                        <taxonlabel>
19
                                                            <rank>$taxonRank</rank>
20
                                                            <parent_id>
21
                                                                <taxonlabel>
22
                                                                    <rank>cultivar</rank>
23
                                                                    <parent_id>
24
                                                                        <taxonlabel>
25
                                                                            <rank>forma</rank>
26
                                                                            <parent_id>
27
                                                                                <taxonlabel>
28
                                                                                    <rank>variety</rank>
29
                                                                                    <parent_id>
30
                                                                                        <taxonlabel>
31
                                                                                            <rank>subspecies</rank>
32
                                                                                            <parent_id>
33
                                                                                                <taxonlabel>
34
                                                                                                    <rank>species</rank>
35
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
36
                                                                                                    <parent_id>
37
                                                                                                        <taxonlabel>
38
                                                                                                            <rank>genus</rank>
39
                                                                                                            <taxonepithet>$genus</taxonepithet>
40
                                                                                                            <parent_id>
41
                                                                                                                <taxonlabel>
42
                                                                                                                    <rank>family</rank>
43
                                                                                                                    <taxonepithet>$family</taxonepithet>
44
                                                                                                                    <parent_id>
45
                                                                                                                        <taxonlabel>
46
                                                                                                                            <rank>order</rank>
47
                                                                                                                            <taxonepithet>$order</taxonepithet>
48
                                                                                                                            <parent_id>
49
                                                                                                                                <taxonlabel>
50
                                                                                                                                    <rank>class</rank>
51
                                                                                                                                    <taxonepithet>$class</taxonepithet>
52
                                                                                                                                    <parent_id>
53
                                                                                                                                        <taxonlabel>
54
                                                                                                                                            <rank>phylum</rank>
55
                                                                                                                                            <taxonepithet>$phylum</taxonepithet>
56
                                                                                                                                            <parent_id>
57
                                                                                                                                                <taxonlabel>
58
                                                                                                                                                    <rank>kingdom</rank>
59
                                                                                                                                                    <taxonepithet>$kingdom</taxonepithet>
60
                                                                                                                                                </taxonlabel>
61
                                                                                                                                            </parent_id>
62
                                                                                                                                        </taxonlabel>
63
                                                                                                                                    </parent_id>
64
                                                                                                                                </taxonlabel>
65
                                                                                                                            </parent_id>
66
                                                                                                                        </taxonlabel>
67
                                                                                                                    </parent_id>
68
                                                                                                                </taxonlabel>
69
                                                                                                            </parent_id>
70
                                                                                                        </taxonlabel>
71
                                                                                                    </parent_id>
72
                                                                                                </taxonlabel>
73
                                                                                            </parent_id>
74
                                                                                        </taxonlabel>
75
                                                                                    </parent_id>
76
                                                                                </taxonlabel>
77
                                                                            </parent_id>
78
                                                                        </taxonlabel>
79
                                                                    </parent_id>
80
                                                                </taxonlabel>
81
                                                            </parent_id>
82
                                                        </taxonlabel>
83
                                                    </parent_id>
84
                                                    <rank>$taxonRank</rank>
85
                                                    <sourceaccessioncode>$taxonID</sourceaccessioncode>
86
                                                    <taxonepithet>
87
                                                        <_if name="if taxonomic name is epithet">
88
                                                            <cond>
89
                                                                <_alt>
90
                                                                    <2>true</2>
91
                                                                    <1><_taxonomic_name_is_epithet><rank>$taxonRank</rank></_taxonomic_name_is_epithet></1>
92
                                                                </_alt>
93
                                                            </cond>
94
                                                            <then>$taxonNameOrEpithet</then>
95
                                                        </_if>
96
                                                    </taxonepithet>
97
                                                    <taxonomicname>
98
                                                        <_merge_prefix>
99
                                                            <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
100
                                                            <value>
101
                                                                <_alt>
102
                                                                    <2>
103
                                                                        <_join_words>
104
                                                                            <2><_filter_genus><value>$genus</value></_filter_genus></2>
105
                                                                            <3>$specificEpithet</3>
106
                                                                        </_join_words>
107
                                                                    </2>
108
                                                                    <3>$taxonNameOrEpithet</3>
109
                                                                </_alt>
110
                                                            </value>
111
                                                        </_merge_prefix>
112
                                                    </taxonomicname>
113
                                                </taxonlabel>
114
                                            </taxonlabel_id>
115
                                            <family>$family</family>
116
                                            <genus>$genus</genus>
117
                                            <specific_epithet>$specificEpithet</specific_epithet>
118
                                            <verbatimrank>$taxonRank</verbatimrank>
119
                                        </taxonverbatim>
120
                                    </taxonverbatim_id>
121
                                </taxondetermination>
122
                            </taxonoccurrence>
123
                        </locationevent>
124
                    </location>
125
                </path>
126
            </_simplifyPath>
127
        </path>
128
    </_setDefault>
129
</VegBIEN>
130
Inserted 14 new rows into database
inputs/IRMNG/family_homonyms/VegBIEN.csv
1
IRMNG,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Filter; Comments,Comments
2
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank",
3
specificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=species]/taxonepithet",
4
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/taxonepithet",
5
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet",
6
order,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=order]/taxonepithet",
7
class,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=class]/taxonepithet",
8
phylum,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,class,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=phylum]/taxonepithet",
9
kingdom,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,class,phylum,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=kingdom]/taxonepithet",
10
taxonRank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/rank,
11
taxonID,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/sourceaccessioncode,
12
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/cond/_alt:[2=true]/1/_taxonomic_name_is_epithet/rank",
13
taxonNameOrEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/then",
14
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family,
15
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2/_filter_genus/value,
16
specificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1,
17
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
18
taxonNameOrEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/3,
19
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/family,
20
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/genus,
21
specificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/specific_epithet,
22
taxonRank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/verbatimrank,
23
*row_num,,** No join mapping for *row_num ** 
24
authors,,** No join mapping for authors ** 
inputs/IRMNG/family_homonyms/new_terms.csv
1
IRMNG_ID,taxonID,,
2
Homonym,taxonNameOrEpithet,,
3
Homonym_Rank,taxonRank,,
4
Authority,authors,,
inputs/IRMNG/family_homonyms/unmapped_terms.csv
1
*row_num
2
authors
inputs/IRMNG/genus_homonyms/header.csv
1
row_num,IRMNG_ID,Homonym,Homonym_Rank,Authority,Kingdom,Phylum,Class,Order,Family,Genus,Species$
inputs/IRMNG/genus_homonyms/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../homonyms.run
0 3

  
inputs/IRMNG/genus_homonyms/map.csv
1
IRMNG,VegCore,Filter,Comments
2
row_num,*row_num,,
3
IRMNG_ID,taxonID,,
4
Homonym,taxonNameOrEpithet,,
5
Homonym_Rank,taxonRank,,
6
Authority,authors,,
7
Kingdom,kingdom,,
8
Phylum,phylum,,
9
Class,class,,
10
Order,order,,
11
Family,family,,
12
Genus,genus,,
13
Species$,specificEpithet,,
inputs/IRMNG/genus_homonyms/VegBIEN.csv
1
IRMNG,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Filter; Comments,Comments
2
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank",
3
specificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=species]/taxonepithet",
4
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/taxonepithet",
5
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet",
6
order,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=order]/taxonepithet",
7
class,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=class]/taxonepithet",
8
phylum,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,class,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=phylum]/taxonepithet",
9
kingdom,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,family,order,class,phylum,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=kingdom]/taxonepithet",
10
taxonRank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/rank,
11
taxonID,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/sourceaccessioncode,
12
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/cond/_alt:[2=true]/1/_taxonomic_name_is_epithet/rank",
13
taxonNameOrEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/then",
14
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family,
15
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2/_filter_genus/value,
16
specificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1,
17
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
18
taxonNameOrEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/3,
19
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/family,
20
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/genus,
21
specificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/specific_epithet,
22
taxonRank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/verbatimrank,
23
*row_num,,** No join mapping for *row_num ** 
24
authors,,** No join mapping for authors ** 
inputs/IRMNG/genus_homonyms/unmapped_terms.csv
1
*row_num
2
authors
inputs/IRMNG/table.run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/runscripts/table.run
0 3

  

Also available in: Unified diff