public class FastaAFPChainConverter extends Object
AFPChains
and FastaSequences
.StructureSequenceMatcher
,
FastaStructureParser
,
SeqRes2AtomAligner
Constructor and Description |
---|
FastaAFPChainConverter() |
Modifier and Type | Method and 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(ProteinSequence first,
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 |
cpFastaToAfpChain(String first,
String second,
Structure structure,
int cpSite) |
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(Map<String,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(ProteinSequence sequence1,
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 AFPChain |
fastaToAfpChain(SequencePair<Sequence<AminoAcidCompound>,AminoAcidCompound> alignment,
Structure structure1,
Structure structure2)
Provided only for convenience.
|
static AFPChain |
fastaToAfpChain(String sequence1,
String sequence2,
Structure structure1,
Structure structure2)
TODO Write comment
|
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.
|
public FastaAFPChainConverter()
public static AFPChain cpFastaToAfpChain(String first, String second, Structure structure, int cpSite) throws StructureException, CompoundNotFoundException
public static AFPChain cpFastaToAfpChain(File fastaFile, Structure structure, int cpSite) throws IOException, StructureException
cpSite
residues to the right.fastaFile
- A FASTA file containing exactly 2 sequences, the first unpermuted and the second permutedcpSite
- 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 acceptableIOException
StructureException
public static AFPChain cpFastaToAfpChain(ProteinSequence first, ProteinSequence second, Structure structure, int cpSite) throws StructureException
cpSite
residues to the right.first
- The unpermuted sequencesecond
- The sequence permuted by cpSitecpSite
- 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 acceptableStructureException
public static AFPChain fastaFileToAfpChain(File fastaFile, Structure structure1, Structure structure2) throws IOException, StructureException
fastaFile
, expecting exactly two sequences which give a pairwise alignment. Uses this and two structures to create an AFPChain corresponding to the alignment. Uses a
CasePreservingProteinSequenceCreator
and assumes that a residue is aligned if and only if it is given by an uppercase letter.public static AFPChain fastaStringToAfpChain(String sequence1, String sequence2, Structure structure1, Structure structure2) throws StructureException, CompoundNotFoundException
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.public static AFPChain fastaToAfpChain(Map<String,ProteinSequence> sequences, Structure structure1, Structure structure2) throws StructureException
sequences
- A Map containing exactly two entries from sequence names as Strings to gapped ProteinSequences; the name is ignoredStructureException
fastaToAfpChain(ProteinSequence, ProteinSequence, Structure, Structure)
public static AFPChain fastaToAfpChain(String sequence1, String sequence2, Structure structure1, Structure structure2) throws StructureException, CompoundNotFoundException
sequence1
- sequence2
- structure1
- structure2
- StructureException
CompoundNotFoundException
public static AFPChain fastaToAfpChain(ProteinSequence sequence1, ProteinSequence sequence2, Structure structure1, Structure structure2) throws StructureException
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.sequence1
- Must have AbstractSequence.getUserCollection()
set to document upper- and lower-case as aligned and unaligned; see getAlignedUserCollection(String)
StructureException
public static AFPChain fastaToAfpChain(SequencePair<Sequence<AminoAcidCompound>,AminoAcidCompound> alignment, Structure structure1, Structure structure2) throws StructureException
public static List<Object> getAlignedUserCollection(String sequence)
user collection
to record which letters are uppercase (aligned) and which are lowercase (unaligned).sequence
- Make sure not to use AbstractSequence.getSequenceAsString()
for this, as it won't preserve upper- and lower-casepublic static void main(String[] args) throws StructureException, IOException
args
- A String array of fasta-file structure-1-name structure-2-nameStructureException
IOException
Copyright © 2000–2018 BioJava. All rights reserved.