1 |
53
|
aaronmk
|
#!/bin/bash
|
2 |
|
|
# Tests map
|
3 |
100
|
aaronmk
|
# Usage: env [debug=1] [n=<num-rows>] self
|
4 |
53
|
aaronmk
|
|
5 |
|
|
selfDir="$(dirname -- "$0")"
|
6 |
|
|
cd "$selfDir"
|
7 |
|
|
|
8 |
|
|
test -n "$n" || n=2
|
9 |
|
|
let n++
|
10 |
|
|
|
11 |
88
|
aaronmk
|
in=NYSpecimenDataAmericas.csv
|
12 |
|
|
out=NYSpecimenDataAmericas.xml
|
13 |
53
|
aaronmk
|
|
14 |
88
|
aaronmk
|
head -"$n" "$in"|../map ../../mappings/NYBG-VegX.organisms.csv \
|
15 |
|
|
>"test_output/$out" && diff "$out" "test_output/$out"
|
16 |
|
|
|
17 |
100
|
aaronmk
|
test -z "$debug" && toVegbank=map2vegbank || toVegbank=map
|
18 |
|
|
head -"$n" "$in"|"../$toVegbank" ../../mappings/joins/NYBG-VegBank.organisms.csv
|