You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,9 @@ If you use TBro please cite this publication: [: baw146. doi:10.1093/database/baw146.
INSERT INTO cvterm (name, definition, cv_id, dbxref_id) SELECT ?,?,(SELECT cv_id FROM cv WHERE name='local'),? WHERE NOT EXISTS (SELECT 1 FROM cvterm WHERE dbxref_id = ?) RETURNING cvterm_id
115
-
)
116
-
SELECT cvterm_id FROM new_row
117
-
UNION
118
-
SELECT cvterm_id FROM cvterm WHERE dbxref_id = ?;
119
-
EOF
120
-
);
121
104
/**
122
105
* insert cvtermprop if non-existant with these values
123
106
* parameters: cvterm_id, type_id, value, cvterm_id, type_id, cvterm_id, type_id, value
@@ -129,37 +112,19 @@ public static function import($options) {
129
112
130
113
EOF
131
114
);
132
-
$dbxrefs = array();
133
-
$cvterms = array();
134
115
135
116
$file = fopen($filename, 'r');
136
117
//skip header line
137
118
fgets($file);
138
-
while (($line = fgetcsv($file, 0, "\t")) != false) {
119
+
while (($line = fgetcsv($file, 0, "\t", "'")) != false) {
INSERT INTO cvterm (name, definition, cv_id, dbxref_id) SELECT ?,?,(SELECT cv_id FROM cv WHERE name='local'),? WHERE NOT EXISTS (SELECT 1 FROM cvterm WHERE dbxref_id = ?) RETURNING cvterm_id
0 commit comments