Skip to content
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