remove_redundant_hits: Remove redundant hits from blast tabular output

Description Usage Arguments Value Examples

Description

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.

Usage

1
2
3
4
5
6
7
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

1
2
3
4
5
6
7
## Not run: 
 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)

## End(Not run)

cparsania/phyloR documentation built on Aug. 6, 2020, 7:28 a.m.