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

View source: R/read_feats.R

swap_queryR Documentation

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)

Arguments

x

tibble with query and subject columns

Value

tibble with swapped query/subject columns

Examples

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)

thackl/gggenomes documentation built on March 10, 2024, 7:26 a.m.