Given the output of blast tabular format in a tbl, it removes redundant hits by subject accession. For each redundant hit longest hit will be kept.

remove_redundant_hits(
  blast_output_tbl,
  subject_acc_colname = "subject_acc_ver",
  subject_start_colname = "s_start",
  subject_end_colname = "s_end",
  keep_length = FALSE
)

Arguments

blast_output_tbl

an object of class tbl containing blast tabular output.

subject_acc_colname

a string denoting a column of subject hits in a blast_output_tbl. Default "subject_acc_ver".

subject_start_colname

a string denoting a column of subject start. Default "s_start".

subject_end_colname

a string denoting a column of subject end. Default "s_end".

keep_length

logical, default FALSE, indicates whether to keep column of subject length.

Value

a tbl

Examples

if (FALSE) { f <- system.file("extdata","blast_output_01.txt" ,package = "phyloR") d <- readr::read_delim(f, delim ="\t" , col_names = F , comment = "#") colnames(d) <- phyloR::get_blast_outformat_7_colnames() remove_redundant_hits(d) }