Added view type property to OBIView cython class and updated obi export
to use it
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
from obitools3.apps.progress cimport ProgressBar # @UnresolvedImport
|
||||
from obitools3.obidms._obidms import OBIDMS, OBIView_NUC_SEQS # TODO cimport doesn't work
|
||||
from obitools3.obidms._obidms import OBIDMS # TODO cimport doesn't work
|
||||
from obitools3.utils cimport bytes2str
|
||||
|
||||
import time
|
||||
@ -56,8 +56,10 @@ def run(config):
|
||||
# Open input view
|
||||
iview = d.open_view(config['obi']['inputview'])
|
||||
|
||||
print(iview.type)
|
||||
|
||||
# TODO check that the view has the type NUC_SEQS
|
||||
if ((config['export']['format'] == "fasta") or (config['export']['format'] == "fastq")) and (isinstance(iview, OBIView_NUC_SEQS) == False) :
|
||||
if ((config['export']['format'] == "fasta") or (config['export']['format'] == "fastq")) and (iview.type != "NUC_SEQS_VIEW") : # TODO find a way to import those macros
|
||||
raise Exception("Error: the view to export in fasta or fastq format is not a NUC_SEQS view")
|
||||
|
||||
# Initialize the progress bar
|
||||
|
Reference in New Issue
Block a user