import command a bit modified for tests
This commit is contained in:
@ -92,9 +92,7 @@ def addOptions(parser):
|
|||||||
|
|
||||||
|
|
||||||
def run(config):
|
def run(config):
|
||||||
#pb = ProgressBar(1000,config,seconde=1)
|
pb = ProgressBar(35000000,config,seconde=5)
|
||||||
|
|
||||||
print(config)
|
|
||||||
|
|
||||||
inputs = uopen(config['import']['filename'])
|
inputs = uopen(config['import']['filename'])
|
||||||
|
|
||||||
@ -107,6 +105,9 @@ def run(config):
|
|||||||
else:
|
else:
|
||||||
raise RuntimeError('No file format specified')
|
raise RuntimeError('No file format specified')
|
||||||
|
|
||||||
|
# Temporary way to handle NA values
|
||||||
|
NA_list = ["nan"]
|
||||||
|
|
||||||
# Create DMS
|
# Create DMS
|
||||||
d = OBIDMS(config['obi']['defaultdms'])
|
d = OBIDMS(config['obi']['defaultdms'])
|
||||||
|
|
||||||
@ -115,17 +116,18 @@ def run(config):
|
|||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
for seq in iseq:
|
for seq in iseq:
|
||||||
#pb(i)
|
pb(i)
|
||||||
view[i].set_id(seq['id'])
|
view[i].set_id(seq['id'])
|
||||||
view[i].set_definition(seq['definition'])
|
view[i].set_definition(seq['definition'])
|
||||||
view[i].set_sequence(seq['sequence'])
|
view[i].set_sequence(seq['sequence'])
|
||||||
# for tag in seq['tags'] :
|
for tag in seq['tags'] :
|
||||||
#print(tag, seq['tags'][tag])
|
#print(tag, seq['tags'][tag])
|
||||||
# view[i][tag] = seq['tags'][tag]
|
#if seq['tags'][tag] not in NA_list :
|
||||||
|
view[i][tag] = seq['tags'][tag]
|
||||||
i+=1
|
i+=1
|
||||||
|
|
||||||
print(view)
|
print(view)
|
||||||
print(view.__repr__())
|
# print(view.__repr__())
|
||||||
|
|
||||||
view.save_and_close()
|
view.save_and_close()
|
||||||
d.close()
|
d.close()
|
||||||
|
Reference in New Issue
Block a user