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 changes
Read one or more BLAST tabular output files into ribbon_data format
Source:R/data-import.R
read_blast.RdBoth file and files accept literal path vectors or wildcard patterns.
Repeated resolved paths are read once, in first-occurrence order.
Standard -outfmt 6 and -outfmt 7 use the default 12 tabular fields;
the historical extended 17-column format is optional. Omitting -outfmt
entirely produces pairwise text, which this tabular reader does not parse.
Usage
Code
read_blast(
file = NULL,
files = NULL,
format = c("auto", "outfmt6", "outfmt7", "custom"),
col_names = NULL,
comment = "#",
source_file = FALSE,
...
)Arguments
- file
Optional path vector or glob patterns; read before
files.- files
Optional character vector of BLAST tabular output files (literal paths and/or wildcard patterns). All matched files are read and combined into one data.frame.
- format
Character.
"auto"(default) detects the column layout from the file;"outfmt6"requires the standard 12-column layout,"outfmt7"parses its# Fields:declaration, and"custom"requirescol_names.- col_names
Optional character vector naming the columns in the file, used with
format = "custom"or to override auto-detection.- comment
Character comment character, default
"#"(BLAST outfmt 7 header lines start with#).- source_file
Logical. Add a
.source_filecolumn when reading one or more files, defaultFALSE.- ...
Additional arguments passed to
utils::read.table()(e.g.na.strings).
Value
A data.frame with the required ribbon columns first
(qaccver, saccver, qstart, qend, sstart, send) followed by any preserved optional columns.
A ggchord_import attribute records files, per-file output row counts and
the one-based inclusive coordinate convention.
Details
The reader also parses BLASTp tabular output. It preserves the producer's
numeric endpoints and does not infer or convert amino-acid/nucleotide units.
Protein intervals require an explicit CDS projection before genomic plotting;
reading a protein HSP does not establish an ungapped nucleotide correspondence.
See project_ggchord_features() and project_ggchord_links().