def import_tree_order_from_file(self, MyOrganismDB, filename):

        '''
        Import the accession list that has been ordered by position
        in a phylogenetic tree. Get the index in the list, and
        add this to the Organism object. Later we can use this position
        to make a heatmap that matches up to a phylogenetic tree.
        '''
       
        tree_order = [acc.strip() for acc in open(filename)]
        #print tree_order

        for org in MyOrganismDB.organisms:
            for tree_accession in tree_order:
                #print tree_accession
                if org.accession == tree_accession:
                    org.tree_order = tree_order.index(tree_accession)