def generate_otu_table(self):
'''
Process all the input sequences to make an OTU table.
returns: pandas.DataFrame
OTU table (which can also be found at instance.otu_table)
'''
for record_id in self.seq_abunds.index:
self._process_record(record_id)
self.otus.sort(key=lambda otu: otu.abundance, reverse=True)
self.otu_table = pd.DataFrame([otu.counts for otu in self.otus], index=[otu.name for otu in self.otus])
self.otu_table.columns = self.seq_table.columns
return self.otu_table
评论列表
文章目录