Calls makeblastdb to create a BLAST DB of a FASTA file
BLAST2DBs(
ptr,
query,
subject,
out_file = NULL,
out_format = NULL,
num_threads = 0L,
refresh_db = FALSE,
return_values = TRUE,
min_batch_size = 0L,
enable_chunking = FALSE,
chunk_size = 50000L,
overlap = 1000L,
verbose = TRUE
)(Rcpp::XPtr<QuickBLAST>) or (unsigned int) Pointer/ID of QuickBLAST instance
(string) Query DB
(string) Subject DB
(string) Ouput file (Optional)
(string) Ouput Format. 'ipc'/'csv'/'parquet' (Optional) (Default: 'parquet').
(unsigned int) Number of threads. (Optional)
(bool) If TRUE, re-creates the DBs
(bool) Return BLAST Hits as Rcpp::List (Default: TRUE) (Optional)
(unsigned int) Minimum batch size - Size of file write buffer (Optional).
(bool) Chunk large sequences? (Default: FALSE)
(int) Size of chunks (Default: 50000)
(int) Overlap between chunks (Default: 1000)
(bool) Verbose? (Default: TRUE)
(SEXP) Rcpp::List - if return_values == TRUE, out_file - Otherwise.
blastp_inst <- QuickBLAST::CreateQuickBLASTInstance(
seq_type = 1,
strand = 0,
program = "blastp",
save_sequences = FALSE,
save_hsp_sequences = FALSE
)
#> Using blastp Defaults...
QuickBLAST::MakeBLASTDB(
blastp_inst,
system.file(
"extdata",
"protein_query.fasta",
package = "QuickBLAST",
mustWork = TRUE
),
"protein_query.db"
)
#> [MakeBLASTDB] Executing command: /home/runner/work/_temp/Library/QuickBLAST/bin//makeblastdb -in /home/runner/work/_temp/Library/QuickBLAST/extdata/protein_query.fasta -dbtype prot -out protein_query.db
#> makeblastdb finished successfully
#> [1] "protein_query.db"
QuickBLAST::MakeBLASTDB(
blastp_inst,
system.file(
"extdata",
"protein_subject.fasta",
package = "QuickBLAST",
mustWork = TRUE
),
"protein_subject.db"
)
#> [MakeBLASTDB] Executing command: /home/runner/work/_temp/Library/QuickBLAST/bin//makeblastdb -in /home/runner/work/_temp/Library/QuickBLAST/extdata/protein_subject.fasta -dbtype prot -out protein_subject.db
#> makeblastdb finished successfully
#> [1] "protein_subject.db"
QuickBLAST::BLAST2DBs(
ptr=blastp_inst,
query="protein_query.db",
subject="protein_subject.db",
num_threads=24,
out_file="test.db.arrow",
return_values = TRUE
)
#> Q :/home/runner/work/QuickBLAST/QuickBLAST/docs/reference/protein_query.db
#> S :/home/runner/work/QuickBLAST/QuickBLAST/docs/reference/protein_subject.db
#> Writing to : test.db.arrow
#> Output Format : parquet
#> Num Threads: 2
#> Total Records (Q + S): 2 (1 + 1)
#> Batch Size: 3
#> Batch Hits: 1
#> Done writing to file.
#> Processed Batches:1
#> Total Records Processed: 1
#> Clock : 0.050812 seconds
#> RecordBatchVector size: 1
#> Total rows across all batches: 1
#> [[1]]
#> seq_info_num_alignments seq_info_seqids_qseqid seq_info_seqids_sseqid
#> 1 1 QUERY QUERY
#> seq_info_seqs_qseq seq_info_seqs_sseq seq_info_strands seq_info_lengths_qlen
#> 1 */* 758
#> seq_info_lengths_slen hsps_qhsp hsps_shsp hsps_pident hsps_pident_gap
#> 1 758 100 100
#> hsps_frames hsps_evalue hsps_length hsps_length01 hsps_qstart hsps_qend
#> 1 0/0 0 758 1 0 757
#> hsps_sstart hsps_send hsps_bitscore hsps_score hsps_qcovhsp hsps_blast_score
#> 1 0 757 1496.871 3874 0 3874
#> hsps_gaps hsps_nident hsps_mismatch hsps_positive hsps_n_splices hsps_hsp_num
#> 1 0 758 0 758 0 1
#> hsps_sum_evalue hsps_product_coverage hsps_overall_identity
#> 1 0 0 0
#> hsps_negative_count hsps_matches hsps_high_quality_percent_coverage
#> 1 0 0 0
#> hsps_exon_identity hsps_consensus_splices hsps_comp_adj_method
#> 1 0 0 2
#>
unlink("protein_query.db.*")
unlink("protein_subject.db.*")
unlink("test.db.arrow")