You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[ClearNote-Health/Overlord] Pipeline completed with errors-
ERROR ~ Error executing process > 'OVERLORD:CAT_CAT (1)'
Caused by:
The name of the input file can't be the same as for the output prefix in the module CAT_CAT (currently `xxxxx.1.aaaaa.003.bed.gz`). Please choose a different one. -- Check script 'workflows/../modules/nf-core/cat/cat/main.nf' at line: 43
I am attempting to merge several gz BED files with cat/cat. For reference here is what my input channel looks like
As you can see I would expect the output file to be named like xxxxx.2.aaaaa.bed.gz. However the cat_cat process is failing because it attempts to create an output file called xxxxx.1.aaaaa.003.bed.gz which has the same name of an input file (thankful that check exists!).
The cause of this error is the function defined in the module named getFileSuffix. This function incorrectly returns the suffix as.004.bed.gz, etc. because it attempts to find the suffix based on the first input file. I expect that it would return .bed.gz.
The stated intention of the function is "for .gz files also include the second to last extension if it is present. E.g., .fasta.gz"
The regex matcher in this function does not look right to me, it contains 3 capture groups (1 outer and 2 inner) and always grabs the outer. Also the regex looks for suffix patterns that are 1 to 5 chars long. This does not match the functions stated intention nor should there be an artificial limit.
I would also like to point out that I think the use of $prefix is not ideal in this module. The output of the cat command is directed to $prefix though prefix should default to the meta.id. I do not think it is good practice to manipulate it outside the context of the task.ext.prefix. I think it may be better to direct the output to a file that concatenates the $prefix and $suffix strings.
Command used and terminal output
No response
Relevant files
No response
System information
No response
The text was updated successfully, but these errors were encountered:
Have you checked the docs?
Description of the bug
I am attempting to merge several gz BED files with
cat/cat
. For reference here is what my input channel looks likeAs you can see I would expect the output file to be named like
xxxxx.2.aaaaa.bed.gz
. However thecat_cat
process is failing because it attempts to create an output file calledxxxxx.1.aaaaa.003.bed.gz
which has the same name of an input file (thankful that check exists!).The cause of this error is the function defined in the module named
getFileSuffix
. This function incorrectly returns the suffix as.004.bed.gz
, etc. because it attempts to find the suffix based on the first input file. I expect that it would return.bed.gz
.The stated intention of the function is "for .gz files also include the second to last extension if it is present. E.g., .fasta.gz"
The regex matcher in this function does not look right to me, it contains 3 capture groups (1 outer and 2 inner) and always grabs the outer. Also the regex looks for suffix patterns that are 1 to 5 chars long. This does not match the functions stated intention nor should there be an artificial limit.
I would also like to point out that I think the use of
$prefix
is not ideal in this module. The output of the cat command is directed to$prefix
thoughprefix
should default to the meta.id. I do not think it is good practice to manipulate it outside the context of thetask.ext.prefix
. I think it may be better to direct the output to a file that concatenates the$prefix
and$suffix
strings.Command used and terminal output
No response
Relevant files
No response
System information
No response
The text was updated successfully, but these errors were encountered: