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

Incorrect BRACKEN_BRACKEN output session #4246

Open
2 tasks done
MajoroMask opened this issue Oct 27, 2023 · 1 comment
Open
2 tasks done

Incorrect BRACKEN_BRACKEN output session #4246

MajoroMask opened this issue Oct 27, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@MajoroMask
Copy link

Have you checked the docs?

Description of the bug

bracken output kraken2 style report with recalibrated reads count to a file with rather fixed name pattern (see here for bracken source code ):

new_report + '_bracken_' + abundance_lvl + extension

The abundance_lvl is depend on the input parameter bracken -l (default -l S), with the mapping rules as follow (also in the same source code):

#Abundance level
    lvl_dict = {}
    lvl_dict['D'] = 'domains'
    lvl_dict['P'] = 'phylums'
    lvl_dict['O'] = 'orders'
    lvl_dict['C'] = 'classes'
    lvl_dict['F'] = 'families'
    lvl_dict['G'] = 'genuses' 
    lvl_dict['S'] = 'species'
    abundance_lvl = args.level
    if args.level in lvl_dict:
        abundance_lvl = lvl_dict[args.level]

So the current BRACKEN_BRACKEN module's output session is not correct, where the abundance_lvl pattern is fixed.

    output:
    tuple val(meta), path(bracken_report)        , emit: reports
    tuple val(meta), path("*bracken_species.txt"), emit: txt  // HERE!
    path "versions.yml"          , emit: versions

This bug will cause the process throw an error when the bracken -l option is not default, eg: using 'S1'

Error executing process > 'BRACKEN_BRACKEN (2613_pe - virus - S1)'

Caused by:
[49/e36e7c] Submitted process > BRACKEN_BRACKEN (2613_pe - virus - S1)
  Missing output file(s) `*bracken_species.txt` expected by process `BRACKEN_BRACKEN (2613_pe - virus - S1)`

Inside the ${workDir}:

$ls -alhn
total 52K
drwxrwxr-x    2 1008     1008        4.0K Oct 27 03:11 .
drwxrwxr-x    4 1008     1008          94 Oct 27 03:11 ..
-rw-rw-r--    1 1008     1008           0 Oct 27 03:11 .command.begin
-rw-rw-r--    1 1008     1008          65 Oct 27 03:11 .command.err
-rw-rw-r--    1 1008     1008         938 Oct 27 03:11 .command.log
-rw-rw-r--    1 1008     1008         873 Oct 27 03:11 .command.out
-rw-rw-r--    1 1008     1008       10.1K Oct 27 03:11 .command.run
-rw-rw-r--    1 1008     1008         285 Oct 27 03:11 .command.sh
-rw-r--r--    1 1008     0            201 Oct 27 03:11 .command.trace
-rw-rw-r--    1 1008     1008           1 Oct 27 03:11 .exitcode
lrwxrwxrwx    1 1008     1008          60 Oct 27 03:11 20230926_virus -> /data/databases/bracken/20230926_virus
lrwxrwxrwx    1 1008     1008         103 Oct 27 03:11 2613_pe_standardized.kraken2.report.txt -> /proj/pipeline/work/e6/df555c1f09531369b3a507f38ddca2/2613_pe_standardized.kraken2.report.txt
-rw-r--r--    1 1008     0           3.1K Oct 27 03:11 2613_pe_standardized.kraken2.report_bracken_S1.txt
-rw-r--r--    1 1008     0            804 Oct 27 03:11 2613_pe_virus.S1.bracken.tsv
-rw-r--r--    1 1008     0             61 Oct 27 03:11 versions.yml

See bracken worked correctly, but the output filename did not match the pattern so the nf pipeline is stopped.

$cat .exitcode
0

Command used and terminal output

No response

Relevant files

No response

System information

No response

@youngje-cs-cmu
Copy link

Hello! Is this bug fixed, or can I ask when this issue will be addressed? I'm interested in obtaining a Bracken result with different levels, and wonder if this issue can be fixed soon. Thanks!

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

No branches or pull requests

2 participants