blast_reassignment: Reassign reads from MetaScope BLASTn alignment

View source: R/metascope_blast.R

blast_reassignmentR Documentation

Reassign reads from MetaScope BLASTn alignment

Description

Using the output from metascope_blast(), the blast_reassignment() function takes the results and alters the original metascope_id() output to reassign reads that were invalidated by the BLAST findings. Currently, the implementation of this function only reassigns reads to a taxon that was already found in the sample at a higher abundance.

Usage

blast_reassignment(
  metascope_blast_path,
  species_threshold,
  num_hits,
  blast_tmp_dir,
  out_dir,
  sample_name
)

Arguments

metascope_blast_path

Character string. The filepath to a metascope_blast CSV output file.

species_threshold

Numeric. A number between 0 and 1 indicating the minimum proportion of reads needed for a taxon to be considered validated from the BLAST results. Default is 0.2, or 20%.

num_hits

Integer. The number of hits for which to assess validation. Default is 10, i.e., only the top 10 taxa will be assessed.

blast_tmp_dir

Character string. Filepath of the directory where BLAST results were output from the metascope_blast function. Referencing the arguments from metascope_blast, this would be file.path(tmp_dir, "blast")

out_dir

Character string, path to output directory.

sample_name

Character string, sample name for output files.

Value

Returns a data.frame with the reassigned taxa and read counts.


compbiomed/MetaScope documentation built on Nov. 30, 2024, 4:35 p.m.