export: fixed progress bar bug
This commit is contained in:
@ -59,13 +59,23 @@ def run(config):
|
|||||||
# Check that the input view has the type NUC_SEQS if needed # TODO discuss, maybe bool property
|
# Check that the input view has the type NUC_SEQS if needed # TODO discuss, maybe bool property
|
||||||
if (output[2] == Nuc_Seq) and (iview.type != b"NUC_SEQS_VIEW") : # Nuc_Seq_Stored? TODO
|
if (output[2] == Nuc_Seq) and (iview.type != b"NUC_SEQS_VIEW") : # Nuc_Seq_Stored? TODO
|
||||||
raise Exception("Error: the view to export in fasta or fastq format is not a NUC_SEQS view")
|
raise Exception("Error: the view to export in fasta or fastq format is not a NUC_SEQS view")
|
||||||
|
|
||||||
|
if config['obi']['only'] is not None:
|
||||||
|
withoutskip = min(input[4], config['obi']['only'])
|
||||||
|
else:
|
||||||
|
withoutskip = input[4]
|
||||||
|
|
||||||
|
if config['obi']['skip'] is not None:
|
||||||
|
skip = min(input[4], config['obi']['skip'])
|
||||||
|
else:
|
||||||
|
skip = 0
|
||||||
|
|
||||||
# Initialize the progress bar
|
# Initialize the progress bar
|
||||||
if config['obi']['noprogressbar']:
|
if config['obi']['noprogressbar']:
|
||||||
pb = None
|
pb = None
|
||||||
else:
|
else:
|
||||||
pb = ProgressBar(len(iview), config, seconde=5)
|
pb = ProgressBar(withoutskip - skip, config, seconde=5)
|
||||||
|
|
||||||
i=0
|
i=0
|
||||||
for seq in iview :
|
for seq in iview :
|
||||||
PyErr_CheckSignals()
|
PyErr_CheckSignals()
|
||||||
|
Reference in New Issue
Block a user