import: now automatically renames scientific_name
tag to
`SCIENTIFIC_NAME`, and suggests using `--input-na-string` when a sequence import fails
This commit is contained in:
@ -406,6 +406,8 @@ def run(config):
|
|||||||
tag = TAXID_COLUMN
|
tag = TAXID_COLUMN
|
||||||
if tag == b"count":
|
if tag == b"count":
|
||||||
tag = COUNT_COLUMN
|
tag = COUNT_COLUMN
|
||||||
|
if tag == b"scientific_name":
|
||||||
|
tag = SCIENTIFIC_NAME_COLUMN
|
||||||
if tag[:7] == b"merged_":
|
if tag[:7] == b"merged_":
|
||||||
tag = MERGED_PREFIX+tag[7:]
|
tag = MERGED_PREFIX+tag[7:]
|
||||||
|
|
||||||
@ -516,7 +518,7 @@ def run(config):
|
|||||||
dcols[tag][0][i] = value
|
dcols[tag][0][i] = value
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("\nCould not import sequence:", repr(entry), "(error raised:", e, ")")
|
print("\nCould not import sequence:\n", repr(entry), "\nError raised:", e, "\n/!\ Check if '--input-na-string' option needs to be set")
|
||||||
if 'skiperror' in config['obi'] and not config['obi']['skiperror']:
|
if 'skiperror' in config['obi'] and not config['obi']['skiperror']:
|
||||||
raise e
|
raise e
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user