diff --git a/python/obitools3/commands/export.pyx b/python/obitools3/commands/export.pyx index 4d3bca8..9cd1a50 100755 --- a/python/obitools3/commands/export.pyx +++ b/python/obitools3/commands/export.pyx @@ -59,13 +59,23 @@ def run(config): # 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 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 if config['obi']['noprogressbar']: pb = None else: - pb = ProgressBar(len(iview), config, seconde=5) - + pb = ProgressBar(withoutskip - skip, config, seconde=5) + i=0 for seq in iview : PyErr_CheckSignals()