Package: bamdash
OverviewBAMdash lets you create interactive coverage plots from your bam file withplotlyrequiresonly a.bam,.baiand the reference id to which the reads where mappedcreatea interactivehtmlfor data explorationcreatea static image (jpg,png,pdf,svg) ready for publicationaddadditional tracks (supported:.vcf,.gb,.bed)annotatetracks with additional informationexportannoated track data as tabular files (.bed,.vcf) or json (.gb)developedfor viral genomicscustomizeall plotting parametersFeel free to report any bugs or request new features as issues!Automatic annotationBAMdash automatically computes serveral statistics:if-bsis > 1 it computes the mean over the bin size in the coverage plotfor each track it computes recovery and mean coverage (set-cfor the min coverage) for each element in the trackif a*.vcfis provided it annotatesTRANSITION/TRANSVERSIONand type of exchange (SNP,DEL,INS)If a*.gband*.vcfis provided BAMdash computes if the mutations could have been caused by APOBEC deamination.
Moreover, it annotates the aminoacid exchange and the effect in the CDS (inspired by but not as powerful assnpeff). SNP and INDEL vcf annotation supports:START_LOST: INDEL or SNP start at the CDS and result in a start lossSTOP_LOST: INDEL or SNP result in the loss of the stop codonSTOP_GAINED: INDEL or SNP result in an additional stop codonSYN: SNP does not lead to an amino acid changeNON-SYN: SNP leads to an amino acid changeAC_INSERTION: INS that does not change already present amino acidsAC_CHANGE+AC_INSERTION: INS where the affected codon is also non-synAC_DELETION: DEL that does not change already present amino acidsAC_CHANGE+AC_DELETION: DEL where the affected codon is also non-synFRAMESHIFT: INDEL that leads to a frameshiftThe nomenclature for the aminoacid effect is pretty simplified:A58Y- Exchange at pos 58 from A to YA58YY- Exchange at pos 58 from A to Y and insertion of an additional YAF58Y- Exchange at pos 58 from A to Y and deletion of the following FA58fsX- Frameshift at pos 58ExampleInstallationvia pip (recommened):pipinstallbamdashvia conda:condainstall-cbiocondabamdashfrom this repo:gitclonehttps://github.com/jonas-fuchs/BAMdashcdBAMcovand then install BAMdash with:pipinstall-rrequirements.txtor:pipinstall.That was already it. To check if it worked:bamdash-vYou should see the current BAMdash version.Usageusage:bamdash-bbam_file_path-rreference_id[additionalarguments]full usage:

  -h, --help            show this help message and exit
  -b  , --bam           bam file location
  -r  , --reference     seq reference id
  -q 15, --quality-threshold 15
                        qaulity threshold for reads
  -bs  , --binsize      bins for the coverage plot
  -t [track_1 ...], --tracks [track_1 ...]
                        file location of tracks
  -c 5, --coverage 5    minimum coverage
  --slider, --no-slider
                        show slider (default: False)
  -e None, --export_static None
                        export as png, jpg, pdf, svg
  -d px px, --dimensions px px
                        width and height of the static image in px
  --dump, --no-dump     dump annotated track data (default: False)
  -v, --version         show program's version number and exitTest bamDASHdownload the HEV example data:https://zenodo.org/api/records/10159816/files-archiveextract data, cd to folder and use bamdash:bamdash-bHEV.bam-rHEV-pat-1-tHEV.vcfHEVprim.bedHEVamp.bedHEV.gbCutomizationBAMcov plotting settings can be adjusted in in theconfig.py. Therefore, you have to clone this repo.Go to the configs location:cdBAMdash/bamdash/scripts/And open theconfig.pywith a text editor, e.g.:geditconfig.pyand adjust the settings:# pdf settingsshow_log=True# overall layoutvcf_track_proportion=0.3gb_track_proportion=0.5bed_track_proportion=0.2plot_spacing=0.05# coverage customizecoverage_fill_color="rgba(255, 212, 135, 0.2)"coverage_line_color="rgba(224, 168, 68, 1)"average_line_color="grey"average_line_width=1# track customizetrack_color_scheme="agsunset"# for mutiple annotations tracks (genebank)track_color_single="rgb(145, 145, 145)"# for single tracks (any rgb value, but no named colors)strand_types=["triangle-right","triangle-left","diamond-wide"]# +, -, undefined strandstrand_marker_size=8strand_marker_line_width=1strand_marker_line_color="rgba(0, 0, 0, 0.2)"box_bed_alpha=[0.6,0.6]# alpha values for boxes (bed)box_bed_size=[0.4,0.4]# size values for boxes (bed)box_gb_alpha=[0.6,0.8]# alpha values for boxes (gb)box_gb_size=[0.4,0.3]# size values for boxes (gb)# variant customizevariant_marker_size=13variant_marker_line_width=1variant_line_color="black"stem_color="grey"stem_width=1snp_color="grey"ins_color="blue"del_color="red"To apply these new settings just repeat the installation procedure in the BAMdash dir:pipinstall.Important disclaimer:The code is under the GPLv3 licence. The code is WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.