opencadd.structure.superposition.sequences.fasta2select

opencadd.structure.superposition.sequences.fasta2select(fastafilename, ref_resids=None, ref_segids=None, target_resids=None, target_segids=None, backbone_selection='backbone or name CB')[source]

Return selection strings that will select equivalent residues.

The function takes two pre-aligned sequences in a FASTA file and constructs MDAnalysis selection strings of the common atoms. When these two strings are applied to the two different proteins they will generate AtomGroups of the aligned residues.

Parameters
  • fastafilename (str, path to filename) – FASTA file with first sequence as reference and second the one to be aligned (ORDER IS IMPORTANT!)

  • ref_resids (list (optional)) – sequence of resids as they appear in the reference structure

  • target_resids (list (optional)) – sequence of resids as they appear in the target

  • ref_segids (list (optional)) – sequence of segids as they appear in the reference structure

  • target_segids (list (optional)) – sequence of segids as they appear in the target

Returns

dictionary with ‘reference’ and ‘mobile’ selection string

Return type

dict