Sequence
(fasta=None, pdb=None, canonicalise=False)[source]¶Bases: object
A class to handle a fasta file
Methods
add_pdb_data (pdbin) |
Add the resseq information from a pdb to ourselves when we already have the sequence information from a fasta file - such as from an alignment |
canonicalise () |
Reformat the fasta file |
mutate_residue (from_aa, res_seq, to_aa[, seq_id]) |
Change residue type from_aa at position res_seq to be of type to_aa |
pirStr ([seqNo]) |
Return a canonical MAXWIDTH PIR representation of the file as a line-separated string |
toPir (input_fasta[, output_pir]) |
Take a fasta file and output the corresponding PIR file |
fasta_str | |
from_fasta | |
from_pdb | |
length | |
numSequences | |
sequence | |
write_fasta |
add_pdb_data
(pdbin)[source]¶Add the resseq information from a pdb to ourselves when we already have the sequence information from a fasta file - such as from an alignment We assume that there will be gaps (-) in the sequence and the letters may be upper or lower case Currently this only supports adding data for single-chain pdbs
mutate_residue
(from_aa, res_seq, to_aa, seq_id=0)[source]¶Change residue type from_aa at position res_seq to be of type to_aa
Note: res_seq positions start from 1 not zero!
Parameters: |
|
---|
pirStr
(seqNo=0)[source]¶Return a canonical MAXWIDTH PIR representation of the file as a line-separated string