vcf_writer.py
def write_vcf_line(pileup_record, vcf, sample): 
    """ Writes a line from a pileup record for a given sample to given vcf file.
    
    Parameters
    ----------
    pileup_record: str
        Line of a pileup file to be written to VCF
    vcf: pysam.VariantFile
        VCF file where to write
    sample: str
        Name of a sample in the VCF file
    
    """
    
    record = vcf.header.new_record()
    record.contig = pileup_record['chromosome']
    record.pos = pileup_record['position']
    record.ref = pileup_record['ref_base']
    record.alts = pileup_record['alts']
    record.samples[sample]['GT'] = pileup_record['genotype']
    record.samples[sample]['VAF'] = str(pileup_record['vaf'])
    
    vcf.write(record)
 Writes a line from a pileup record for a given sample to given vcf file.
    
    Parameters
    ----------
    pileup_record: str
        Line of a pileup file to be written to VCF
    vcf: pysam.VariantFile
        VCF file where to write
    sample: str
        Name of a sample in the VCF file
    
    
Writes a line from a pileup record for a given sample to given vcf file.
Parameters

str
Line of a pileup file to be written to VCF
vcf: pysam.VariantFile
VCF file where to write
sample: str
Name of a sample in the VCF file
Writes a line from a pileup record for a given sample to given vcf file . Parameters str Line of a pileup file to be written to VCF vcf : pysam . VariantFile VCF file where to write sample : str Name of a sample in the VCF file
def write_vcf_line(pileup_record, vcf, sample): 
    record = vcf.header.new_record()
    record.contig = pileup_record['chromosome']
    record.pos = pileup_record['position']
    record.ref = pileup_record['ref_base']
    record.alts = pileup_record['alts']
    record.samples[sample]['GT'] = pileup_record['genotype']
    record.samples[sample]['VAF'] = str(pileup_record['vaf'])
    vcf.write(record)
def write_vcf_line ( pileup_record , vcf , sample ) : record = vcf . header . new_record ( ) record . contig = pileup_record [ 'chromosome' ] record . pos = pileup_record [ 'position' ] record . ref = pileup_record [ 'ref_base' ] record . alts = pileup_record [ 'alts' ] record . samples [ sample ] [ 'GT' ] = pileup_record [ 'genotype' ] record . samples [ sample ] [ 'VAF' ] = str ( pileup_record [ 'vaf' ] ) vcf . write ( record )
Writes a line from a pileup record for a given sample to given vcf file.
Writes a line from a pileup record for a given sample to given vcf file .
""" Writes a line from a pileup record for a given sample to given vcf file.
    
    Parameters
    ----------
    pileup_record: str
        Line of a pileup file to be written to VCF
    vcf: pysam.VariantFile
        VCF file where to write
    sample: str
        Name of a sample in the VCF file
    
    """
pileup_record
vcf
sample