Added properties for Nuc_Seq cython classes (and updated commands using
them)
This commit is contained in:
@ -90,7 +90,7 @@ def addOptions(parser):
|
||||
|
||||
# TODO: Handling of NA values
|
||||
def run(config):
|
||||
pb = ProgressBar(35000000, config, seconde=5)
|
||||
pb = ProgressBar(10000, config, seconde=5) # TODO should be number of records in file
|
||||
|
||||
inputs = uopen(config['import']['filename'])
|
||||
|
||||
@ -107,25 +107,24 @@ def run(config):
|
||||
|
||||
# Create DMS
|
||||
d = OBIDMS(config['obi']['defaultdms'])
|
||||
|
||||
|
||||
# Create view
|
||||
view = d.new_view(config['import']['destview'], view_type=view_type, quality_column=get_quality)
|
||||
|
||||
i = 0
|
||||
for seq in iseq:
|
||||
pb(i)
|
||||
view[i].set_id(seq['id'])
|
||||
view[i].set_definition(seq['definition'])
|
||||
view[i].set_sequence(seq['sequence'])
|
||||
view[i].id = seq['id']
|
||||
view[i].definition = seq['definition']
|
||||
view[i].nuc_seq = seq['sequence']
|
||||
if get_quality :
|
||||
view[i].set_quality(seq['quality'])
|
||||
view[i].quality = seq['quality']
|
||||
for tag in seq['tags'] :
|
||||
view[i][tag] = seq['tags'][tag]
|
||||
i+=1
|
||||
|
||||
print(view.__repr__())
|
||||
#print(view.__repr__())
|
||||
|
||||
view.close()
|
||||
d.close()
|
||||
|
||||
print("Done.")
|
||||
|
Reference in New Issue
Block a user