Class FastaAFPChainConverter

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static AFPChain cpFastaToAfpChain​(File fastaFile, Structure structure, int cpSite)
      Takes a structure and sequence corresponding to an alignment between a structure or sequence and itself (or even a structure with a sequence), where the result has a circular permutation site cpSite residues to the right.
      static AFPChain cpFastaToAfpChain​(String first, String second, Structure structure, int cpSite)  
      static AFPChain cpFastaToAfpChain​(org.biojava.nbio.core.sequence.ProteinSequence first, org.biojava.nbio.core.sequence.ProteinSequence second, Structure structure, int cpSite)
      Takes a structure and sequence corresponding to an alignment between a structure or sequence and itself (or even a structure with a sequence), where the result has a circular permutation site cpSite residues to the right.
      static AFPChain fastaFileToAfpChain​(File fastaFile, Structure structure1, Structure structure2)
      Reads the file fastaFile, expecting exactly two sequences which give a pairwise alignment.
      static AFPChain fastaStringToAfpChain​(String sequence1, String sequence2, Structure structure1, Structure structure2)
      Returns an AFPChain corresponding to the alignment between structure1 and structure2, which is given by the gapped protein sequences sequence1 and sequence2.
      static AFPChain fastaToAfpChain​(String sequence1, String sequence2, Structure structure1, Structure structure2)
      TODO Write comment
      static AFPChain fastaToAfpChain​(Map<String,​org.biojava.nbio.core.sequence.ProteinSequence> sequences, Structure structure1, Structure structure2)
      Uses two sequences each with a corresponding structure to create an AFPChain corresponding to the alignment.
      static AFPChain fastaToAfpChain​(org.biojava.nbio.core.alignment.template.SequencePair<org.biojava.nbio.core.sequence.template.Sequence<org.biojava.nbio.core.sequence.compound.AminoAcidCompound>,​org.biojava.nbio.core.sequence.compound.AminoAcidCompound> alignment, Structure structure1, Structure structure2)
      Provided only for convenience.
      static AFPChain fastaToAfpChain​(org.biojava.nbio.core.sequence.ProteinSequence sequence1, org.biojava.nbio.core.sequence.ProteinSequence sequence2, Structure structure1, Structure structure2)
      Returns an AFPChain corresponding to the alignment between structure1 and structure2, which is given by the gapped protein sequences sequence1 and sequence2.
      static List<Object> getAlignedUserCollection​(String sequence)
      Takes a protein sequence string with capital and lowercase letters and sets its user collection to record which letters are uppercase (aligned) and which are lowercase (unaligned).
      static void main​(String[] args)
      Prints out the XML representation of an AFPChain from a file containing exactly two FASTA sequences.
    • Constructor Detail

      • FastaAFPChainConverter

        public FastaAFPChainConverter()
    • Method Detail

      • cpFastaToAfpChain

        public static AFPChain cpFastaToAfpChain​(File fastaFile,
                                                 Structure structure,
                                                 int cpSite)
                                          throws IOException,
                                                 StructureException
        Takes a structure and sequence corresponding to an alignment between a structure or sequence and itself (or even a structure with a sequence), where the result has a circular permutation site cpSite residues to the right.
        Parameters:
        fastaFile - A FASTA file containing exactly 2 sequences, the first unpermuted and the second permuted
        cpSite - The number of residues from the beginning of the sequence at which the circular permutation site occurs; can be positive or negative; values greater than the length of the sequence are acceptable
        Throws:
        IOException
        StructureException
      • cpFastaToAfpChain

        public static AFPChain cpFastaToAfpChain​(org.biojava.nbio.core.sequence.ProteinSequence first,
                                                 org.biojava.nbio.core.sequence.ProteinSequence second,
                                                 Structure structure,
                                                 int cpSite)
                                          throws StructureException
        Takes a structure and sequence corresponding to an alignment between a structure or sequence and itself (or even a structure with a sequence), where the result has a circular permutation site cpSite residues to the right.
        Parameters:
        first - The unpermuted sequence
        second - The sequence permuted by cpSite
        cpSite - The number of residues from the beginning of the sequence at which the circular permutation site occurs; can be positive or negative; values greater than the length of the sequence are acceptable
        Throws:
        StructureException
      • fastaStringToAfpChain

        public static AFPChain fastaStringToAfpChain​(String sequence1,
                                                     String sequence2,
                                                     Structure structure1,
                                                     Structure structure2)
                                              throws StructureException,
                                                     org.biojava.nbio.core.exceptions.CompoundNotFoundException
        Returns an AFPChain corresponding to the alignment between structure1 and structure2, which is given by the gapped protein sequences sequence1 and sequence2. The sequences need not correspond to the entire structures, since local alignment is performed to match the sequences to structures.
        Throws:
        StructureException
        org.biojava.nbio.core.exceptions.CompoundNotFoundException
      • fastaToAfpChain

        public static AFPChain fastaToAfpChain​(String sequence1,
                                               String sequence2,
                                               Structure structure1,
                                               Structure structure2)
                                        throws StructureException,
                                               org.biojava.nbio.core.exceptions.CompoundNotFoundException
        TODO Write comment
        Parameters:
        sequence1 -
        sequence2 -
        structure1 -
        structure2 -
        Returns:
        Throws:
        StructureException
        org.biojava.nbio.core.exceptions.CompoundNotFoundException
      • fastaToAfpChain

        public static AFPChain fastaToAfpChain​(org.biojava.nbio.core.sequence.ProteinSequence sequence1,
                                               org.biojava.nbio.core.sequence.ProteinSequence sequence2,
                                               Structure structure1,
                                               Structure structure2)
                                        throws StructureException
        Returns an AFPChain corresponding to the alignment between structure1 and structure2, which is given by the gapped protein sequences sequence1 and sequence2. The sequences need not correspond to the entire structures, since local alignment is performed to match the sequences to structures. Assumes that a residue is aligned if and only if it is given by an uppercase letter.
        Parameters:
        sequence1 - Must have AbstractSequence.getUserCollection() set to document upper- and lower-case as aligned and unaligned; see getAlignedUserCollection(String)
        Throws:
        StructureException
      • getAlignedUserCollection

        public static List<Object> getAlignedUserCollection​(String sequence)
        Takes a protein sequence string with capital and lowercase letters and sets its user collection to record which letters are uppercase (aligned) and which are lowercase (unaligned).
        Parameters:
        sequence - Make sure not to use AbstractSequence.getSequenceAsString() for this, as it won't preserve upper- and lower-case