# Extracting Biounits by aligning to a reference protein¶

Biounit (BU) extraction is one of the more basic functionalities offered through the Spruce TK. This example shows how to extract BUs using a sequence alignment to a reference protein.

## Command Line Interface¶

This example takes in an extraction PDB file, a reference PDB file, and optionally the minimum score for the alignment to the reference as well as a boolean flag to instruct the code to superimpose the output BU to the input reference protein (see OEExtractBioUnits for details on the API).

prompt> extract_biounits_ref <extract protein PDB> <reference protein PDB> [min score] [superpose]


## Code¶

prompt> extract_biounits_ref 4OBD.pdb 2UPJ.pdb

Writing biounit 0 to 4OBD_BU_0.oeb.gz