obi import: skip on error more robust
This commit is contained in:
@ -270,6 +270,8 @@ def run(config):
|
|||||||
elif not i%50000:
|
elif not i%50000:
|
||||||
logger("info", "Imported %d entries", i)
|
logger("info", "Imported %d entries", i)
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
if NUC_SEQS_view:
|
if NUC_SEQS_view:
|
||||||
id_col[i] = entry.id
|
id_col[i] = entry.id
|
||||||
def_col[i] = entry.definition
|
def_col[i] = entry.definition
|
||||||
@ -388,6 +390,13 @@ def run(config):
|
|||||||
# Fill value
|
# Fill value
|
||||||
dcols[tag][0][i] = value
|
dcols[tag][0][i] = value
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print("\nCould not import sequence id:", entry.id, "(error raised:", e, ")")
|
||||||
|
if 'skiperror' in config['obi'] and not config['obi']['skiperror']:
|
||||||
|
raise e
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
i+=1
|
i+=1
|
||||||
|
|
||||||
if pb is not None:
|
if pb is not None:
|
||||||
|
Reference in New Issue
Block a user