wf-transcriptomes-v202/bin/report.py
2021-07-23 16:49:32 +01:00

43 lines
1.2 KiB
Python
Executable File

#!/usr/bin/env python
"""Create workflow report."""
import argparse
from aplanat.components import fastcat
from aplanat.components import simple as scomponents
from aplanat.report import WFReport
import conda_versions
def main():
"""Run the entry point."""
parser = argparse.ArgumentParser()
parser.add_argument("report", help="Report output file")
parser.add_argument("summaries", nargs='+', help="Read summary file.")
parser.add_argument(
"--versions", required=True,
help="directory containing CSVs containing name,version.")
parser.add_argument(
"--revision", default='unknown',
help="git branch/tag of the executed workflow")
parser.add_argument(
"--commit", default='unknown',
help="git commit of the executed workflow")
args = parser.parse_args()
report = WFReport(
"Workflow Template Sequencing report", "wf-template",
revision=args.revision, commit=args.commit)
report.add_section(
section=fastcat.full_report(args.summaries))
report.add_section(
section=scomponents.version_table(args.versions))
# write report
report.write(args.report)
if __name__ == "__main__":
main()