Executes All-to-All QuickBLAST between two lists of organisms/genes/clusters. Output BLAST files are bi-directional and are stored in the filename filename1.filename2.all2all under output_dir. (All-to-All is simply Many-to-Many association)

all2all(
  first_list,
  second_list,
  blast_fun,
  seq_type,
  strand,
  blast_program,
  file_ext = ".fa",
  input_prefix_path = NULL,
  output_dir = "./",
  ...
)

Arguments

first_list

Vector of FASTA Filenames or Strings

second_list

Vector of FASTA Filenames or Strings

blast_fun

One of QuickBLAST::BLAST2Seqs, QuickBLAST::BLAST2Files, QuickBLAST::BLAST2Folders, QuickBLAST::BLAST2DBs

seq_type

(int) Sequence Type. Check QuickBLAST::GetQuickBLASTEnums()$ESeqType for available enums.

strand

(int) Strand. Check QuickBLAST::GetQuickBLASTEnums()$EStrand for available enums.

blast_program

Give the name of the BLAST program to use (if in $PATH) or give the absolute path to the BLAST program.

file_ext

File extension of input files. eg- ".cds" or ".fa"

input_prefix_path

If input lists/vectors are filenames, then provide input folder to prefix path

output_dir

Path to BLAST output

...

Extended options passed to internal functions, including:

  • blast_options: BLAST Options to use - QuickBLAST::GetAvailableBLASTOptions()

  • save_sequences: (bool) Save full sequences to result?

  • save_hsp_sequences: (bool) Save HSP sequences to result?

  • return_values: (bool) Return values back to R?

  • min_batch_size: Minimum batch size. (Default: 256)

  • n_threads: Number of threads. (Default: 8)

  • out_format: Output format. ipc/csv/parquet (Default: "parquet")

  • extension: File extension. (Only for QuickBLAST::BLAST2Folders())

  • reciprocal_hits: (bool) Reciprocal (Bi-directional) Hits?

  • verbose: (bool) Print DEBUG Messages?

Value

If return_values = TRUE, returns a list of data frames corresponding to each alignment query. Otherwise, returns invisible(NULL) or outputs directly to files.

Examples

QuickBLAST::all2all(
  first_list = fs::path_package("QuickBLAST", "extdata", "protein_query.fasta"),
  second_list = fs::path_package("QuickBLAST", "extdata", "protein_subject.fasta"),
  blast_fun = QuickBLAST::BLAST2Files,
  seq_type = 0,
  strand = 0,
  output_dir = "./",
  n_threads = 1,
  blast_program = "tblastx",
  save_sequences = FALSE,
  save_hsp_sequences = FALSE,
  return_values = TRUE,
  min_batch_size = 256,
  out_format = "parquet",
  blast_options = "",
  verbose = TRUE
)
#> All2All QuickBLAST Started...
#> [1] "/home/runner/work/_temp/Library/QuickBLAST/extdata/protein_query.fasta"
#> [1] "/home/runner/work/_temp/Library/QuickBLAST/extdata/protein_subject.fasta"
#> [1] "/home/runner/work/_temp/Library/QuickBLAST/extdata/protein_query.fasta.fa"
#> [1] "/home/runner/work/_temp/Library/QuickBLAST/extdata/protein_subject.fasta.fa"
#> Using tblastx Defaults...
#> Warning: UNRELIABLE VALUE: One of the ‘future.apply’ iterations (‘future_lapply-1’) unexpectedly generated random numbers without declaring so. There is a risk that those random numbers are not statistically sound and the overall results might be invalid. To fix this, specify 'future.seed=TRUE'. This ensures that proper, parallel-safe random numbers are produced via a parallel RNG method. To disable this check, use 'future.seed = NULL', or set option 'future.rng.onMisuse' to "ignore". [future ‘future_lapply-1’ (a602393eedc74c16184354c5ea4cf9c8-1); on a602393eedc74c16184354c5ea4cf9c8@runnervmvrwv9<32570>]
#> [1] "/home/runner/work/_temp/Library/QuickBLAST/extdata/protein_query.fasta.fa"
#> [1] "/home/runner/work/_temp/Library/QuickBLAST/extdata/protein_subject.fasta.fa"
#> Using tblastx Defaults...
#> Warning: UNRELIABLE VALUE: One of the ‘future.apply’ iterations (‘future_lapply-1’) unexpectedly generated random numbers without declaring so. There is a risk that those random numbers are not statistically sound and the overall results might be invalid. To fix this, specify 'future.seed=TRUE'. This ensures that proper, parallel-safe random numbers are produced via a parallel RNG method. To disable this check, use 'future.seed = NULL', or set option 'future.rng.onMisuse' to "ignore". [future ‘future_lapply-1’ (a602393eedc74c16184354c5ea4cf9c8-2); on a602393eedc74c16184354c5ea4cf9c8@runnervmvrwv9<32570>]
#> [[1]]
#> [[1]][[1]]
#> [1] FALSE
#> 
#>