When I try to run Krona it tells me I have multipl...
# taxprofiler
m
When I try to run Krona it tells me I have multiple input files for each sample. I suspect it is referring to the fact that both the braken.txt and kraken2.txt files for the same sample are in the kraken2 folder. Is that what it means? If so, how can I run bracken as well as Krona?
(I don't have the save bracken intermediates flag on, it just did that)
j
Could you give the proper error message?
Such a conflict could be coming from different sources...
(and sounds like it may be abug)
m
Here is the error message with the execution list at the top. I have 48 samples but you can see at the Kraken2 step it turns to 96 as it makes both bracken and kraken2 files. [- ] NFC…PROCESSINGSHORTREAD FASTPFASTP_SINGLE - [08/286afa] NFC…SINGSHORTREAD FASTPFASTP_PAIRED (S41) | 48 of 48, cached: 48 ✔️ [3f/88be49] NFC…AD_PREPROCESSING:FASTQC_PROCESSED (S41) | 48 of 48, cached: 48 ✔️ [7f/45e204] NFC…:BOWTIE2_BUILD (GRCm38.p4.genome.fa.gz) | 1 of 1, cached: 1 ✔️ [f1/340a87] NFC…ORTREAD_HOSTREMOVAL:BOWTIE2_ALIGN (S41) | 48 of 48, cached: 48 ✔️ [21/30380d] NFC…RTREAD_HOSTREMOVAL:SAMTOOLS_INDEX (S41) | 48 of 48, cached: 48 ✔️ [7f/865123] NFC…RTREAD_HOSTREMOVAL:SAMTOOLS_STATS (S41) | 48 of 48, cached: 48 ✔️ [c9/e85f36] NFC…NG:KRAKEN2_KRAKEN2 (db1|bracken|S41_pe) | 96 of 96, cached: 35 ✔️ [02/ef9155] NFC…PROFILINGBRACKEN_BRACKEN (db1|S41_pe) | 48 of 48, cached: 16 ✔️ [85/590e38] NFC…RONA:KRAKENTOOLS_KREPORT2KRONA (S41_pe) | 96 of 96, cached: 33 ✔️ [- ] NFC…RVISUALIZATION KRONAKAIJU_KAIJU2KRONA - [b9/ec8bb3] NFC…UALIZATION_KRONA:KRONA_CLEANUP (S41_pe) | 96 of 96, cached: 32 ✔️ [- ] NFC…VISUALIZATION KRONAKRONA_KTIMPORTTEXT - [cf/95a695] NFC…N_PROFILES:TAXPASTA_MERGE (kraken2|db1) | 0 of 2 [- ] NFC…RDISATION_PROFILES:TAXPASTA_STANDARDISE - [b1/631f43] NFC…LES:BRACKEN_COMBINEBRACKENOUTPUTS (db1) | 1 of 1 ✔️ [- ] NFC…:KRAKENTOOLS_COMBINEKREPORTS_CENTRIFUGE - [- ] NFC…ION_PROFILES:KAIJU_KAIJU2TABLE_COMBINED - [78/034747] NFC…:KRAKENTOOLS_COMBINEKREPORTS_KRAKEN (1) | 1 of 1 ✔️ [- ] NFC…PROFILES:METAPHLAN_MERGEMETAPHLANTABLES - [- ] NFC…ERSTANDARDISATION PROFILESMOTUS_MERGE - [- ] NFC…ERSTANDARDISATION PROFILESGANON_TABLE - [- ] NFC…TAXPROFILER:CUSTOM_DUMPSOFTWAREVERSIONS - [- ] NFCORE_TAXPROFILERtaxprofilerMULTIQC - Execution cancelled -- Finishing pending tasks before exit ERROR ~ Error executing process > 'NFCORE_TAXPROFILERtaxprofilerVISUALIZATION_KRONA:KRONA_KTIMPORTTEXT (1)' Caused by: Process
NFCORE_TAXPROFILER:taxprofiler:VISUALIZATION_KRONA:KRONA_KTIMPORTTEXT
input file name collision -- There are multiple input files for each of the following file names: S42_pe_run1_db1.txt, S26_pe_run1_db1.txt, S11_pe_run1_db1.txt, S2_pe_run1_db1.txt, S30_pe_run1_db1.txt, S23_pe_run1_db1.txt, S19_pe_run1_db1.txt, S33_pe_run1_db1.txt, S5_pe_run1_db1.txt, S48_pe_run1_db1.txt, S14_pe_run1_db1.txt, S8_pe_run1_db1.txt, S45_pe_run1_db1.txt, S28_pe_run1_db1.txt, S4_pe_run1_db1.txt, S21_pe_run1_db1.txt, S36_pe_run1_db1.txt, S40_pe_run1_db1.txt, S24_pe_run1_db1.txt, S12_pe_run1_db1.txt, S27_pe_run1_db1.txt, S43_pe_run1_db1.txt, S46_pe_run1_db1.txt, S7_pe_run1_db1.txt, S15_pe_run1_db1.txt, S1_pe_run1_db1.txt, S18_pe_run1_db1.txt, S34_pe_run1_db1.txt, S31_pe_run1_db1.txt, S37_pe_run1_db1.txt, S6_pe_run1_db1.txt, S9_pe_run1_db1.txt, S3_pe_run1_db1.txt, S39_pe_run1_db1.txt, S22_pe_run1_db1.txt, S25_pe_run1_db1.txt, S13_pe_run1_db1.txt, S17_pe_run1_db1.txt, S16_pe_run1_db1.txt, S10_pe_run1_db1.txt, S44_pe_run1_db1.txt, S47_pe_run1_db1.txt, S35_pe_run1_db1.txt, S20_pe_run1_db1.txt, S41_pe_run1_db1.txt, S29_pe_run1_db1.txt, S38_pe_run1_db1.txt, S32_pe_run1_db1.txt Container: /scratch/mjustice/Lucas-Shotgun/work/singularity/depot.galaxyproject.org-singularity-krona-2.8.1--pl5321hdfd78af_1.img Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named
.command.sh
-- Check '.nextflow.log' file for details
j
(note it would make it much easier to read if you used triple backticks to use markdown codeblocks 🙂 )
markdownhelp
🙌 1
s
Using some code formatting helps with readability and finding the issue. Here are some tips about how to format code snippets nicely in Slack: http://tiny.cc/mdcodeblocks http://tiny.cc/slacksnippets
j
What are the names of your kraken2 and bracken databases in the database sheet? Are they both called
db1
?
m
They are both db1
And apologies for formatting issues 😓
j
That will be the reason! Give it a unique name and it should work (I'm a bit confused why this isn't checked for in our input validation actually, I thought I had set that up.../
@Sofia Stamouli @Lili Andersson-Li do you remember if this line: https://github.com/nf-core/taxprofiler/blob/1385e2f895938a5c655011cbbff26a9f3386c82e/assets/schema_database.json#L55 Implies that you need to have unique database names per tool? or that just tool and or db_name must be unique indepdnently?
I think ti's maybe meaning the latter...
Which would explain Megan's issue... but I wonder if we should just make only
db_name
unique, regardless of the tool
s
I thought that it was set up as unique database names per tool but it does not seem to be the case.
l
Agree with Sofia
j
Why don't you think it would be the case?
It would actually track with Megan's issue actually 🙂
👍 1
Because then you have both the krakcen and bracken database with the same name, but the bracken database is also used by kraken
👍 1
Do you see any harm to make only
db_name
unique?
s
I do not see any harm but from a user’s perspective they might prefer not to name the same database differently when using different tools.
j
hrmm
The other option is then we just append
-bracken
to the bracken database name
s
I think I might prefer this option. @Lili Andersson-Li?
l
I am confused that the input validation failed to check the unique combination of too+db_name since we have defined that in schema
j
But it was unique in @Megan Justice’s case
kraken2-db1
bracken-db1
that is unique
but the issue is we use
bracken-db1
in
kraken2
itself
and presumably would pull just
db1
l
Right
I can recall now
Then this sounds like a good option to me:
Copy code
The other option is then we just append -bracken to the bracken database name
👍 1
j
@Megan Justice would you mind making an issue?
m
On the GitHub you mean, right? Sorry, still relatively new to collaborating online and utilizing things like GitHub! I'm learning! 🙂 A few more related questions: 1. When I gave kraken2 the name db1 and bracken the name db2, there is still a db2 subfolder within the kraken2 folder. Is this the expected behavior? 2. The files within the kraken2/db2 folder have the name format ...bracken.kraken2.report.txt. Therefore I expected these to be the bracken counts. However, the count values in those files are the same as in the kraken2/db1/...kraken2.kraken2... files. I can access the adjusted counts by going into the bracken/db2 folder so I know that step ran all the way through. Should the counts in the .bracken.kraken2 file be the same as in the kraken2.kraken2 file? Can't thank you guys enough for all of your help!
j
1. That is expected! When you run bracken, you run kraken twice (Bracken is like a post-processing step) 2. If it's the identical database, just the bracken one has the extract
XXXkmer*
files, then yes, you would expect to to be teh same
m
Is it possible, then, to get a kraken2 style output with the corrected counts from bracken? I'd like to take the corrected counts downstream into things like Pavian but it does not accept the bracken outputs.
j
I think we report that by default 🤔 it shoudl be the
<sample>.kraken2.report_bracken.txt
file
in the bracken folder
m
Hmmmmm. In the bracken folder, I see this file: bracken_db2_combined_reports.txt and the db2/ folder containing the .tsv files. Nothing else. I tried importing the .txt report into Pavian but it is not accepted as input.
j
@Megan Justice sorry it's taken so long to get back to you travelling and I'm now sick)
I've just tried to replicate your error but I just can't seem to do it...
either our input validation either catches duplicates correctly, or the final report names looks OK
Copy code
james@bionb103:~/git/nf-core/taxprofiler/testing/results/krona (dev)$ l
kraken2-bracken_db2.html  kraken2_db2.html
So I can't find where your clash is coming from... Would it be possible for you to send me (can DM) the samplesheet and database sheet to see if I Can make a reproducible example and track down where the issue is coming from?
Also in terms of loading bracken into pavian, I don't know why Pavian is not accepting the bracken
kraqken2.report.txt
file, the output strucut looks identical to me:
Copy code
(nf-core) james@bionb103:~/git/nf-core/taxprofiler/testing/results/bracken/db2 (dev)$ head 2612_db2.bracken.kraken2.report_bracken.txt 
100.00  346     0       R       1       root
100.00  346     0       R1      131567    cellular organisms
100.00  346     0       D       2759        Eukaryota
100.00  346     0       D1      33154         Opisthokonta
90.17   312     0       K       33208           Metazoa
90.17   312     0       K1      6072              Eumetazoa
90.17   312     0       K2      33213               Bilateria
90.17   312     0       K3      33511                 Deuterostomia
90.17   312     312     P       7711                    Chordata
9.83    34      0       K       4751            Fungi
(nf-core) james@bionb103:~/git/nf-core/taxprofiler/testing/results/bracken/db2 (dev)$ head ../../kraken2/db2/2612_db2.bracken.kraken2.report.txt 
 99.97  1263774 1263774 U       0       unclassified
  0.03  346     0       R       1       root
  0.03  346     0       R1      131567    cellular organisms
  0.03  346     0       D       2759        Eukaryota
  0.03  346     0       D1      33154         Opisthokonta
  0.02  312     0       K       33208           Metazoa
  0.02  312     0       K1      6072              Eumetazoa
  0.02  312     0       K2      33213               Bilateria
  0.02  312     0       K3      33511                 Deuterostomia
  0.02  312     0       P       7711                    Chordata
Pavian says it's valid 🤷
@Sofia Stamouli you can proceed with release as I can't replicate this issue And @Megan Justice in addition to your samplesheet/database sheet, can you also send the command/config file too
m
James, Thanks for getting back to me! I'm swamped with some analysis but will get these to you ASAP
👍 1
@James Fellows Yates I was trying to find time to gather the files you requested but have been very backlogged with analyses lately - everyone is submitting things in preparation of the academic calendar holidays approaching in the US 😓 I feel as if my many attempts at rerunning that pipeline with small tweaks may have contributed to the issue. Is it okay with you if we consider it 'resolved' and I will let you know if i runt he pipeline again and have any issues? If you would like me to make time to find the files and write things up I can do that, but I feel like the issue was most likely a user error lol
j
That's completely fine! Yes, let's close it for now and we can investigate closer next time with more info 💪 Good luck with the submissions!