Skip to content

Commit

Permalink
Wrote code to map ids to sequence objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
shailen committed May 25, 2011
1 parent 2bf05ed commit 5bea51d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
Empty file modified README 100644 → 100755
Empty file.
15 changes: 15 additions & 0 deletions fc_rough.py 100644 → 100755
@@ -1,4 +1,19 @@
#!/usr/bin/python

from Bio import Phylo, AlignIO

tree_file = "sample_tree.ml"
msa_file = "sample_alignment.msa"
new_sequence_file = "new_sequence.fasta"

tree = Phylo.read(tree_file, "newick")
msa = AlignIO.read(msa_file, "fasta")

# Note: the name of the tree leaf nodes is going to be the
# same as the id of each msa entry

sequence_msa_map = {}
for entry in msa:
sequence_msa_map[entry.id] = entry


Empty file modified new_sequence.fasta 100644 → 100755
Empty file.
Empty file modified sample_alignment.msa 100644 → 100755
Empty file.
Empty file modified sample_tree.ml 100644 → 100755
Empty file.

0 comments on commit 5bea51d

Please sign in to comment.