def consensus(bam_path: 'path to SAM/BAM file',
realign: 'attempt to reconstruct reference around soft-clip boundaries'=False,
min_depth: 'substitute Ns at coverage depths beneath this value'=2,
min_overlap: 'match length required to close soft-clipped gaps'=7,
clip_decay_threshold: 'read depth fraction at which to cease clip extension'=0.1,
mask_ends: 'ignore clip dominant positions within n positions of termini'=50,
trim_ends: 'trim ambiguous nucleotides (Ns) from sequence ends'=False,
uppercase: 'close gaps using uppercase alphabet'=False):
'''Infer consensus sequence(s) from alignment in SAM/BAM format'''
result = kindel.bam_to_consensus(bam_path,
realign,
min_depth,
min_overlap,
clip_decay_threshold,
mask_ends,
trim_ends,
uppercase)
print(result.report, file=sys.stderr)
SeqIO.write(result.consensuses, sys.stdout,'fasta')
评论列表
文章目录