Calls makeblastdb to create a BLAST DB of a FASTA file
MakeBLASTDB(ptr, input_file, database_name, parse_seqids = FALSE)(bool) DB name on success, FALSE - Otherwise.
Faitful re-implementation of makeblastdb seemed pointless, hence the system.call() to a the program.
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.0506452 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")