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

KrakenUniq SE overwrites the output when there is an early dot in the sample name #533

Open
SannaAb opened this issue Sep 25, 2024 · 7 comments
Labels
bug Something isn't working high-priority

Comments

@SannaAb
Copy link

SannaAb commented Sep 25, 2024

Description of the bug

Hi,

I noticed that krakenuniq overwrites the outputs for SE samples if you have a dot in the sample name. This is not an issue for PE samples. I will attach the command.sh for both SE and PE.

Thank you so much for the help :)

Command used and terminal output

No response

Relevant files

commands.zip

System information

version 1.1.8

@SannaAb SannaAb added the bug Something isn't working label Sep 25, 2024
@jfy133
Copy link
Member

jfy133 commented Sep 26, 2024

Eek! Good eyes @SannaAb ! Will try to address ASAP

@jfy133
Copy link
Member

jfy133 commented Sep 26, 2024

@SannaAb can you supply an aexample samplesheet where this happens?

@jfy133
Copy link
Member

jfy133 commented Sep 26, 2024

OK I think I've replciated it by duplicating the 2612 SE in test.config and updating all the sample names int eh samplesheet to add . everywhere, iself note:

  • SE: /home/james/git/nf-core/taxprofiler/testing/work/fd/0dba3332867f2812521cf088e1d237 -> single output file 2612 (but two inputs)
  • PE: /home/james/git/nf-core/taxprofiler/testing/work/f2/22df431515fbef1f5f202b272eade6 -> multiple for 2612/2613 (multiple inputs)

@SannaAb
Copy link
Author

SannaAb commented Sep 26, 2024

SampleSheeet_Taxprofiler.csv

So fast! :D Thanks, if you still need an example sheet this should work.

@jfy133
Copy link
Member

jfy133 commented Sep 26, 2024

Basically this:

        strip_suffix() {
            local result=\$1
            # Strip any file extensions.
            echo "${result%%.*}"
        }

In the 'single end' condition of the PRELOADED_KRAKENUNIQ module is too aggressive beause %% is 'anything' whereas if we used just the single bash expansion operation of %.* it would only to the very last . (as used in the Paired End condition - but this is more complex).

However, this more aggresive %% bash expansion is problematic when we have .fastq.gz or .fastq files.

So need to find a way to account for both contexts.

@jfy133
Copy link
Member

jfy133 commented Sep 26, 2024

I've ran out of time and I'm away from this afternoon until Monday.

If @Midnighter happens to have time (as he wrote this module), maybe he can fix it in the meantime.

@jfy133
Copy link
Member

jfy133 commented Oct 4, 2024

            if [[ \$result =~ ".gz^"]]; then
                resulttmp=\${result%.gz}
                result="\${resulttmp%.*}"
            else;
                echo "\${result%.*}"
            fi

OI was trying this but it didn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority
Projects
None yet
Development

No branches or pull requests

2 participants