Learn R Programming

ggDNAvis (version 0.3.2)

'ggplot2'-Based Tools for Visualising DNA Sequences and Modifications

Description

Uses 'ggplot2' to visualise either (a) a single DNA/RNA sequence split across multiple lines, (b) multiple DNA/RNA sequences, each occupying a whole line, or (c) base modifications such as DNA methylation called by modified bases models in Dorado or Guppy. Functions starting with visualise_() are the main plotting functions, and functions starting with extract_() are key helper functions for reading files and reformatting data. Source code is available at and a full non-expert user guide is available at .

Copy Link

Version

Install

install.packages('ggDNAvis')

Monthly Downloads

166

Version

0.3.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Evelyn Jade

Last Published

October 31st, 2025

Functions in ggDNAvis (0.3.2)

read_fastq

Read sequence and quality information from FASTQ
example_many_sequences

Example multiple sequences data
read_modified_fastq

Read modification information from modified FASTQ
rasterise_matrix

Rasterise a matrix to an x/y/layer dataframe (generic ggDNAvis helper)
merge_methylation_with_metadata

Merge methylation with metadata
extract_and_sort_sequences

Extract, sort, and add spacers between sequences in a dataframe
extract_methylation_from_dataframe

Extract methylation information from dataframe for visualisation
merge_fastq_with_metadata

Merge FASTQ data with metadata
ggDNAvis-package

ggDNAvis: 'ggplot2'-Based Tools for Visualising DNA Sequences and Modifications
reverse_locations_if_needed

Reverse modification locations if needed (merge_methylation_with_metadata() helper)
fastq_quality_scores

Vector of the quality scores used by the FASTQ format
reverse_sequence_if_needed

Reverse sequences if needed (merge_methylation_with_metadata() helper)
string_to_vector

Split a ","-joined string back to a vector (generic ggDNAvis helper)
reverse_complement

Reverse complement a DNA/RNA sequence (generic ggDNAvis helper)
visualise_many_sequences

Visualise many DNA/RNA sequences
reverse_quality_if_needed

Reverse qualities if needed (merge_methylation_with_metadata() helper)
reverse_probabilities_if_needed

Reverse modification probabilities if needed (merge_methylation_with_metadata() helper)
vector_to_string

Join a vector into a comma-separated string (generic ggDNAvis helper)
visualise_methylation

Visualise methylation probabilities for many DNA sequences
visualise_methylation_colour_scale

Visualise methylation colour scalebar
visualise_single_sequence

Visualise a single DNA/RNA sequence
sequence_colour_palettes

Colour palettes for sequence visualisations
write_fastq

Write sequence and quality information to FASTQ
write_modified_fastq

Write modification information stored in dataframe back to modified FASTQ
convert_sequence_to_numbers

Map a sequence to a vector of numbers (generic ggDNAvis helper)
debug_join_vector_str

Print a character/string vector to console (ggDNAvis debug helper)
convert_base_to_number

Map a single base to the corresponding number (generic ggDNAvis helper)
convert_MM_vector_to_locations

Convert MM tag to absolute index locations (read_modified_fastq() helper)
convert_locations_to_MM_vector

Convert absolute index locations to MM tag (write_modified_fastq() helper)
convert_modification_to_number_vector

Convert string-ified modification probabilities and locations to a single vector of probabilities (visualise_methylation() helper)
convert_input_seq_to_sequence_list

Split a single input sequence into a vector of "lines" for visualisation (visualise_single_sequence() helper)
debug_join_vector_num

Print a numeric vector to console (ggDNAvis debug helper)
create_image_data

Rasterise a vector of sequences into a numerical dataframe for ggplotting (generic ggDNAvis helper)
convert_sequences_to_annotations

Convert a vector of sequences to a dataframe for plotting sequence contents and index annotations (visualise_single_sequence() helper)