luna.MyBio.extractor module

class Extractor(entity)[source]

Bases: object

Extract chains or residues from entity.

Parameters

entity (Model or Chain) – A model or chain object from where chains and residues will be extracted, respectively.

property entity
extract_chains(chains, output_file)[source]

Extract chains from entity and save it to output_file.

Parameters
  • chains (iterable of str) – A sequence of chains to extract from model entity.

  • output_file (str) – Save extracted chains to this file.

extract_residues(residues, output_file)[source]

Extract residues from entity and save it to output_file.

Parameters
  • residues (iterable) – A sequence of residues to extract from chain entity.

  • output_file (str) – Save extracted residues to to this file.