.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_benchmark.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_benchmark.py: Converter benchmarking =========================== Converter have a default method. Notem however, that several methods may be available. Moreover, you may have a method that you want to compare with the implemented one. To do so you will need to implement your method first. Then, simply use our benchmarking framework as follows. .. GENERATED FROM PYTHON SOURCE LINES 41-46 .. code-block:: Python from bioconvert import Benchmark from bioconvert import bioconvert_data from bioconvert.bam2cov import BAM2COV from bioconvert.fastq2fasta import FASTQ2FASTA .. GENERATED FROM PYTHON SOURCE LINES 47-48 Get the convert you wish to benchmark .. GENERATED FROM PYTHON SOURCE LINES 48-54 .. code-block:: Python input_file = bioconvert_data("test_measles.sorted.bam") conv = BAM2COV(input_file, "test.cov") # input_file = bioconvert_data("test_fastq2fasta_v1.fastq") # conv = FASTQ2FASTA(input_file, "test.fasta") .. GENERATED FROM PYTHON SOURCE LINES 55-56 Get the Benchmark instance .. GENERATED FROM PYTHON SOURCE LINES 56-61 .. code-block:: Python bench = Benchmark(conv) bench.plot() # You can now see the different methods implemented in this # converter and which one is the fastest. .. _sphx_glr_download_auto_examples_plot_benchmark.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_benchmark.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_benchmark.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_benchmark.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_