Learn R Programming

IMPORTANT! Dowser's source code has moved to https://github.com/immcantation/dowser

To update Git configuration settings use:

   git config user.email "your-gh-user@email.com"
   git config user.name "your-gh-user-name"
   git remote set-url origin git@github.com:immcantation/dowser.git

Dowser

Dowser is part of the Immcantation analysis framework for Adaptive Immune Receptor Repertoire sequencing (AIRR-seq). Dowser provides a set of tools for performing phylogenetic analysis on B cell receptor repertoires. It supports building and visualizing trees using multiple methods, and implements statistical tests for discrete trait analysis of B cell migration, differentiation, and isotype switching.

Dowser has 6 primary functions:

  1. Reconstruct clonal germline sequences.
  2. Build B cell lineage trees using multiple methods, such as maximum parsimony, maximum likelihood, and IgPhyML.
  3. Reconstruct intermediate sequences within lineage trees using different methods.
  4. Create publication-quality lineage tree plots.
  5. Analyze trees to detect ongoing B cell evolution over time.
  6. Understand B cell migration and differentiation.

What's a dowser?

Documentation and tutorials

Full documentation, including tutorials and vignettes: https://dowser.readthedocs.io

Contact

If you need help or have any questions, please contact the Immcantation Group.

If you have discovered a bug or have a feature request, you can open an issue using the issue tracker.

To receive alerts about Immcantation releases, news, events, and tutorials, join the Immcantation News Google Group. Membership settings can be adjusted to change the frequency of email updates.

Copy Link

Version

Install

install.packages('dowser')

Monthly Downloads

1,070

Version

2.4.0

License

AGPL-3

Maintainer

Kenneth Hoehn

Last Published

October 14th, 2025

Functions in dowser (2.4.0)

create_alignment

Takes an airr clone object and returns BEAST2 Alignment xml of the sequences
checkDivergence

Compare divergence along a tree in terms of mutations (sum of branches) for each tip and reconstructed internal node to its Hamming distance from the germline. Divergence should never be less than Hamming distance. A threshold of -1 is used to represent 1 full mutation difference. The function will throw a warning if any trees cross this threshold
condenseTrees

Condense a set of equally parsimonious node labels into a single tree
create_MRCA_prior_observed

Takes an airr clone object and returns BEAST2 XML for MRCA prior of the observed sequences
createGermlines

createGermlines Determine consensus clone sequence and create germline for clone
create_height_prior

Takes an airr clone object and returns BEAST2 XML to set a height prior
create_MRCA_prior_germline

Takes an airr clone object and returns BEAST2 XML for MRCA prior of the germline sequence
correlationTest

Run date randomization test for temporal signal on a set of trees.
colorTrees

Get a color palette for a predefined set of trait values
collapseNodes

Collapse internal nodes with the same predicted sequence
dowser-package

dowser: B Cell Receptor Phylogenetics Toolkit
create_starting_tree

Takes an airr clone object and tree and returns BEAST2 XML for setting the starting tree
create_root_freqs

Takes an airr clone object and returns BEAST2 rootfreqs xml of the germline
dowser

The dowser package
create_max_height_prior

Takes an airr clone object and returns BEAST2 XML to set a maximum height prior
create_traitset

Takes an airr clone object and returns BEAST2 XML for a trait/traitSet from a column
findSwitches

Create a bootstrap distribution for clone sequence alignments, and estimate trees for each bootstrap replicate.
exportTrees

Exports the phylogenetic trees from the airrClone object
dfToFasta

Write a fasta file of sequences readFasta reads a fasta file
downsampleClone

downsampleClone Down-sample clone to maximum tip/switch ratio
formatClones

Generate an ordered list of airrClone objects for lineage construction
getBootstraps

Creates a bootstrap distribution for clone sequence alignments, and returns estimated trees for each bootstrap replicate as a nested list as a new input tibble column.
getGermline

getGermline get germline segment from specified receptor and segment
getDivergence

Get divergence from root of tree for each tip
getSeq

Deprecated! Use getNodeSeq
getNodeSeq

Return IMGT gapped sequence of specified tree node
getAllSeqs

Return all tip and internal node sequences
getSkylines

Make data frames for Bayesian skyline plots
getSubTaxa

