Skip to content

Chain getSeqResSequence returns truncated sequence #294

Closed

Description

@pwrose

Example: PDB ID 102L

  • SEQRES record contains 165 residues
  • ATOM record contains 163 residues

Chain c = ...
String sequence = c.getSeqResSequence()

returns 163, instead of 165 residues.

Activity

  1. josemduarte commented on Jun 29, 2015

    @josemduarte
    Contributor

    I can't reproduce that. This is what I tried (I get the same result setting mmcif to true/false):

    public void test102l() throws IOException, StructureException {
            AtomCache cache = new AtomCache();
    
            StructureIO.setAtomCache(cache); 
    
            cache.setUseMmCif(true);
    
            FileParsingParameters params = new FileParsingParameters();
            params.setAlignSeqRes(true);
            cache.setFileParsingParams(params);
    
            Structure sCif = StructureIO.getStructure("102l");
    
            Chain c = sCif.getChain(0);
    
            System.out.println(c.getAtomSequence().length());
            System.out.println(c.getSeqResSequence().length());
        }

    Output is:

    163
    165
    
  2. pwrose commented on Jun 29, 2015

    @pwrose
    MemberAuthor

    Ah, wrong example. Sometimes there is an inconsistency between

    c.getSeqResSequence().length() and
    c.getSeqResGroups(GroupType.AMINOACID).size()

    For example: 1AN5. This is related to an extra non-standard N-terminal
    residue FMT at the beginning of the amino acid sequence.

    Perhaps this behavior is intended?

    On Mon, Jun 29, 2015 at 9:08 AM, Jose Manuel Duarte <
    [email protected]> wrote:

    I can't reproduce that. This is what I tried (I get the same result
    setting mmcif to true/false):

    public void test102l() throws IOException, StructureException {
    AtomCache cache = new AtomCache();

        StructureIO.setAtomCache(cache);
    
        cache.setUseMmCif(true);
    
        FileParsingParameters params = new FileParsingParameters();
        params.setAlignSeqRes(true);
        cache.setFileParsingParams(params);
    
        Structure sCif = StructureIO.getStructure("102l");
    
        Chain c = sCif.getChain(0);
    
        System.out.println(c.getAtomSequence().length());
        System.out.println(c.getSeqResSequence().length());
    }
    

    Output is:

    163
    165

    —
    Reply to this email directly or view it on GitHub
    #294 (comment).

    Peter Rose, Ph.D.
    Site Head, RCSB Protein Data Bank West (http://www.rcsb.org)
    San Diego Supercomputer Center (http://bioinformatics.sdsc.edu)
    University of California, San Diego
    +1-858-822-5497

  3. josemduarte commented on Jun 30, 2015

    @josemduarte
    Contributor

    Yes, that kind of cases are indeed difficult. In 1AN5 the FMT residue is linked to the N-terminal of the chain, but the chemical component does not annotate it as protein or peptide-linked (perhaps rightly).

    So in principle, it is right to get a different result for:

    c.getSeqResSequence().length()
    c.getSeqResGroups(GroupType.AMINOACID).size()

    since FMT is not an amino acid, but SEQRES contains the residue as part of the sequence.

    As a related thing, there is an issue with the current implementation of getAtomSequence/getSeqResSequence. They both depend on the property loadChemCompInfo (passed to the JVM with java -DloadChemCompInfo=true), if set to true the chemical component is looked up and then all peptide-linked residues are considered (including non standard amino acids). However if the property is not set, then only the standard amino acids are output (which is the best one can do, lacking other information). Perhaps we should simply default to always try to get the chemical component info. I've improved a bit the logging and docs for this: 77e0d1c

  4. andreasprlic commented on Jan 9, 2016

    @andreasprlic
    Member

    I believe this behaviour is intended and it depends on the correct parsing of Chemical Components.

  5. josemduarte commented on Jan 9, 2016

    @josemduarte
    Contributor

    Note that the underlying issue is being discussed in #315 and #337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions