def call_otus(seq_table_fh, fasta_fh, output_fh, dist_crit, abund_crit, pval_crit, log=None, membership=None):
'''
Read in input files, call OTUs, and return output.
seq_table_fh: filehandle
sequence count table
fasta_fh: filehandle or filename
sequences fasta
output_fh: filehandle
place to write main output OTU table
dist_crit, abund_crit, pval_crit: float
threshold values for distance, abundance, and pvalue
log, membership: filehandles
places to write supplementary output
'''
# read in the sequences table
seq_table = read_sequence_table(seq_table_fh)
# set up the input fasta records
records = SeqIO.index(fasta_fh, 'fasta')
# generate the caller object
caller = DBCaller(seq_table, records, dist_crit, abund_crit, pval_crit, log)
caller.generate_otu_table()
caller.write_otu_table(output_fh)
if membership is not None:
caller.write_membership(membership)
评论列表
文章目录