|
3 | 3 | import yaml
|
4 | 4 |
|
5 | 5 | from nf_core.pipelines.lint_utils import ignore_file
|
| 6 | +from nf_core.utils import load_tools_config |
6 | 7 |
|
7 | 8 |
|
8 | 9 | def multiqc_config(self) -> dict[str, list[str]]:
|
@@ -98,17 +99,24 @@ def multiqc_config(self) -> dict[str, list[str]]:
|
98 | 99 | if "report_comment" not in ignore_configs:
|
99 | 100 | # Check that the minimum plugins exist and are coming first in the summary
|
100 | 101 | version = self.nf_config.get("manifest.version", "").strip(" '\"")
|
| 102 | + |
| 103 | + # Get the org from .nf-core.yml config, defaulting to "nf-core" |
| 104 | + _, nf_core_yaml_config = load_tools_config(self.wf_path) |
| 105 | + org_name = "nf-core" |
| 106 | + if nf_core_yaml_config and getattr(nf_core_yaml_config, "template", None): |
| 107 | + org_name = getattr(nf_core_yaml_config.template, "org", org_name) or org_name |
| 108 | + |
101 | 109 | if "dev" in version:
|
102 | 110 | version = "dev"
|
103 | 111 | report_comments = (
|
104 |
| - f'This report has been generated by the <a href="https://github.com/nf-core/{self.pipeline_name}/tree/dev" target="_blank">nf-core/{self.pipeline_name}</a>' |
| 112 | + f'This report has been generated by the <a href="https://github.com/{org_name}/{self.pipeline_name}/tree/dev" target="_blank">{org_name}/{self.pipeline_name}</a>' |
105 | 113 | f" analysis pipeline. For information about how to interpret these results, please see the "
|
106 | 114 | f'<a href="https://nf-co.re/{self.pipeline_name}/dev/docs/output" target="_blank">documentation</a>.'
|
107 | 115 | )
|
108 | 116 |
|
109 | 117 | else:
|
110 | 118 | report_comments = (
|
111 |
| - f'This report has been generated by the <a href="https://github.com/nf-core/{self.pipeline_name}/releases/tag/{version}" target="_blank">nf-core/{self.pipeline_name}</a>' |
| 119 | + f'This report has been generated by the <a href="https://github.com/{org_name}/{self.pipeline_name}/releases/tag/{version}" target="_blank">{org_name}/{self.pipeline_name}</a>' |
112 | 120 | f" analysis pipeline. For information about how to interpret these results, please see the "
|
113 | 121 | f'<a href="https://nf-co.re/{self.pipeline_name}/{version}/docs/output" target="_blank">documentation</a>.'
|
114 | 122 | )
|
|
0 commit comments