camlhmp.parsers.blast
¶
Below are the functions available in the camlhmp.parsers.blast
module.
camlhmp.parsers.blast.get_blast_allele_hits(targets, results, min_pident, min_coverage)
¶
Find the allele hits in the BLAST results.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
targets |
dict
|
The list of target sequences {id: len(seq)} |
required |
results |
list of dict
|
The BLAST results |
required |
min_pident |
float
|
The minimum percent identity to count a hit |
required |
min_coverage |
int
|
The minimum percent coverage to count a hit |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
The allele hits |
Examples:
>>> from camlhmp.parsers.blast import get_blast_allele_hits
>>> target_results = get_blast_allele_hits(framework["targets"], blast_stdout, min_pident, min_coverage)
Source code in camlhmp/parsers/blast.py
camlhmp.parsers.blast.get_blast_region_hits(targets, results, min_pident, min_coverage)
¶
Aggregate multiple target hits for a region from the BLAST results.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
targets |
dict
|
The list of target sequences {id: len(seq)} |
required |
results |
list of dict
|
The BLAST results |
required |
min_pident |
float
|
The minimum percent identity to count a hit |
required |
min_coverage |
int
|
The minimum percent coverage to count a hit |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
The target hits |
Examples:
>>> from camlhmp.parsers.blast import get_blast_region_hits
>>> target_results = get_blast_region_hits(target_lengths, blast_stdout, min_pident, min_coverage)
Source code in camlhmp/parsers/blast.py
camlhmp.parsers.blast.get_blast_target_hits(targets, results)
¶
Find the target hits in the BLAST results.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
targets |
list
|
The list of target sequences |
required |
results |
dict
|
The BLAST results |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
The target hits |
Examples:
>>> from camlhmp.parsers.blast import get_blast_target_hits
>>> target_results = get_blast_target_hits(framework["targets"], hits)