Local¶
-
cblaster.local.
diamond
(fasta, database, max_evalue=0.01, min_identity=30, min_coverage=50, cpus=1)¶ Launch a local DIAMOND search against a database.
Parameters: - fasta (str) – Path to FASTA format query file
- database (str) – Path to DIAMOND database generated with cblaster makedb
- max_evalue (float) – Maximum e-value threshold
- min_identity (float) – Minimum identity (%) cutoff
- min_coverage (float) – Minimum coverage (%) cutoff
- cpus (int) – Number of CPU threads for DIAMOND to use
Returns: Rows from DIAMOND search result table (split by newline)
Return type: list
-
cblaster.local.
parse
(results, min_identity=30, min_coverage=50, max_evalue=0.01)¶ Parse a string containing results of a BLAST/DIAMOND search.
Parameters: - results (list) – Results returned by diamond() or blastp()
- min_identity (float) – Minimum identity (%) cutoff
- min_coverage (float) – Minimum coverage (%) cutoff
- max_evalue (float) – Maximum e-value threshold
Returns: Hit objects representing hits that surpass scoring thresholds
Return type: list
-
cblaster.local.
search
(database, query_file=None, query_ids=None, **kwargs)¶ Launch a new BLAST search using either DIAMOND or command-line BLASTp (remote).
Parameters: - database (str) – Path to DIAMOND database
- query_file (str) – Path to FASTA file containing query sequences
- query_ids (list) – NCBI sequence accessions
Raises: ValueError
– No value given for query_file or query_idsReturns: Parsed rows with hits from DIAMOND results table
Return type: list