def run(args): v_info = vaf_info(base_count(args.bam, args.min_MQ, args.min_BQ)) header = ('#chr\tpos\tref\talt\tvaf\t' + 'depth\tref_n\talt_n\tp_binom') printer(header) for snv in args.infile: if snv[0] == '#': continue chrom, pos, ref, alt = snv.strip().split()[:4] printer('{chrom}\t{pos}\t{ref}\t{alt}\t{vaf_info}'.format( chrom=chrom, pos=pos, ref=ref.upper(), alt=alt.upper(), vaf_info=v_info.send((chrom, pos, ref, alt))))
def run(args): alt_BQ_info = alt_BQ_sum( base_qual_tuple(args.bam, args.min_MQ, args.min_BQ)) header = '#chr\tpos\tref\talt\talt_n\talt_BQ_sum' printer(header) for snv in args.infile: if snv[0] == '#': continue chrom, pos, ref, alt = snv.strip().split()[:4] printer('{chrom}\t{pos}\t{ref}\t{alt}\t{alt_BQ_info}'.format( chrom=chrom, pos=pos, ref=ref.upper(), alt=alt.upper(), alt_BQ_info=alt_BQ_info.send((chrom, pos, alt))))
def run(args): s_info = strand_info(base_count(args.bam, args.min_MQ, args.min_BQ)) header = ('#chr\tpos\tref\talt\t' + 'total\ttotal_fwd\ttotal_rev\ttotal_ratio\t' + 'p_poisson\t' + 'ref_n\tref_fwd\tref_rev\tref_ratio\t' + 'alt_n\talt_fwd\talt_rev\talt_ratio\t' + 'p_fisher') printer(header) for snv in args.infile: if snv[0] == '#': continue chrom, pos, ref, alt = snv.strip().split()[:4] printer('{chrom}\t{pos}\t{ref}\t{alt}\t{strand_info}'.format( chrom=chrom, pos=pos, ref=ref.upper(), alt=alt.upper(), strand_info=s_info.send((chrom, pos, ref, alt))))