Skip to main content

A short description of your package

Project description

amp-depth-viz

visualise amplicon genome coverage by bokeh using mosdepth output

install

    conda create -n amp-depth-viz -c conda-forge -c bioconda -c nanoporetech fastcat python=3.14
    conda activate amp-depth-viz
    pip install amp-depth-viz

Instruction

    #running fastcat and provide a samplesheet
    #fastq_pass is the fastq_pass folder from the sars ONT run
    #samplesheet requests at least two columns: sampleID,barcode
    #It helps to filter the barcode and relate to right sampleID
    amp-depth-viz sample/sample_input.bed --fastq_pass Data/sars/fastq_pass --samplesheet samplesheet.csv --output test.html

    #if you already ran fastcat and have the per reads summary file, you can do 
    amp-depth-viz sample/sample_input.bed --fastcat_perreads Data/per-reads-summary.tsv --samplesheet samplesheet.csv --output test.html

Using import inner functions

    #import functions inside amp-depth-viz package
    from amp_depth_viz.main import *

    #load template from the package files -- add in 0.1.5
    template = load_template()

    #create plots
    fig_len, fig_qual, fig_cnt = plot_summary_plotly(file_path_to_fastcat_per_read_file)
    coverage_plot_plotly = plot_coverage_plotly(
            coverage_bed_file_from_mosdepth,
            threshold=20,
            xlim=30000,
            ylim=800,
            ncols=3,
            colors=Colors(),
        )
      
    #combine the plots and create html
    plotly_plot_combine([fig_len, fig_qual, fig_cnt, coverage_plot_plotly], template=template, output_path=output_path_to_save_html)

Usage

    usage: amp-depth-viz [-h] [--fastcat_perreads FASTCAT_PERREADS | --fastq_pass FASTQ_PASS] [--template TEMPLATE]
                     [--samplesheet SAMPLESHEET] [--output OUTPUT] [--xlim XLIM] [--ylim YLIM] [--threshold THRESHOLD]
                     [--threads THREADS] [--ncols NCOLS]
                     coveragebed

create wf-artic like amplicon coverage plots using bokeh

positional arguments:
  coveragebed           a full sample bed files contains all genome depth information from mosdepth

options:
  -h, --help            show this help message and exit
  --fastcat_perreads FASTCAT_PERREADS
                        per-read-stats.tsv output from fastcat
  --fastq_pass FASTQ_PASS
                        the fastq_folder from a sars cov run
  --template TEMPLATE   jinja2 template to render -- default in template/template.html
  --samplesheet SAMPLESHEET
                        An optional samplesheet to rename the barcode, at least two columns required: sampleID, barcode
  --output OUTPUT       html output file
  --xlim XLIM           max of the genome position
  --ylim YLIM           the expected max depth
  --threshold THRESHOLD
                        depth threshold for passing QC , default as 20
  --threads THREADS     max number of cpus to use for fastcat analysis
  --ncols NCOLS         number of columns to grid the plots in the html pages, default as 3
  --plot_package, -p {bokeh,plotly}
                        Choose a python plot package to make the plots,from the allowed options: bokeh, plotly

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amp_depth_viz-0.1.5.tar.gz (84.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amp_depth_viz-0.1.5-py3-none-any.whl (82.4 kB view details)

Uploaded Python 3

File details

Details for the file amp_depth_viz-0.1.5.tar.gz.

File metadata

  • Download URL: amp_depth_viz-0.1.5.tar.gz
  • Upload date:
  • Size: 84.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for amp_depth_viz-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a6daeaf1b61a6f7a1ca016ad9ecf42b85125c11c67b291fe837a5e91870f95b9
MD5 860524794f807c3cd327e6df989bf46d
BLAKE2b-256 653cf691945fca3b436c0730cf14a506fa5bbc1316c1927ad0202bb679876c8b

See more details on using hashes here.

File details

Details for the file amp_depth_viz-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: amp_depth_viz-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 82.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for amp_depth_viz-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7118fb2a61e62d3b3953f2343ba108be5b76e416565b872b00223bda08c51f0d
MD5 7b2094ed3815be5d86074eabff42123a
BLAKE2b-256 24ba2a813b0536df194cf1bf0b87e601f61379fc0bb0c6ba9b2393b1e0fba2cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page