Add the possibility to create temporary objects like a temporary
directory and a temporary DMS
This commit is contained in:
@ -13,6 +13,8 @@ from obitools3.dms.view.view cimport View
|
||||
from obitools3.dms.view.typed_view.view_NUC_SEQS import View_NUC_SEQS # TODO cimport doesn't work
|
||||
from obitools3.dms.column.column cimport Column
|
||||
|
||||
from obitools3.dms.obiseq import Nuc_Seq
|
||||
|
||||
from obitools3.utils cimport tobytes, \
|
||||
get_obitype, \
|
||||
update_obitype
|
||||
@ -25,6 +27,8 @@ from obitools3.dms.capi.obierrno cimport obi_errno
|
||||
from obitools3.apps.optiongroups import addSequenceInputOption, addMinimalOutputOption
|
||||
from obitools3.uri.decode import open_uri
|
||||
|
||||
from obitools3.apps.config import logger
|
||||
|
||||
__title__="Imports sequences from different formats into a DMS"
|
||||
|
||||
|
||||
@ -76,17 +80,26 @@ def run(config):
|
||||
cdef list new_elements_names
|
||||
cdef ProgressBar pb
|
||||
global obi_errno
|
||||
|
||||
|
||||
|
||||
logger=config['obi']['logger']
|
||||
|
||||
|
||||
logger.info("obi import : imports file into an DMS")
|
||||
logger("info","obi import : imports file into an DMS")
|
||||
|
||||
inputs = open_uri(config['obi']['inputURI'])
|
||||
|
||||
print(inputs)
|
||||
if inputs[2]==Nuc_Seq:
|
||||
v = View_NUC_SEQS
|
||||
else:
|
||||
v= View
|
||||
|
||||
print(v)
|
||||
|
||||
output = open_uri(config['obi']['outputURI'],
|
||||
input=False,
|
||||
newviewtype=v)
|
||||
|
||||
print(input)
|
||||
print(output)
|
||||
|
||||
sys.exit()
|
||||
|
||||
# pb = ProgressBar(1000000, config, seconde=5) # TODO should be number of records in file
|
||||
|
Reference in New Issue
Block a user