Learn R Programming

gggenomes (version 1.0.1)

swap_query: Swap query and subject in blast-like feature tables

Description

Swap query and subject columns in a table read with read_feats() or read_links(), for example, from blast searches. Swaps columns with name/name2, such as 'seq_id/seq_id2', 'start/start2', ...

Usage

swap_query(x)

Value

tibble with swapped query/subject columns

Arguments

x

tibble with query and subject columns

Examples

Run this code
feats <- tibble::tribble(
  ~seq_id, ~seq_id2, ~start, ~end, ~strand, ~start2, ~end2, ~evalue,
  "A", "B", 100, 200, "+", 10000, 10200, 1e-5
)
# make B the query
swap_query(feats)

Run the code above in your browser using DataLab