tools-iuc
tools-iuc copied to clipboard
Bug in MultiQC name conflict handling when >2 conflicts exist
In MultiQC, the inputs are symlinked based on the name and a conflict check is done to add an incrementing number to the name if multiple names collide. However, the unmodified name is checked before adding to the list, whereas the modified name is added to the list:
#if $file_path in $file_paths
#set $file_path += '_' + str($file_paths.count($file_path))
#end if
#set $file_paths += [$file_path]
This means that $file_paths.count($file_path)) will never be >1 for the initial $file_path and the collision of the _1 file will never be detected. I assume the correct fix is to append the original unmodified $file_path to $file_paths but would prefer someone more familiar with the tool verify.