Subject | Hash | Author | Date (UTC) |
---|---|---|---|
add interaction and use consistent namespace | 00f70c27b706cd2138f53117008ea88fc25582ad | dleucas | 2018-07-14 22:20:46 |
adding animal age, sex and id | 142570dba33128de7b6b93c3044f1e6ea03ee735 | dleucas | 2018-07-14 03:55:22 |
add vocal animal id and species code | 8b0138515bff58ed980e6c6cdac93724f31e7a7d | dleucas | 2018-07-13 18:50:14 |
normalize signal overlap types | 57bf11ebad27db0a8aea7dec400554780798d46d | dleucas | 2018-07-12 20:44:41 |
add signal class, use null not empty | f108fc71216ede0be40ef5a6749ddef5b714721c | dleucas | 2018-07-12 20:17:03 |
code formating | 5c53a7166dfbf8485f81c8800a636a5919956f4b | d.leucas@outlook.com | 2018-07-12 00:34:57 |
code formating | 7457d6f0da9e12ac64fcc6b293d23682a69b45c5 | dleucas | 2018-07-12 00:34:57 |
add links, add coverage task | d9ddc331b713ac1be97040e8556f84ed46d1ccec | d.leucas@outlook.com | 2018-07-08 22:40:04 |
add links, add coverage task | c64feb14912a2f7ae7f8e9bcda5c17ca172cadc0 | dleucas | 2018-07-08 22:40:04 |
WIP signal class | 79e6fea2d2a914e9c84528f1b184709e43e5f750 | d.leucas@outlook.com | 2018-07-08 22:39:17 |
WIP signal class | af311640c00d17c010680c69112fbaefd799176a | dleucas | 2018-07-08 22:39:17 |
add signal cut size and quality | e78c447e83644b9eb9f950b2deaadac0fc5e6dda | d.leucas@outlook.com | 2018-07-08 22:06:35 |
add signal cut size and quality | 9174f89773c2b6e934bffb3c2ab329c73350b025 | dleucas | 2018-07-08 22:06:35 |
add sample rate and number of channels | b263b658641471fd455ef5215d65a86959097471 | d.leucas@outlook.com | 2018-07-08 21:11:39 |
add sample rate and number of channels | c32ad9d8dc8b2e461e4869c60d9cee132047f4b1 | dleucas | 2018-07-08 21:11:39 |
as markdown | d9fa587724fd2a46bf3373a8d549c4a39746a3aa | dleucas | 2018-07-08 00:54:09 |
add info on cue values | 8e60832b65879f8c11a794715fa51bb2a0d2488b | dleucas | 2018-07-08 00:53:26 |
WIP: postion transform, cue and time done | 82dde8774e24b1c582a4ac222758e9b98da28961 | dleucas | 2018-07-08 00:51:45 |
initial jq transform filter | a688a9ec40d59a7de841eb86e1eeca72c64664b2 | dleucas | 2018-07-07 23:48:50 |
add ignores | f8b235e00a265d3c4a6613e3174018ef754f2407 | dleucas | 2018-07-07 22:06:53 |
File | Lines added | Lines deleted |
---|---|---|
transform.jq | 18 | 6 |
File transform.jq changed (mode: 100644) (index 5544764..65ab3f6) | |||
111 | 111 | # regex will match only those | # regex will match only those |
112 | 112 | # not clear what other input values mean exactly | # not clear what other input values mean exactly |
113 | 113 | # 211 | # 211 |
114 | channels: [ | ||
114 | channel: [ | ||
115 | 115 | {_source_nc: .NC}, | {_source_nc: .NC}, |
116 | 116 | ( | ( |
117 | 117 | .NC | | .NC | |
124 | 124 | ) | ) |
125 | 125 | ] | add | ] | add |
126 | 126 | }, | }, |
127 | animals: { | ||
127 | animal: { | ||
128 | 128 | _source_id: .ID, | _source_id: .ID, |
129 | 129 | # List of vocal animals, name and species code | # List of vocal animals, name and species code |
130 | 130 | # All existing entries: | # All existing entries: |
154 | 154 | # create object, anything before matched species code is id | # create object, anything before matched species code is id |
155 | 155 | # also trim space from resulting string | # also trim space from resulting string |
156 | 156 | { | { |
157 | id: $s[0:.offset] | gsub("^\\s+|\\s+$";""), | ||
157 | animal_id: $s[0:.offset] | gsub("^\\s+|\\s+$";""), | ||
158 | 158 | species_code: .string | gsub("^\\s+|\\s+$";"") | species_code: .string | gsub("^\\s+|\\s+$";"") |
159 | 159 | }) | | }) | |
160 | 160 | # if no object was created, use input as fallback | # if no object was created, use input as fallback |
161 | 161 | # this is for entries without a species code like "Keiko" | # this is for entries without a species code like "Keiko" |
162 | 162 | if (. == [] and ($input|length)>0 ) then | if (. == [] and ($input|length)>0 ) then |
163 | [{id: $input}] | ||
163 | [{animal_id: $input}] | ||
164 | 164 | else | else |
165 | 165 | . | . |
166 | 166 | end | end |
182 | 182 | profile: [.AG | | profile: [.AG | |
183 | 183 | capture("^(?<sex>[FM])" + | capture("^(?<sex>[FM])" + |
184 | 184 | "(?<age>[\\?\\d]{2})" + | "(?<age>[\\?\\d]{2})" + |
185 | "(?<id>(FB\\d+|\\w+))" + | ||
185 | "(?<animal_id>(FB\\d+|\\w+))" + | ||
186 | 186 | "\\s+" + | "\\s+" + |
187 | 187 | "[FM](?<birth_year>[\\d\\?]{4})") | "[FM](?<birth_year>[\\d\\?]{4})") |
188 | ] | .[0] | ||
188 | ] | .[0], | ||
189 | # interaction between animals | ||
190 | # always a pair, and multiple sets of pairs are possible | ||
191 | # [[{}, {}]] or [[{} {}], [{} {}], ...] | ||
192 | # source data | ||
193 | # FCFB147 FCFB145 | ||
194 | # FCFB147 FCFB145 | FFFB147 FFFB149 | FFFB145 FFFB149 | FCFB153 FCFB150 | ||
195 | # FCFB153 FCFB150 | ||
196 | # FCFB5 FCFB55 | ||
197 | # FCFB73 FCFB34 | ||
198 | interaction: ( .IA | split("|") | | ||
199 | map([capture("(?<type>[FMC]{2})(?<animal_id>FB\\d+)"; "g")]) | ||
200 | ) | ||
189 | 201 | } | } |
190 | 202 | } | } |