dbotu.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:amplicon_sequencing_pipeline 作者: thomasgurry 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号