Beispiel #1
0
def main():
    option_parser, opts, args =\
     parse_command_line_parameters(**script_info)

    out_fh = open(opts.output_file,'w')
    otu_table_fh = open(opts.otu_table,'U')
    sample_ids, otu_ids, otu_mtx, otu_metadata = parse_otu_table(otu_table_fh)
    tree_fh = open(opts.tree_file,'U')
    tree = DndParser(tree_fh)

    res_sam_names, res_otus, res_otu_mtx, res_otu_metadata = \
     sim_otu_table(sample_ids, otu_ids, otu_mtx, otu_metadata, 
     tree, opts.num, opts.dissim)

    out_fh.write(format_otu_table(res_sam_names, res_otus, 
     res_otu_mtx, res_otu_metadata))
Beispiel #2
0
def main():
    option_parser, opts, args =\
     parse_command_line_parameters(**script_info)

    out_fh = open(opts.output_file,'w')
    otu_table_fh = open(opts.otu_table,'U')
    otu_table = parse_biom_table(otu_table_fh)
    tree_fh = open(opts.tree_file,'U')
    tree = DndParser(tree_fh)

    res_sam_names, res_otus, res_otu_mtx, res_otu_metadata = \
     sim_otu_table(otu_table.SampleIds, otu_table.ObservationIds, otu_table.iterSamples(), 
                   otu_table.ObservationMetadata, tree, opts.num, opts.dissim)


    rich_table = table_factory(res_otu_mtx,res_sam_names,res_otus,
    observation_metadata=res_otu_metadata)
    out_fh.write(format_biom_table(rich_table))
Beispiel #3
0
def main():
    option_parser, opts, args =\
     parse_command_line_parameters(**script_info)

    out_fh = open(opts.output_file, 'w')
    otu_table_fh = open(opts.otu_table, 'U')
    otu_table = parse_biom_table(otu_table_fh)
    tree_fh = open(opts.tree_file, 'U')
    tree = DndParser(tree_fh)

    res_sam_names, res_otus, res_otu_mtx, res_otu_metadata = \
     sim_otu_table(otu_table.SampleIds, otu_table.ObservationIds, otu_table.iterSamples(),
                   otu_table.ObservationMetadata, tree, opts.num, opts.dissim)

    rich_table = table_factory(res_otu_mtx,
                               res_sam_names,
                               res_otus,
                               observation_metadata=res_otu_metadata)
    out_fh.write(format_biom_table(rich_table))