def get_taxa(taxa_fname, sample_ids_kept=None):
 taxa_f = open(taxa_fname, 'U')
 (sample_ids, otu_ids, otu_table, lineages) = parse_otu_table(taxa_f, count_map_f=float, remove_empty_rows=True)
 if sample_ids_kept:
  sam_idxs = [sample_ids.index(sam) for sam in sample_ids_kept]
  otu_table = otu_table[:, sam_idxs]
 return (otu_ids, otu_table)

def get_taxa ( taxa_fname , sample_ids_kept = None ) : taxa_f = open ( taxa_fname , 'U' ) ( sample_ids , otu_ids , otu_table , lineages ) = parse_otu_table ( taxa_f , count_map_f = float , remove_empty_rows = True ) if sample_ids_kept : sam_idxs = [ sample_ids . index ( sam ) for sam in sample_ids_kept ] otu_table = otu_table [ : , sam_idxs ] return ( otu_ids , otu_table )
opens and returns taxon summaries parameters sample_ids .