Did I find the right examples for you? yes no

# cogent.align.weights.util.PROTEIN_ORDER

All Samples(6)  |  Call(0)  |  Derive(0)  |  Import(6)

```from cogent.parse.tree import DndParser
from cogent.util.array import hamming_distance
from cogent.align.weights.util import Weights, number_of_pseudo_seqs,\
pseudo_seqs_exact, pseudo_seqs_monte_carlo, row_to_vote, distance_matrix,\
eigenvector_for_largest_eigenvalue, DNA_ORDER,RNA_ORDER,PROTEIN_ORDER,\
```
```            char_order = "ABC"
elif al is a: #need protein_order
char_order=PROTEIN_ORDER
else: #need DNA_order
char_order=DNA_ORDER
```

```from cogent.parse.tree import DndParser
from cogent.util.array import hamming_distance
from cogent.align.weights.util import Weights, number_of_pseudo_seqs,\
pseudo_seqs_exact, pseudo_seqs_monte_carlo, row_to_vote, distance_matrix,\
eigenvector_for_largest_eigenvalue, DNA_ORDER,RNA_ORDER,PROTEIN_ORDER,\
```
```            char_order = "ABC"
elif al is a: #need protein_order
char_order=PROTEIN_ORDER
else: #need DNA_order
char_order=DNA_ORDER
```

```from cogent.core.sequence import DnaSequence, RnaSequence
from cogent.core.moltype import DNA, RNA
from cogent.align.weights.util import Weights, number_of_pseudo_seqs,\
pseudo_seqs_exact, pseudo_seqs_monte_carlo, row_to_vote, distance_matrix,\
eigenvector_for_largest_eigenvalue, DNA_ORDER,RNA_ORDER,PROTEIN_ORDER,\
```

```from cogent.core.sequence import DnaSequence, RnaSequence
from cogent.core.moltype import DNA, RNA
from cogent.align.weights.util import Weights, number_of_pseudo_seqs,\
pseudo_seqs_exact, pseudo_seqs_monte_carlo, row_to_vote, distance_matrix,\
eigenvector_for_largest_eigenvalue, DNA_ORDER,RNA_ORDER,PROTEIN_ORDER,\
```

```from cogent.core.alignment import Alignment
from cogent.core.profile import Profile
from cogent.align.weights.util import DNA_ORDER, PROTEIN_ORDER
from cogent.align.weights.methods import VA, VOR, mVOR, pos_char_weights, PB,\
SS, ACL, GSC, _clip_branch_lengths, _set_branch_sum, _set_node_weight
```
```    def test_pos_char_weights(self):
"""pos_char_weights: should return correct contributions at each pos
"""
#build expected profile
exp_data = zeros([len(PROTEIN_ORDER),self.aln2.SeqLen],Float64)
```
```            for k,v in weights.items():
exp_data[PROTEIN_ORDER.index(k),pos] = v
exp_aln2 = Profile(exp_data,Alphabet=PROTEIN_ORDER)

#check observed against expected
```

```from cogent.core.alignment import Alignment
from cogent.core.profile import Profile
from cogent.align.weights.util import DNA_ORDER, PROTEIN_ORDER
from cogent.align.weights.methods import VA, VOR, mVOR, pos_char_weights, PB,\
SS, ACL, GSC, _clip_branch_lengths, _set_branch_sum, _set_node_weight
```
```    def test_pos_char_weights(self):
"""pos_char_weights: should return correct contributions at each pos
"""
#build expected profile
exp_data = zeros([len(PROTEIN_ORDER),self.aln2.SeqLen],Float64)
```
```            for k,v in weights.items():
exp_data[PROTEIN_ORDER.index(k),pos] = v
exp_aln2 = Profile(exp_data,Alphabet=PROTEIN_ORDER)

#check observed against expected
```