Package: wgscovplot
wgscovplotwgscovplotgenerates interactive comparative sequencing coverage plots in self-contained, offline-friendly HTML files with optional annotation of variant calling results, PCR amplicon coverage and genetic features.Live example outputInstallationPyPIInstall from PyPI withpippipinstallwgscovplotIf the installation was successful, you should be able to typewgscovplot --helpand get a help message on how to use the tool.SourceUsepipto install from source:# optionally, create a virtual environmentpython-mvenvvenvsourcevenv/bin/activate# install from GitHub repopipinstallgit+https://github.com/nhhaidee/wgscovplot.git# run wgscovplotwgscovplot--help
wgscovplot/path/to/results_folderFeaturesEasy-to-use: Simply provide a Nextflow output directory containing  andwgscovplotwill figure out what files it needs to generate its interactive sequencing coverage plotsCompatible workflows:nf-core/viralrecon[CFIA-NCFAD/nf-virontus]CFIA-NCFAD/nf-fluFully-interactive plots featuring:Zoom, scroll, pan, select regions of interestInformative tooltips highlighting variant calling results and coverage statistics across all samples being shownChange the y-axis scale to linear or log scaleSelect which samples to show (and which Influenza gene segments to show)Highlight regions of interest (e.g. genetic features, primer/probe binding sites, low coverage regions)Annotate coverage plots with variant calling results from multiple different variant callers and variant effect results fromSnpEff/SnpSiftSupported variant callers:iVar,Nanopolish,Longshot,Medaka,Clair3Compare sequencing coverage across multiple samplesUsageBasic usage will output awgscovplot.htmlfile in the current directory:wgscovplot/path/to/results_folderShow help info with$ wgscovplot --help:Usage: wgscovplot [OPTIONS] INPUT_DIR

╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *    input_dir      PATH  Directory containing Mosdepth and variant calling results from sequence analysis. For example, the output directory from execution of the nf-core/viralrecon or CFIA-NCFAD/nf-flu Nextflow workflow                │
│                           [default: None]                                                                                                                                                                                                    │
│                           [required]                                                                                                                                                                                                         │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --output-html             -o                          PATH                             wgscovplot HTML output file [default: wgscovplot.html]                                                                                                │
│ --primers-fasta           -p                          PATH                             FASTA file containing real-time PCR primer/probe sequences. [default: None]                                                                           │
│ --low-coverage-threshold  -l                          INTEGER                          Low sequencing coverage threshold. [default: 10]                                                                                                      │
│ --edit-distance           -d                          INTEGER                          The maximum differences or 'edits' allowed between real-time PCR primer/probe sequences and the sample sequences. [default: 0]                        │
│ --compress-depths             --no-compress-depths                                     Compress coverage depth arrays? [default: compress-depths]                                                                                            │
│ --verbose                 -v                                                           Verbose logs                                                                                                                                          │
│ --force                   -f                                                           Force overwrite of existing output files                                                                                                              │
│ --version                     --no-version                                             Print wgscovplot version and exit [default: no-version]                                                                                               │
│ --install-completion                                  [bash|zsh|fish|powershell|pwsh]  Install completion for the specified shell. [default: None]                                                                                           │
│ --show-completion                                     [bash|zsh|fish|powershell|pwsh]  Show completion for the specified shell, to copy it or customize the installation. [default: None]                                                    │
│ --help                                                                                 Show this message and exit.                                                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

 wgscovplot version 0.3.0; Python 3.11.6DependenciesPython(>=3.9)BioPythonfor all things bioinformaticsrichfor pretty terminal outputtyperfor CLIPandasfor data wranglingjinja2for HTML templatingEdlibfor fuzzy string matchingTypescript/JavascriptEchartsfor performant generating interactive plotsSolidJSfor reactive UI componentsVitefor TS/JS dev and building bundleTailwind CSSfor stylingDevelopmentThis project has two main components: a Python "backend" (CLI that spits out a templated HTML with built JS embedded) and a Javascript frontend.Python backend development is done in thewgscovplotdirectory.Web frontend development is done in thewebdirectory. The frontend is built withVite,SolidJSandECharts.EnvironmentPython development is recommended with PyCharm. Jetbrains IDEs have great support for Python development and virtual environments.Jetbrains IDEs work great for Typescript/Javascript development as well, but any editor will do if you have Vite live reload enabled.Setup# clone repogitclonehttps://github.com/nhhaidee/wgscovplot.gitcdwgscovplot# optionally, create a virtual environmentpython-mvenvvenvsourcevenv/bin/activate# install dev dependenciespipinstallhatch# start shell with Hatchhatchshell# run linting with Hatchhatchrunlint:all# run tests with HatchhatchruncovFrontend developmentSeeweb/README.mdfor more details.AuthorsDevelopment Lead:Peter KruczkiewiczSoftware Developer:Hai NguyenLicenseCopyright 2024 Canadian Food Inspection Agency of Canada, Government of Canada.Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License at:http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.