+
Skip to content

Fix wrong key when updating module outputs #3665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

- Remove args stub from module template to satisfy language server ([#3403](https://github.com/nf-core/tools/pull/3403))
- Fix modules meta.yml file structure ([#3532](https://github.com/nf-core/tools/pull/3532))
- Fix wrong key when updating module outputs ([#3665](https://github.com/nf-core/tools/pull/3665))

### Subworkflows

Expand Down
22 changes: 11 additions & 11 deletions nf_core/modules/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def _find_meta_info(meta_yml, element_name, is_output=False) -> dict:
if isinstance(meta_channel, list):
for x, meta_element in enumerate(meta_channel):
if element_name == list(meta_element.keys())[0]:
return meta_yml[k][x][element_name]
return meta_yml[ch_name][k][x][element_name]
elif isinstance(meta_channel, dict):
if element_name == list(meta_channel.keys())[0]:
return meta_yml[ch_name][k][element_name]
Expand Down Expand Up @@ -356,18 +356,18 @@ def _find_meta_info(meta_yml, element_name, is_output=False) -> dict:
mod.outputs.copy()
) # eg. { bam: [[ {meta:{}}, {*.bam:{}} ]], reference: [ {*.fa:{}} ] } -> 2 channels, a tuple (list) and a single path (dict)
for ch_name in corrected_meta_yml["output"].keys():
ch_content = corrected_meta_yml["output"][ch_name][0]
if isinstance(ch_content, list):
for i, element in enumerate(ch_content):
element_name = list(element.keys())[0]
corrected_meta_yml["output"][ch_name][0][i][element_name] = _find_meta_info(
for i, ch_content in enumerate(corrected_meta_yml["output"][ch_name]):
if isinstance(ch_content, list):
for j, element in enumerate(ch_content):
element_name = list(element.keys())[0]
corrected_meta_yml["output"][ch_name][i][j][element_name] = _find_meta_info(
meta_yml["output"], element_name, is_output=True
)
elif isinstance(ch_content, dict):
element_name = list(ch_content.keys())[0]
corrected_meta_yml["output"][ch_name][i][element_name] = _find_meta_info(
meta_yml["output"], element_name, is_output=True
)
elif isinstance(ch_content, dict):
element_name = list(ch_content.keys())[0]
corrected_meta_yml["output"][ch_name][0][element_name] = _find_meta_info(
meta_yml["output"], element_name, is_output=True
)

def _add_edam_ontologies(section, edam_formats, desc):
expected_ontologies = []
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载