blastn_results: rBlast_results

View source: R/metascope_blast.R

blastn_resultsR Documentation

rBlast_results

Description

rBlast_results

Usage

blastn_results(
  results_table,
  bam_file,
  num_results = 10,
  num_reads_per_result = 100,
  hit_list = 10,
  num_threads = 1,
  db_path,
  out_path,
  sample_name = NULL,
  quiet = quiet,
  accessions_path,
  fasta_dir = NULL,
  NCBI_key = NULL,
  param
)

Arguments

results_table

data.frame containing the MetaScope results.

bam_file

Rsamtools::bamFile instance for the given sample.

num_results

Integer; maximum number of Metascope results to BLAST. Default is 10.

num_reads_per_result

Integer; number of reads to BLAST per result. Default is 100.

hit_list

Integer; how many BLAST results to fetch for each read. Default is 10.

num_threads

Integer; how many threads to use if multithreading. Default is 1.

db_path

Character string; filepath for the location of the pre-installed BLAST database.

out_path

Character string; Output directory to save CSV output files, including base name of files. For example, given a sample "X78256", filepath would be file.path(directory_here, "X78256") with extension omitted.

sample_name

Character string, sample name for output files.

quiet

Logical, whether to print out more informative messages. Default is FALSE.

accessions_path

Directory where accession files for blast are stored.

fasta_dir

Character string; Directory where fastas from metascope_id are stored.

NCBI_key

(character) NCBI Entrez API key. optional. See taxize::use_entrez(). Due to the high number of requests made to NCBI, this function will be less prone to errors if you obtain an NCBI key.

param

BiocParallel param for parallelization.

Value

Creates and exports num_results number of csv files with blast results from local blast


compbiomed/MetaScope documentation built on Nov. 20, 2024, 8 p.m.