obi uniq: better error checking
This commit is contained in:
@ -481,15 +481,17 @@ def run(config):
|
|||||||
|
|
||||||
logger("info","obi uniq")
|
logger("info","obi uniq")
|
||||||
|
|
||||||
|
# Open the input
|
||||||
input = open_uri(config['obi']['inputURI'])
|
input = open_uri(config['obi']['inputURI'])
|
||||||
|
if input is None:
|
||||||
|
raise Exception("Could not read input view")
|
||||||
if input[2] != View_NUC_SEQS:
|
if input[2] != View_NUC_SEQS:
|
||||||
raise NotImplementedError('obi uniq only works on NUC_SEQS views')
|
raise NotImplementedError('obi uniq only works on NUC_SEQS views')
|
||||||
|
|
||||||
|
# Open the output
|
||||||
output = open_uri(config['obi']['outputURI'],
|
output = open_uri(config['obi']['outputURI'],
|
||||||
input=False,
|
input=False,
|
||||||
newviewtype=View_NUC_SEQS)
|
newviewtype=View_NUC_SEQS)
|
||||||
|
|
||||||
if output is None:
|
if output is None:
|
||||||
raise Exception("Could not create output view")
|
raise Exception("Could not create output view")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user