Package: covviz
covvizCoverage visualization; a many-sample coverage browser.The aim ofcovvizis to highlight regions of significant
(passing the user's z-score threshold) and sustained (beyond user specified
distance) deviation of coverage depth from the majority of samples. Significance is determined
using z-scores for all samples at all points using median absolute deviation.
In order for regions to be highlighted, points must be significant
consecutively throughout a user specified distance.If you are analyzing a low number of samples, deviation may be irrelevant. In
this case, we can set--min-samplesto be greater than our sample total
to skip Z-threshold calculation and plot coverages for all samples at all
points.Getting startedFrom alignments (.bam and/or .cram)Alignments must be indexed. The input for thecovvizworkflow are the indexes
of the alignments. For BAM, that would be .bai, and .crai for CRAM. Indexes
can be generated usingsamtoolson your
sorted alignments:samtools index mybam.bam
# generates mybam.bam.baiInstallation and usageInstallNextflowif you don't already have it. The only
dependency is Java 8 or later, then you run:curl -s https://get.nextflow.io | bashOr viaBiocondausing:conda install -c bioconda nextflowFull nextflow installation instructions are available at:https://www.nextflow.io/There is no need to download the covviz code prior to execution or any software dependencies
when using a container service like Docker or Singularity.Docker/SingularityTo simplify prerequisite software installations and software version tracking,
we strongly recommend runningcovvizusing Docker or Singularity. Docker
installation instructions for your operating system are available at:https://docs.docker.com/install/Then, with Docker or Singularity we run:nextflow run brwnj/covviz -latest -profile docker \
    --indexes 'data/indexes/*.crai' \
    --fai data/g1k_v37_decoy.fa.fai \
    --gff data/Homo_sapiens.GRCh37.82.gff3.gzWhich gives us./results/covviz_report.html.Required arguments--indexesquoted file path with wildcard ('*.crai') to cram or bam indexes--faifile path to .fai reference indexA complete list of arguments can be displayed using:nextflow run brwnj/covviz -latest --helpNextflow argumentsIn the example above-latestpulls whatever the latestcovvizcode exists on GitHub
prior to execution and-profile dockersets-with-dockerwithin Nextflow.Other notable options are-resume, which when running a workflow a second will start
where previous runs of the workflow left off; and-work-dirwhich sets the location of
all intermediate files generated throughout the workflow.From coverage intervals (.bed)ThecovvizCLI accepts bed3+ as input. If you've already generated your coverage
files you can start here and not the Nextflow workflow.If you would prefer to runindexcovyourself across your .bai or .crai files,
the workflow above simply runs:fai=data/g1k_v37_decoy.fa.fai
goleft indexcov --directory myproject --fai $fai *.craiThis will generate the expected inputs in their anticipated formats for thecovvizCLI.Expected file formatTo analyze your coverage data it needs to be in bed3+ format and include a
header with sample IDs. The first three column headers are agnostic, but
for samples test_sample1, test_sample2, and test_sample3, this would look like:#chrom   start   end   sample1   sample2   sample3Installation of CLI and usageTo install thecovvizPython package use:pip install -U covvizThen CLI usage is:covviz $bedA complete list of arguments can be displayed using:covviz --helpAdding custom metadata (.ped)There is support for non-indexcov .ped files, though you may have to change
the default column IDs pertaining to the column which contains the sample ID
and the sex of the sample.covviz --ped $ped --sample-col sample_col --sex sex_col $bedAdding annotation tracksCurrently we support GFF, VCF, and BED. GFF tracks are added using--gffwhere features are 'gene' and attributes have 'Name='. Feature type and
attribute regex can be configured using--gff-featureand--gff-attr.VCF tracks (v4.1) are added with--vcfwith the entire INFO string
being displayed by default. Specifying--vcf-infowith something like
'CLNDN=' will grab just that field when using ClinVar variants. Including
large INFO strings for all variants can dramatically increase the size
of the covviz report.Region based annotation tracks can be added using--bed. The name field
will be used to identify the regions when present.Annotation tracks,--gff,--vcf, and--bed, may be specified
multiple times.In all cases, 'chr' will be stripped from the chromosome names.Interpreting the outputInteractive exampleSee:https://brwnj.github.io/covviz/Scaled chromosome coverageSignificant regions will be displayed in color atop a gray region which
represents the upper and lower bounds of a given point minus any values
deemed significant.When plotting fewer samples than--min-samples, the gray area plot
will not be displayed. Instead, all sample plot traces will be shown.Proportions coveredThe metadata table will be displayed below the plots.InteractionClicking on plot traces highlights the line and searches the metadata.
Double-clicking de-selects lines, resets the plot, and de-selects
samples from the table. Clicking on the gene track launches a search
for the gene's respective Gene Card. In cases where genes overlap,
multiple windows/tabs will be opened.