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