### Install Minimap2 and Download Data Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/cookbook.md Installs minimap2 executables and downloads example datasets for the cookbook. Ensure the current directory is added to the PATH. ```sh # install minimap2 executables curl -L https://github.com/lh3/minimap2/releases/download/v2.28/minimap2-2.28_x64-linux.tar.bz2 | tar jxf - cp minimap2-2.28_x64-linux/{minimap2,k8,paftools.js} . export PATH="$PATH:`pwd`" # put the current directory on PATH # download example datasets curl -L https://github.com/lh3/minimap2/releases/download/v2.10/cookbook-data.tgz | tar zxf - ``` -------------------------------- ### Install Mappy from source Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/python/README.rst Install mappy from the minimap2 GitHub repository. Requires Cython. This method involves cloning the repository and running the setup script. ```shell git clone https://github.com/lh3/minimap2 cd minimap2 python setup.py install ``` -------------------------------- ### Install and Basic Mapping with Minimap2 Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/README.md Clone the repository, build minimap2, and perform a basic alignment. This example shows mapping long sequences against a reference genome. ```sh git clone https://github.com/lh3/minimap2 cd minimap2 && make # long sequences against a reference genome ./minimap2 -a test/MT-human.fa test/MT-orang.fa > test.sam ``` -------------------------------- ### Install QUAST (Basic) Source: https://github.com/ablab/quast/blob/master/README.md Installs the basic QUAST package. This is the recommended method for most users. ```bash ./setup.py install ``` -------------------------------- ### Flot Example: Real-time Line Chart Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/NEWS.txt A new example demonstrating a real-time line chart. ```javascript real-time line chart example ``` -------------------------------- ### Install Barrnap Source: https://github.com/ablab/quast/blob/master/quast_libs/barrnap/README.md Steps to install Barrnap from a tarball and add its binary directory to the PATH. ```bash cd $HOME tar zxvf barrnap-0.X.tar.gz echo "PATH=$PATH:$HOME/barrnap-0.x/bin" >> .bashrc (logout and log back in) ``` -------------------------------- ### Install zlib on Ubuntu Source: https://github.com/ablab/quast/blob/master/manual.html Installs the zlib development files required by QUAST on Ubuntu systems. ```bash sudo apt-get install zlib1g-dev ``` -------------------------------- ### Install QUAST (Full) Source: https://github.com/ablab/quast/blob/master/README.md Installs the full QUAST package, including tools for SV detection and reference genome detection in metagenomic datasets. ```bash ./setup.py install_full ``` -------------------------------- ### Install Mappy using pip Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/python/README.rst Install the mappy library using pip. This is the recommended method for most users. ```shell pip install --user mappy ``` -------------------------------- ### Install QUAST via pip Source: https://github.com/ablab/quast/blob/master/manual.html Installs the QUAST package using pip, the Python package installer. ```bash pip install quast ``` -------------------------------- ### Install Minimap2 from Release Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/README.md Download and extract precompiled Minimap2 binaries for Linux x86-64. Ensure you have curl and tar installed. ```shell curl -L https://github.com/lh3/minimap2/releases/download/v2.28/minimap2-2.28_x64-linux.tar.bz2 | tar -jxvf - ./minimap2-2.28_x64-linux/minimap2 ``` -------------------------------- ### Install QUAST via Homebrew Source: https://github.com/ablab/quast/blob/master/manual.html Installs the QUAST package using Homebrew, a package manager for macOS. ```bash brew install quast ``` -------------------------------- ### Complete Data Specification Example Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt An example showing an array of series objects, each with a label and associated data points. This format is used for plotting multiple series. ```javascript [ { label: "Foo", data: [ [10, 1], [17, -14], [30, 5] ] }, { label: "Bar", data: [ [11, 13], [19, 11], [30, -7] ] } ] ``` -------------------------------- ### Install and Basic Usage of BWA Source: https://github.com/ablab/quast/blob/master/quast_libs/bwa/README.md Steps to clone the BWA repository, compile it, index a reference genome, and perform alignments for single-end and paired-end reads. ```bash git clone https://github.com/lh3/bwa.git cd bwa; make ./bwa index ref.fa ./bwa mem ref.fa read-se.fq.gz | gzip -3 > aln-se.sam.gz ./bwa mem ref.fa read1.fq read2.fq | gzip -3 > aln-pe.sam.gz ``` -------------------------------- ### Install minimap2 and k8 Javascript shell Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/misc/README.md Installs minimap2 via git clone and make, and downloads the k8 Javascript shell. Ensure k8 is on your PATH for paftools.js execution. ```sh # install minimap2 git clone https://github.com/lh3/minimap2 cd minimap2 && make # install the k8 javascript shell curl -L https://github.com/attractivechaos/k8/releases/download/v0.2.4/k8-0.2.4.tar.bz2 | tar -jxf - cp k8-0.2.4/k8-`uname -s` k8 # or copy it to a directory on your $PATH # export PATH="$PATH:`pwd`:`pwd`/misc" # run this if k8, minimap2 or paftools.js not on your $PATH ``` -------------------------------- ### Plugin Usage Example Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/PLUGINS.txt Illustrates how to include and use the 'simpledebug' plugin in an HTML page with specific options. ```javascript $.plot($("#placeholder"), [...], { debug: 2 }); ``` -------------------------------- ### Download and Setup Bwakit, Generate Reference, and Map Reads Source: https://github.com/ablab/quast/blob/master/quast_libs/bwa/bwakit/README.md This snippet demonstrates the complete workflow: downloading Bwakit, generating a human reference genome with ALT and HLA information, creating a BWA index, and performing read mapping using `run-bwamem`. The mapping command is piped to `sh` for execution. ```bash # Download the bwa-0.7.11 binary package (download link may change) wget -O- http://sourceforge.net/projects/bio-bwa/files/bwakit/bwakit-0.7.12_x64-linux.tar.bz2/download \ | gzip -dc | tar xf - # Generate the GRCh38+ALT+decoy+HLA and create the BWA index bwa.kit/run-gen-ref hs38DH # download GRCh38 and write hs38DH.fa bwa.kit/bwa index hs38DH.fa # create BWA index # mapping bwa.kit/run-bwamem -o out -H hs38DH.fa read1.fq read2.fq | sh ``` -------------------------------- ### Install QUAST via Bioconda Source: https://github.com/ablab/quast/blob/master/manual.html Installs the QUAST package using Bioconda, a channel for bioinformatics software on Conda. ```bash conda install -c bioconda quast ``` -------------------------------- ### Basic Mappy Usage Example Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/python/README.rst Demonstrates key mappy functionalities: loading an index, retrieving a subsequence, computing its reverse complement, and aligning sequences from a FASTA/FASTQ file. ```python import mappy as mp a = mp.Aligner("test/MT-human.fa") # load or build index if not a: raise Exception("ERROR: failed to load/build index") s = a.seq("MT_human", 100, 200) # retrieve a subsequence from the index print(mp.revcomp(s)) # reverse complement for name, seq, qual in mp.fastx_read("test/MT-orang.fa"): # read a fasta/q sequence for hit in a.map(seq): # traverse alignments print("{}\t{}\t{}\t{}".format(hit.ctg, hit.r_st, hit.r_en, hit.cigar_str)) ``` -------------------------------- ### Install Matplotlib on Ubuntu Source: https://github.com/ablab/quast/blob/master/manual.html Installs the Matplotlib Python library and its dependencies on Ubuntu systems, required for generating PDF plots. ```bash sudo apt-get install -y pkg-config libfreetype6-dev libpng-dev python-matplotlib ``` -------------------------------- ### Complete Debug Plugin Example Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/PLUGINS.txt A comprehensive example of a debug plugin that alerts series information. It utilizes options to control debug level and hooks into 'processDatapoints' and 'processOptions'. ```javascript (function ($) { function init(plot) { var debugLevel = 1; function checkDebugEnabled(plot, options) { if (options.debug) { debugLevel = options.debug; plot.hooks.processDatapoints.push(alertSeries); } } function alertSeries(plot, series, datapoints) { var msg = "series " + series.label; if (debugLevel > 1) msg += " with " + series.data.length + " points"; alert(msg); } plot.hooks.processOptions.push(checkDebugEnabled); } var options = { debug: 0 }; $.plot.plugins.push({ init: init, options: options, name: "simpledebug", version: "0.1" }); })(jQuery); ``` -------------------------------- ### Example Contig with Multiple Misassemblies Source: https://github.com/ablab/quast/blob/master/manual.html This example illustrates a contig with multiple extensive misassemblies, specifically relocations, and also a local misassembly. It provides details on the contig, its length, and the types and counts of misassemblies. ```text CONTIG: **Contig_753 (140518bp)** Top Length: 121089 Top ID: 99.98 Skipping redundant alignments after choosing the best set of alignments Skipping redundant alignment 273398 273468 | 18977 18907 | 71 71 | 100.0 | Escherichia_coli Contig_753 _...._ Skipping redundant alignment 3363797 3363867 | 18977 18907 | 71 71 | 100.0 | Escherichia_coli Contig_753 This contig is misassembled. 14 total aligns. Real Alignment 1: 1425621 1426074 | 19431 18978 | 454 454 | 100.0 | Escherichia_coli Contig_753 _Gap between these two alignments (local misassembly)_. Inconsistency = 148 Real Alignment 2: 1426295 1426818 | 18905 18382 | 524 524 | 100.0 | Escherichia_coli Contig_753 **Extensive misassembly ( relocation, inconsistency = 2224055 )** between these two alignments Real Alignment 3: 3650278 3650348 | 18977 18907 | 71 71 | 100.0 | Escherichia_coli Contig_753 **Extensive misassembly ( relocation, inconsistency = 236807 )** between these two alignments Real Alignment 4: 3765544 3886652 | 140518 19430 | 121109 121089 | 99.98 | Escherichia_coli Contig_753 **Extensive misassembly ( relocation, inconsistency = -1052 )** between these two alignments Real Alignment 5: 3886649 3905037 | 18381 1 | 18389 18381 | 99.96 | Escherichia_coli Contig_753 ``` -------------------------------- ### Install k8 Javascript shell Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/misc/README.md Downloads and installs the k8 Javascript shell, a prerequisite for running paftools.js scripts. It is recommended to place the executable in a directory included in your system's PATH. ```sh curl -L https://github.com/attractivechaos/k8/releases/download/v0.2.4/k8-0.2.4.tar.bz2 | tar -jxf - cp k8-0.2.4/k8-`uname -s` $HOME/bin/k8 # assuming $HOME/bin in your $PATH ``` -------------------------------- ### Basic QUAST Usage Example Source: https://github.com/ablab/quast/blob/master/README.md A typical command-line usage of QUAST to evaluate assemblies. It specifies input contigs, a reference genome, gene information, paired-end reads, and an output directory. ```bash ./quast.py test_data/contigs_1.fasta \ test_data/contigs_2.fasta \ -r test_data/reference.fasta.gz \ -g test_data/genes.txt \ -1 test_data/reads1.fastq.gz -2 test_data/reads2.fastq.gz \ -o quast_test_output ``` -------------------------------- ### Basic Flot Plotting Example Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/README.txt Demonstrates a basic Flot plot with a line from (0,0) to (1,1). Ensure the placeholder div has defined width and height and is not hidden. ```javascript $.plot($("#placeholder"), [ [[0, 0], [1, 1]] ], { yaxis: { max: 1 } }); ``` -------------------------------- ### MetaQUAST References List Example Source: https://github.com/ablab/quast/blob/master/manual.html A sample file for the --references-list option in MetaQUAST. Each line contains a reference genome name to be searched in the NCBI database. ```text Lactobacillus_plantarum Lactobacillus reuteri DSM 20016 Lactobacillus_psittaci Harry Potter ``` -------------------------------- ### Data Transformation with processDatapoints Hook Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Example of the processDatapoints hook for transforming data after normalization but before min/max calculation. This example multiplies all y-coordinates by 2. ```javascript function multiply(plot, series, datapoints) { var points = datapoints.points, ps = datapoints.pointsize; for (var i = 0; i < points.length; i += ps) points[i + 1] *= 2; } ``` -------------------------------- ### Define and Install a Draw Hook Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Install a custom callback function to execute during the drawing phase. Hooks allow for modification of the plotting process by accessing internal data structures. ```javascript function hellohook(plot, canvascontext) { alert("hello!"); }; var plot = $.plot(placeholder, data, { hooks: { draw: [hellohook] } }); ``` -------------------------------- ### Get basic alignment statistics Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/misc/README.md Calculates basic alignment statistics using minimap2 and paftools.js stat. ```sh minimap2 -c test/MT-human.fa test/MT-orang.fa | paftools.js stat - # basic alignment statistics ``` -------------------------------- ### Download and Extract QUAST Tarball Source: https://github.com/ablab/quast/blob/master/manual.html Downloads the QUAST source code tarball and extracts it, preparing for installation or in-place use. ```bash wget https://github.com/ablab/quast/releases/download/quast_5.3.0/quast-5.3.0.tar.gz tar -xzf quast-5.3.0.tar.gz cd quast-5.3.0 ``` -------------------------------- ### Assemble Reads with Miniasm Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/cookbook.md If miniasm is installed, it can be used with the generated overlap PAF file to create an assembly graph in GFA format. ```bash miniasm -f ecoli_p6_25x_canu.fa overlap.paf > asm.gfa ``` -------------------------------- ### Configuring Multiple Axes Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Configure multiple x and y axes using the 'xaxes' and 'yaxes' arrays in the options. This example sets up a top x-axis and a right-positioned y-axis with a minimum value. ```javascript { xaxes: [ { position: "top" } ], yaxes: [ { }, { position: "right", min: 20 } ] } ``` -------------------------------- ### Specify Series Gradient with Opacity and Brightness Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Specify a gradient for series colors, controlling opacity and brightness. This example shows bars gradually disappearing. ```javascript bars: { show: true, lineWidth: 0, fill: true, fillColor: { colors: [ { opacity: 0.8 }, { opacity: 0.1 } ] } } ``` -------------------------------- ### Example SNP Information Line Source: https://github.com/ablab/quast/blob/master/manual.html This line represents the format of the .used_snps file, detailing reference genome name, contig name, position, reference nucleotide, contig nucleotide ('.' for deletion), and position on the contig. ```text Escherichia_coli contig_15 728803 C . 3217983 ``` -------------------------------- ### Real Alignment Format Explanation Source: https://github.com/ablab/quast/blob/master/manual.html This example details the structure of a 'Real Alignment' entry in QUAST contigs reports. It breaks down the meaning of each field, including positions, aligned bases, and alignment quality (IDY%). ```text Real Alignment 1: 19796 20513 | 29511 30228 | 718 718 | 100.0 | ENA|U00096|U00096.2_Escherichia_coli contig-710 ``` -------------------------------- ### BEDPE Format Example for Translocation Source: https://github.com/ablab/quast/blob/master/manual.html An example of a BEDPE file line for a translocation. It specifies different chromosomes for the start and end of the variation, automatically identifying it as a translocation. ```text chr1 450 550 chr2 100 100 name_does_not_matter_here ``` -------------------------------- ### BEDPE Format Example for Deletion Source: https://github.com/ablab/quast/blob/master/manual.html An example of a BEDPE file line for a deletion. It includes chromosome, start and end positions for both ends, and 'DEL' in the name to indicate a deletion. ```text S.aureus 995 1010 S.aureus 1195 1205 DEL ``` -------------------------------- ### BEDPE Format Example for Inversion Source: https://github.com/ablab/quast/blob/master/manual.html An example of a BEDPE file line for an inversion. It specifies the chromosome, start and end positions for both ends of the variation, and a name containing 'INV'. ```text E.coli 995 1010 E.coli 1195 1205 This_is_INVersion The Rest Columns Are Optional ``` -------------------------------- ### Get JavaScript Timestamp Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Demonstrates how to get the current JavaScript timestamp in milliseconds. ```javascript alert((new Date()).getTime()) ``` -------------------------------- ### Download and Index GRCh38 with ALT Contigs Source: https://github.com/ablab/quast/blob/master/quast_libs/bwa/README-alt.md Download BWA-KIT, generate the GRCh38+ALT+decoy+HLA reference, and create the BWA index. This is a prerequisite for mapping reads against the ALT-aware reference. ```sh # Download bwakit (or from manually) wget -O- http://sourceforge.net/projects/bio-bwa/files/bwakit/bwakit-0.7.12_x64-linux.tar.bz2/download \ | gzip -dc | tar xf - # Generate the GRCh38+ALT+decoy+HLA and create the BWA index bwa.kit/run-gen-ref hs38DH # download GRCh38 and write hs38DH.fa bwa.kit/bwa index hs38DH.fa # create BWA index # mapping bwa.kit/run-bwamem -o out -H hs38DH.fa read1.fq read2.fq | sh # skip "|sh" to show command lines ``` -------------------------------- ### Get Plotting Area Dimensions Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Get the width and height of the plotting area inside the grid, excluding space for labels. ```javascript width() ``` ```javascript height() ``` -------------------------------- ### Compile Minimap2 from Source Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/README.md Compile Minimap2 from source. Requires a C compiler, GNU make, and zlib development files. Use `make sse2only=1` to disable SSE4 if compilation fails. ```shell make ``` ```shell make sse2only=1 ``` -------------------------------- ### Example Misassembled Contig Report Source: https://github.com/ablab/quast/blob/master/manual.html This example shows a contig identified as having an extensive misassembly (inversion). It details the contig name, length, number of alignments, and the type of misassembly. ```text CONTIG: **NODE_772 (575bp)** Top Length: 296 Top ID: 100.0 Skipping redundant alignment 1096745 1096882 | 138 1 | 138 138 | 98.55 | Escherichia_coli NODE_772 This contig is misassembled. 3 total aligns. Real Alignment 1: 924846 925134 | 287 575 | 289 289 | 100.0 | Escherichia_coli NODE_772 **Extensive misassembly ( inversion )** between these two alignments Real Alignment 2: 924906 925201 | 296 1 | 296 296 | 100.0 | Escherichia_coli NODE_772 ``` -------------------------------- ### Minimap2 Algorithm Overview: Seeding and Chaining Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/README.md Steps 3 and 4 describe finding seeds by checking query minimizers against the reference index and then sorting and chaining these seeds by reference position. ```bash minimap2 -f [=*2e-4*] -K [=*200M*] ``` -------------------------------- ### Accessing Minimap2 Manual Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/README.md View the detailed manual page for minimap2 to understand all command-line options and parameters. ```sh man ./minimap2.1 ``` -------------------------------- ### Series-Specific Options Configuration Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/PLUGINS.txt Demonstrates how to define options that are specific to each series within the main options object, using the 'series' key. ```javascript var options = { series: { downsample: { algorithm: null, maxpoints: 1000 } } } ``` -------------------------------- ### Run QUAST with Custom Metrics Source: https://github.com/ablab/quast/blob/master/docs_for_devs/how_to_add_a_metric.md Execute QUAST with your input files to generate a report that includes your newly added metric. Check the `report.txt` file within the generated `quast_results` folder to verify. ```bash ./quast.py test_data/contigs_1.fasta \ test_data/contigs_2.fasta \ -r test_data/reference.fasta.gz \ -g test_data/genes.gff ``` -------------------------------- ### Minimap2 Algorithm Overview: Indexing Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/README.md Step 1 of the Minimap2 algorithm involves reading reference bases, extracting minimizers using -k and -w options, and indexing them in a hash table. ```bash minimap2 -I [=*4G*] -k [=*21*] -w [=*21*] reference.fasta ``` -------------------------------- ### Python Timestamp Generation Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Example of generating a JavaScript timestamp in Python for a specific date. ```python 'calendar.timegm(datetime_object.timetuple()) * 1000' ``` -------------------------------- ### PHP Timestamp Generation Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Example of generating a JavaScript timestamp in PHP for a specific date. ```php 'strtotime("2002-02-20 UTC") * 1000' ``` -------------------------------- ### Compile Minimap2 with SIMDe Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/README.md Compile Minimap2 using the SIMDe library for cross-platform SIMD support. Use `Makefile.simde`. ```shell make -f Makefile.simde ``` -------------------------------- ### Execute paftools.js script Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/misc/README.md Demonstrates two methods for executing paftools.js scripts: directly if k8 is in the PATH, or by invoking k8 with the script path. ```sh path/to/paftools.js # only if k8 is on your $PATH k8 path/to/paftools.js ``` -------------------------------- ### View Alignment in BLAST-like Format Source: https://github.com/ablab/quast/blob/master/quast_libs/minimap2/cookbook.md Display alignment results in a human-readable, BLAST-like format using `paftools.js view`. Requires `--cs` option and minimap2-r741 or higher for `asm20` preset. ```bash # option "--cs" required; minimap2-r741 or higher required for the "asm20" preset minimap2 -cx asm20 --cs ecoli_ref.fa ecoli_O104:H4.fa | paftools.js view - | less -S ``` -------------------------------- ### Basic Plugin Structure Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/PLUGINS.txt Demonstrates the fundamental structure for creating a Flot plugin by defining an init function and adding it to the $.plot.plugins array. ```javascript function myCoolPluginInit(plot) { plot.coolstring = "Hello!"; }; $.plot.plugins.push({ init: myCoolPluginInit, options: { ... } }); ``` -------------------------------- ### getPlotOffset() Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Gets the offset of the grid within the canvas. Returns an object with distances from the canvas edges (left, right, top, bottom). ```APIDOC ## getPlotOffset() ### Description Gets the offset of the grid within the canvas. Returns an object with distances from the canvas edges (left, right, top, bottom). ### Returns - Object: An object with `left`, `right`, `top`, and `bottom` properties representing the grid offset. ``` -------------------------------- ### Access Axis Information Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Get an object containing all axes. Useful for accessing tick information or transformation functions (p2c, c2p). ```javascript var axes = getAxes(); var ticks = axes.xaxis.ticks; var canvasX = axes.xaxis.p2c(dataX); ``` -------------------------------- ### BamAlignment Construction and Utility Source: https://github.com/ablab/quast/blob/master/quast_libs/bedtools/src/bedpeToBam/notes.txt Includes constructor, destructor, and utility functions for building alignment string data and calculating end positions. ```APIDOC ## BamAlignment Construction and Utility Functions ### Description Provides constructors, a destructor, and utility methods for the BamAlignment class. ### Methods - `BamAlignment()`: Default constructor. - `BamAlignment(const BamAlignment &other)`: Copy constructor. - `~BamAlignment()`: Destructor. - `bool BuildCharData()`: Populates alignment string fields (read name, bases, qualities, tag data). - `int GetEndPosition(bool usePadded=false, bool zeroBased=true) const`: Calculates alignment end position, based on starting position and CIGAR data. ``` -------------------------------- ### Get Plotting Area Offset Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Returns the offset of the plotting area within the grid relative to the document. Useful for calculating mouse positions. ```javascript offset() ``` -------------------------------- ### Get Drawing Canvas Source: https://github.com/ablab/quast/blob/master/quast_libs/html_saver/static/flot/API.txt Obtain the canvas element used for drawing. This is useful for advanced customization or direct manipulation of the plot's rendering surface. ```javascript var canvas = plot.getCanvas(); ```