Changeset 5771


Ignore:
Timestamp:
Dec 3, 2019, 11:54:18 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #1208: Implement wizard for building database of variant frequencies in SCAN-B samples

Added a logfile to get some summary statistics.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other/pipeline/trunk/mut_stats.py

    r5769 r5771  
    44
    55Script that calculates statistics for variants in a list of VCF files.
    6 The script need two parameters:
     6The script need three parameters:
    77
    881: Path to text file with list of VCF files to process (se below)
    992: Path to progress reporting file
     103: Path to a log file
    1011
    1112The text file given as the first parameter should be a tab-separated
     
    102103
    103104progressFile = sys.argv[2]
     105logFile = sys.argv[3]
    104106
    105107# Load the VCF files and count the variants in them
     
    116118        nextProgressReport = time.time()+15
    117119    loadVcf(cols[1], cols[0])
     120
     121# Write the log file
     122with open(logFile, 'w') as log:
     123    log.write("NumberOfVCF: {0}\n".format(tots[0]))
     124    log.write("NumberOfPatients: {0}\n".format(tots[1]))
     125    log.write("NumberOfVariants: {0}\n".format(len(allVariants)))
    118126
    119127# Generate header for the output VCF
Note: See TracChangeset for help on using the changeset viewer.