Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Functions
PDB2Seq.c File Reference

Conversion from PDB to sequence and other sequence related routines. More...

#include <stdlib.h>
#include <string.h>
#include "macros.h"
#include "pdb.h"
#include "seq.h"

Go to the source code of this file.

Functions

char * blDoPDB2Seq (PDB *pdb, BOOL DoAsxGlx, BOOL ProtOnly, BOOL NoX)
 
HASHTABLEblDoPDB2SeqByChain (PDB *pdb, BOOL DoAsxGlx, BOOL ProtOnly, BOOL NoX)
 

Detailed Description

Conversion from PDB to sequence and other sequence related routines.

Version
V1.15
Date
01.12.15
Author
Dr. Andrew C. R. Martin
Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk

This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.

The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.

The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.

Description:

Usage:

Revision History:

Definition in file PDB2Seq.c.

Function Documentation

char* blDoPDB2Seq ( PDB pdb,
BOOL  DoAsxGlx,
BOOL  ProtOnly,
BOOL  NoX 
)
Parameters
[in]*pdbPDB linked list
[in]DoAsxGlxHandle Asx and Glx as B and Z rather than X
[in]ProtOnlyDon't do DNA/RNA; these simply don't get done rather than being handled as X
[in]NoXSkip amino acids which would be assigned as X
Returns
Allocated character array containing sequence

malloc()'s an array containing the 1-letter sequence corresponding to an input PDB linked list. Returns NULL if given a NULL parameter or memory allocation fails. Puts *'s in the sequence for multi-chains.

This routine is normally called via the macro interfaces: PDB2Seq(pdb), PDB2SeqX(pdb), PDBProt2Seq(pdb), PDBProt2SeqX(pdb) Those with Prot in their names handle protein only; those with X handle Asx/Glx as B/Z rather than as X

  • 29.09.92 Original By: ACRM
  • 07.06.93 Corrected allocation.
  • 18.06.93 Handles multi-chains and skips NTER and CTER residues
  • 13.05.94 Check for chain change before copy residue (!) (Bug reported by Bob MacCullum)
  • 19.07.95 Added check for ATOM records
  • 24.01.96 Returns blank string (rather than core dumping!) if the linked list contained no ATOM records
  • 26.08.97 Changed to doPDB2Seq with extra parameters (DoAsxGlx & ProtOnly). The old calling forms have now become macros
  • 02.10.00 Added NoX
  • 10.06.05 Changed the initialization of rescount, resnum, etc. so it correctly points to the first residue. This solves a bug with CA-only chains where it was undercounting by 1
  • 04.02.14 Use CHAINMATCH By: CTP
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 146 of file PDB2Seq.c.

HASHTABLE* blDoPDB2SeqByChain ( PDB pdb,
BOOL  DoAsxGlx,
BOOL  ProtOnly,
BOOL  NoX 
)
Parameters
[in]*pdbPDB linked list
[in]DoAsxGlxHandle Asx and Glx as B and Z rather than X
[in]ProtOnlyDon't do DNA/RNA; these simply don't get done rather than being handled as X
[in]NoXSkip amino acids which would be assigned as X
Returns
A hash of 1-letter code sequences indexed by chain label

Reads sequence from ATOM records in 1-letter code, storing the results in a hash indexed by chain label.

This routine is normally called via the macro interfaces: PDB2SeqByCHain(pdb), PDB2SeqXByCHain(pdb), PDBProt2SeqByChain(pdb), PDBProt2SeqXByChain(pdb) Those with Prot in their names handle protein only; those with X handle Asx/Glx as B/Z rather than as X

Definition at line 294 of file PDB2Seq.c.