Skip to content
Snippets Groups Projects
Commit 30853393 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Update software report and generate references.

parent 6b717038
Branches
No related merge requests found
......@@ -17,6 +17,8 @@ params.cutoffRatio = 1.2
params.outDir= "$baseDir/output"
params.extendReadsLen = 100
params.topPeakCount = 600
params.references = "$baseDir/../docs/references.md"
// Check inputs
if( params.bwaIndex ){
......@@ -475,7 +477,7 @@ process diffPeaks {
"""
}
// Collect Software Versions
// Collect Software Versions and references
process softwareVersions {
input:
......
#!/usr/bin/env python
'''Make header for HTML of references.'''
import argparse
import subprocess
import shlex
import logging
EPILOG = '''
For more details:
%(prog)s --help
'''
# SETTINGS
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
logger.propagate = False
logger.setLevel(logging.INFO)
def get_args():
'''Define arguments.'''
parser = argparse.ArgumentParser(
description=__doc__, epilog=EPILOG,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('-r', '--reference',
help="The reference file (markdown format).",
required=True)
parser.add_argument('-o', '--output',
help="The out file name.",
default='references')
args = parser.parse_args()
return args
def main():
args = get_args()
reference = args.reference
output = args.output
out_filename = output + '_mqc.txt'
# Header for HTML
print('''
# id: 'References'
# section_name: 'References'
# description: 'This section describes references for the tools used.'
# plot_type: 'html'
'''
, file = open(out_filename, "w")
)
# Turn Markdown into HTML
references_html = 'bash -c "pandoc {} >> {}"'
references_html = references_html.format(reference, out_filename)
subprocess.check_call(shlex.split(references_html))
if __name__ == '__main__':
main()
......@@ -7,6 +7,7 @@ from __future__ import print_function
from collections import OrderedDict
import re
software_regex = {
'Trim Galore!': ['version_trimgalore.txt', r"version (\S+)"],
'Cutadapt': ['version_cutadapt.txt', r"Version (\S+)"],
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment