INNER CODE UNIT · Python

_to_tbl_iter_idx

steineggerlab/Metabuli · util/gtdb_to_taxdump.py:204

    def _to_tbl_iter_idx(self, vertex, idx):        
        for child in self.__graph_dict[vertex]:
            if child in self.__seen:
                continue
            self.__seen[child] = 1
            # tbl row
            idx[child] = str(self.__graph_nodeIDs[child])
            # children
            self._to_tbl_iter_idx(child, idx)
                
    def append_tbl(self, table_file, join_column):
        """ appending to table """
        # creating index: name : [taxID, rank] 
        idx = {}
        self.__seen = {}
        idx['root'] = str(self.__graph_nodeIDs['root'])
        self._to_tbl_iter_idx('root', idx)
    

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…