Complete canonical API text; task articles explain the workflows. Tutorials
Site guide · find your task
Setup and learning paths
HomeInstall and prepare the environmentChoose your learning moduleModule I · Chord
1.1 Tables and field meanings1.2 Produce and import comparisons1.3 Build the layers step by step1.4 Direction, curvature and clearance1.5 Filter and summarize links1.6 Full source-file workflow1.7 Complete chord showcaseModule II · Collinear
2.1 Reuse chord input tables2.2 Switch coordinates and add layers2.3 Routes, clearance and the ruler2.4 Compare CDS neighbourhoods2.5 Focus, anchors and segments2.6 Complete collinear showcaseModule III · Plasmid
3.1 DNA, annotations and 13 references3.2 From a circle to annotation layers3.3 Features, primers and restriction3.4 Thirteen plasmid references3.5 Complete plasmid casesConsult as needed · Data and layers
Prepare tables and coordinatesImport and convert dataImport nucleotide and protein alignmentsProject protein intervals to genomic coordinatesFeatures, stacking and genomic decorationLabels and local placementQuantitative tracksMappings, scales, guides and themesSet values by sequence and strandCommon adjustments and grammarExport, preview and diagnosticsLearning map and reference
Articles and complete workflowsFunction referenceReproducible galleryFrequently asked questionsMigrate to the candidate APITerminology and design sourcesDevelopment status and changesExplicit adapters return ordinary data frames. Optional interval packages are loaded only when their objects are supplied; drawing never installs or runs external data preparation. Supported S4 inputs supplied directly to ggchord or its layers use the same adapters. Identifiers are kept verbatim.
Arguments
- x
A data frame,
GRanges,Seqinfo,GInteractions, or a BiostringsXStringSet/XStringobject.- mapping
Optional named character vector
output_role = "input_column"for data-frame inputs. For examplec(accver = "chrom", length = "size").- lengths
Optional named numeric vector of known sequence lengths. Fills unknown lengths and must agree with any known source lengths.
- ids
Optional character vector of explicit identifiers for unnamed
XStringSet/XStringinputs only. Existing source names must agree.
Value
An ordinary data frame with accver, length and retained metadata.
Its ggchord_conversion attribute records input class, coordinate system,
column renaming, object-level metadata, and upstream import/conversion
provenance when present. No genomic coordinates or
accession versions are guessed or rewritten.
Details
For a GRanges object, lengths come from its Seqinfo, never from the
maximum observed feature endpoint. A GInteractions object uses the same
information from its common regions. Only sequence names used by the
supplied intervals are returned; a Seqinfo object returns all its entries.
Unknown lengths require explicit lengths or corrected source information.
XStringSet and XString inputs use their stored sequence widths.
Set names are identifiers; unnamed sequences require explicit ids.
Explicit IDs must agree with existing nonempty names, so identifiers and
accession versions are never silently rewritten. sequence_unit records
"bp", "aa", or "character"; amino-acid widths are not nucleotide
coordinates. These non-nucleotide tables remain available for data workflows,
but ggchord() rejects them as genomic sequence input. Project amino-acid
intervals with build_ggchord_cds() and project_ggchord_features() or
project_ggchord_links() before using known nucleotide sequence lengths.
Empty sequences are rejected like other zero lengths.
