How to use the mriqc.config.loggers.cli.info function in mriqc

To help you get started, we’ve selected a few mriqc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github poldracklab / mriqc / mriqc / reports / individual.py View on Github external
"provenance": iqms2html(prov, "provenance-table"),
        "md5sum": prov["md5sum"],
        "metadata": iqms2html(metadata, "metadata-table"),
        "pred_qa": pred_qa,
    }

    if _config["metadata"] is None:
        _config["workflow_details"].append(
            '<span class="warning">File has no metadata</span> '
            "<span>(sidecar JSON file missing or empty)</span>"
        )

    tpl = IndividualTemplate()
    tpl.generate_conf(_config, out_file)

    config.loggers.cli.info("Generated individual log (%s)", out_file)
    return out_file
github poldracklab / mriqc / mriqc / cli / run.py View on Github external
from ..utils.bids import DEFAULT_TYPES
        from ..reports import group_html
        from ..utils.misc import generate_tsv  # , generate_pred

        config.loggers.cli.info("Group level started...")

        # Generate reports
        mod_group_reports = []
        for mod in config.execution.modalities or DEFAULT_TYPES:
            output_dir = config.execution.output_dir
            dataframe, out_tsv = generate_tsv(output_dir, mod)
            # If there are no iqm.json files, nothing to do.
            if dataframe is None:
                continue

            config.loggers.cli.info(
                f"Generated summary TSV table for the {mod} data ({out_tsv})"
            )

            # out_pred = generate_pred(derivatives_dir, settings['output_dir'], mod)
            # if out_pred is not None:
            #     log.info('Predicted QA CSV table for the %s data generated (%s)',
            #                    mod, out_pred)

            out_html = output_dir / f"group_{mod}.html"
            group_html(
                out_tsv,
                mod,
                csv_failed=output_dir / f"group_variant-failed_{mod}.csv",
                out_file=out_html,
            )
            config.loggers.cli.info(f"Group-{mod} report generated ({out_html})")
github poldracklab / mriqc / mriqc / cli / run.py View on Github external
# run MRIQC
            mriqc_wf.run(**config.nipype.get_plugin())

            # Warn about submitting measures AFTER
            if not config.execution.no_sub:
                config.loggers.cli.warning(config.DSA_MESSAGE)
        config.loggers.cli.log(25, "Participant level finished successfully.")

    # Set up group level
    if "group" in config.workflow.analysis_level:
        from ..utils.bids import DEFAULT_TYPES
        from ..reports import group_html
        from ..utils.misc import generate_tsv  # , generate_pred

        config.loggers.cli.info("Group level started...")

        # Generate reports
        mod_group_reports = []
        for mod in config.execution.modalities or DEFAULT_TYPES:
            output_dir = config.execution.output_dir
            dataframe, out_tsv = generate_tsv(output_dir, mod)
            # If there are no iqm.json files, nothing to do.
            if dataframe is None:
                continue

            config.loggers.cli.info(
                f"Generated summary TSV table for the {mod} data ({out_tsv})"
            )

            # out_pred = generate_pred(derivatives_dir, settings['output_dir'], mod)
            # if out_pred is not None:
github poldracklab / mriqc / mriqc / cli / run.py View on Github external
#                    mod, out_pred)

            out_html = output_dir / f"group_{mod}.html"
            group_html(
                out_tsv,
                mod,
                csv_failed=output_dir / f"group_variant-failed_{mod}.csv",
                out_file=out_html,
            )
            config.loggers.cli.info(f"Group-{mod} report generated ({out_html})")
            mod_group_reports.append(mod)

        if not mod_group_reports:
            raise Exception("No data found. No group level reports were generated.")

        config.loggers.cli.info("Group level finished successfully.")
github poldracklab / mriqc / mriqc / cli / run.py View on Github external
f"Generated summary TSV table for the {mod} data ({out_tsv})"
            )

            # out_pred = generate_pred(derivatives_dir, settings['output_dir'], mod)
            # if out_pred is not None:
            #     log.info('Predicted QA CSV table for the %s data generated (%s)',
            #                    mod, out_pred)

            out_html = output_dir / f"group_{mod}.html"
            group_html(
                out_tsv,
                mod,
                csv_failed=output_dir / f"group_variant-failed_{mod}.csv",
                out_file=out_html,
            )
            config.loggers.cli.info(f"Group-{mod} report generated ({out_html})")
            mod_group_reports.append(mod)

        if not mod_group_reports:
            raise Exception("No data found. No group level reports were generated.")

        config.loggers.cli.info("Group level finished successfully.")