ablang2 / README_Spaces.md
hemantn's picture
Integrate utility files into main repository - make self-contained
712d350

🧬 AbLang2 Sequence Restorer - Hugging Face Spaces

This is a Gradio web application that provides the AbLang2 sequence restoration utility through Hugging Face Spaces.

🎯 What it does

The AbLang2 Sequence Restorer allows you to:

  • Restore masked residues (*) in antibody sequences
  • Work with paired sequences (heavy and light chains)
  • Handle single chains (heavy or light chain only)
  • Use alignment for variable missing lengths

πŸš€ How to use

  1. Enter sequences: Provide heavy chain, light chain, or both sequences
  2. Mask residues: Use * to indicate residues you want to restore
  3. Choose alignment: Enable "Use Alignment" for variable missing lengths
  4. Get results: Click "Restore Sequences" to get the restored antibody sequences

πŸ“ Example Usage

Example 1: Both chains with masked residues

  • Heavy Chain: EVQ***SGGEVKKPGASVKVSCRASGYTFRNYGLTWVRQAPGQGLEWMGWISAYNGNTNYAQKFQGRVTLTTDTSTSTAYMELRSLRSDDTAVYFCAR**PGHGAAFMDVWGTGTTVTVSS
  • Light Chain: DIQLTQSPLSLPVTLGQPASISCRSS*SLEASDTNIYLSWFQQRPGQSPRRLIYKI*NRDSGVPDRFSGSGSGTHFTLRISRVEADDVAVYYCMQGTHWPPAFGQGTKVDIK

Example 2: Heavy chain only

  • Heavy Chain: EVQLVESGGGLVQPGGSLRLSCAASGFTFSSYAMGWVRQAPGKGLEWVSAISGSGGSTYYADSVKGRFTISRDNSKNTLYLQMNSLRAEDTAVYYCARDY**GMDVWGQGTTVTVSS
  • Light Chain: (leave empty)

πŸ”§ Technical Details

  • Model: AbLang2 from Hugging Face Hub (hemantn/ablang2)
  • Framework: Gradio for the web interface
  • Backend: PyTorch with Transformers library
  • Processing: Automatic GPU acceleration when available

πŸ“š Related Resources

🀝 Citation

If you use this tool in your research, please cite the original AbLang2 paper:

@article{Olsen2024,
  title={Addressing the antibody germline bias and its effect on language models for improved antibody design},
  author={Tobias H. Olsen, Iain H. Moal and Charlotte M. Deane},
  journal={bioRxiv},
  doi={https://doi.org/10.1101/2024.02.02.578678},
  year={2024}
}