Get the tip labels as part of a clade defined by an internal node
getPalette

Get a color palette for a predefined set of trait values. 'Germline' defaults to black unless specified.
makeSkyline

get values for Bayesian Skyline plot
plotSkylines

Simple function for plotting Bayesian skyline plots
getTimeTreesIterate

Iteratively resume getTimeTrees until convergence, as defined by all parameters (except those in ignore vector) having ESS greater than or equal to the specified ess_cutoff
maskCodons

maskCodons Masks codons split by insertions
getTrees

Estimate lineage tree topologies, branch lengths, and internal node states if desired
maskSequences

maskSequences Mask codons split by insertions in V gene
getSubclones

#' Deprecated! Use resolveLightChains
makeModelFile

Make a parsimony model file
getTimeTrees

Estimate time trees by running BEAST on each clone Applies XML template to each clone
makeAirrClone

Generate a airrClone object for lineage construction
reconIgPhyML

Do IgPhyML maximum parsimony reconstruction
readModelFile

Read in a parsimony model file
readLineages

Read in all trees from a lineages file
rerootTree

Reroot phylogenetic tree to have its germline sequence at a zero-length branch to a node which is the direct ancestor of the tree's UCA. Assigns uca to be the ancestral node to the tree's germline sequence, as germid as the tree's germline sequence ID.
resolvePolytomies

Resolve polytomies to have the minimum number of single timepoint clades
resolveLightChains

Define subgroups within clones based on light chain rearrangements
readIMGT

readIMGT read in IMGT database
readFasta

Read a fasta file into a list of sequences readFasta reads a fasta file
readBEAST

Reads in a BEAST output directory
plotTrees

Plot a tree with colored internal node labels using ggtree
testPS

Performs PS (parsimony score) test on switch data
scaleBranches

Scale branch lengths to represent either mutations or mutations per site.
runCorrelationTest

Run correlationTest, based on https://doi.org/10.1111/2041-210X.12466
stopCodonCheck

Check whether sequences have in-frame premature stop codons (PTCs)
testSC

Performs SC (switch count) test on switch data
sampleCloneMultiGroup

sampleCloneMultiGroup Down-sample clone to specified size with one or multiple groups to sample evenly
testSP

Performs SP (switch proportion) test on switch data
sampleClones

sampleClones Down-sample clones to specified size
stitchVDJ

stitchVDJ combines germline gene segments to a single string
stitchRegions

stitchRegions Similar to stitchVDJ but with segment IDs instead of nucleotides
writeLineageFile

Write lineage file for IgPhyML use
write_clone_to_xml

Takes an airr clone object and template and writes a BEAST2 XML file
write_clones_to_xmls

Wrapper to write multiple clones to XML files
writeCloneSequences

Write the sequences used in tree building to a fasta format. If there are more than one tree in airrClone output the sequence id will be followed by "|clone_id".
treesToPDF

Simple function for plotting a lot of trees into a pdf
ExampleMixedDb

Example Change-O database
ExampleMixedClones

Example Multiple Partition Trees
airrClone-class

S4 class defining a clone in Dowser
ExampleClones

Example Ig lineage trees
ExampleAirrTyCHE

Example AIRR database for TyCHE
ExampleAirr

Example AIRR database
IsotypeTrees

Example Ig lineage trees with isotype reconstructions.
TimeTrees

Example Ig lineage trees sampled over time.
ExampleDbChangeo

Example Change-O database
buildBeast

Read in a directory from a BEAST run. Runs treeannotator and loganalyser.
bootstrapTrees

Deprecated! Please use findSwitches instead.
buildIgphyml

Wrapper to build IgPhyML trees and infer intermediate nodes
BiopsyTrees

Example Ig lineage trees with biopsy reconstructions.
buildPhylo

Wrapper for alakazam::buildPhylipLineage
buildPML

Wrapper for phangorn::optim.pml
buildClonalGermline

buildClonalGermline Determine consensus clone sequence and create germline for clone
buildGermline

buildGermline reconstruct germline segments from alignment data
buildRAxML

Wrapper to build RAxML-ng trees and infer intermediate nodes
calcRF

Finds the Robinson-Fould's cluster distance between phylogenies.
buildPratchet

Wrapper for phangorn::pratchet