> ## Documentation Index
> Fetch the complete documentation index at: https://proto.evodesign.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# BLAST Sequence Novelty

> Penalize percent identity to the closest NCBI BLAST hit (online) above a novelty ceiling.

![BLAST Sequence Novelty](https://proto-bio.github.io/proto-assets/images/constraint/blast-novelty/hero.png)

> [!NOTE]
>
> **License:** BLAST is licensed under Custom (NCBI BLAST+ public domain). Please refer to [the license](https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/lxr/source/scripts/projects/blast/LICENSE) for full terms.

This constraint is open source. Any third-party models, product names, or trademarks referenced are the property of their respective owners, and Proto is not affiliated with them.

***

&#x20;Tools Used Tools Used  Source Source  Cite Cite

![](https://proto-bio.github.io/proto-assets/images/tool/blast/social.png)

&#x20;Go to Tool Page

[Open](https://proto.evodesign.org/docs/tools/sequence-alignment/blast.md)

![Proto](https://mintcdn.com/bio-pro/cMLt8hAqaP9M3LKy/assets/logo/logo-light.svg?fit=max\&auto=format\&n=cMLt8hAqaP9M3LKy\&q=85\&s=f5e5dfd1b8f9b9db3a0be0e2eb01f678)

evo-design/proto-language

&#x20;View source

[Open](https://github.com/evo-design/proto-language/blob/1a97e675c7e5e4ae0e92be91b1bb7b49f1331104/proto_language/constraint/sequence_alignment/blast_novelty_constraint.py#L140)

@articlealtschul1990blast\@articlecamacho2009blastplus

```bibtex theme={null}
@article{altschul1990blast,
  title={Basic local alignment search tool},
  author={Altschul, Stephen F and Gish, Warren and Miller, Webb and Myers, Eugene W and Lipman, David J},
  journal={Journal of Molecular Biology},
  volume={215},
  number={3},
  pages={403--410},
  year={1990},
  publisher={Elsevier},
  doi={10.1016/S0022-2836(05)80360-2}
}

@article{camacho2009blastplus,
  title={BLAST+: architecture and applications},
  author={Camacho, Christiam and Coulouris, George and Avagyan, Vahram and Ma, Ning and Papadopoulos, Jason and Bealer, Kevin and Madden, Thomas L},
  journal={BMC Bioinformatics},
  volume={10},
  pages={421},
  year={2009},
  publisher={BioMed Central},
  doi={10.1186/1471-2105-10-421}
}
```

&#x20;Copy citation

Constraint contributors[![](https://avatars.githubusercontent.com/u/61667248?v=4\&s=64)adititm](https://github.com/adititm)[![](https://avatars.githubusercontent.com/u/21143637?v=4\&s=64)bviggiano](https://github.com/bviggiano)
Score proposals by their top online BLAST identity relative to `max_identity`.

## API Reference

ConfigBlastNoveltyConfig[ Source](https://github.com/evo-design/proto-language/blob/1a97e675c7e5e4ae0e92be91b1bb7b49f1331104/proto_language/constraint/sequence_alignment/blast_novelty_constraint.py#L91)

Configuration for the online BLAST sequence-novelty constraint.

**blast\_config** `BlastSearchConfig`

NCBI BLAST search settings (program and NCBI database).

**max\_identity** `number` (default: 70.0)

Percent identity (0-100) to the closest hit above which proposals are penalized.

**min\_query\_coverage** `number` (default: 0.5)

Minimum fraction of the query one HSP must span to count (HSPs are not summed).

ReturnsConstraintOutput

Score in `[0, 1]` (0 = novel). `metadata` carries
`top_identity` (top qualifying percent identity, 0.0 if none), `top_hit_id`
and `num_hits` (qualifying hits).

## Usage

```python python icon="python" theme={null}
from proto_language.core import Constraint
from proto_language.constraint import blast_novelty_constraint, BlastNoveltyConfig

constraint = Constraint(
    inputs=[segment],
    function=blast_novelty_constraint,
    function_config=BlastNoveltyConfig(
        # Configure parameters here
    ),
)

scores = constraint.evaluate()
```

## Metadata

| Property | Value |
| - | - |
| Key | `blast-novelty` |
| Function | `blast_novelty_constraint` |
| Category | `sequence_alignment` |
| Mode | `discrete` |
| Uses GPU | `False` |
| Supported Types | `dna`, `protein` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.