taxprofiler / taxpasta

TAXnomic Profile Aggregation and STAndardisation
https://taxpasta.readthedocs.io/
Apache License 2.0
33 stars 7 forks source link

Issue regarding Taxpasta application in the kaiju classification tables.[BUG] #83

Closed LilyAnderssonLee closed 1 year ago

LilyAnderssonLee commented 1 year ago

Is there an existing issue for this?

Problem description

Issue regarding Taxpasta application in the kaiju classification tables.

Code sample

Code run:

nextflow run nfcore/taxprofiler/. -profile hasta,dev_prio,singularity --input samplesheet.csv --databases databases.csv --outdir kaiju/nfcore_default --save_preprocessed_reads --perform_shortread_qc --shortread_qc_mergepairs --perform_shortread_complexityfilter --save_complexityfiltered_reads --perform_longread_qc --perform_shortread_hostremoval --perform_longread_hostremoval --hostremoval_reference /home/proj/development/microbial/metagenomics/lili/references/GCF_000001405.39_GRCh38.p13_genomic.fna --save_hostremoval_index --save_hostremoval_mapped --save_hostremoval_unmapped --perform_ru
 nmerging --save_runmerged_reads --run_kaiju --kaiju_taxon_rank species --run_profile_standardisation --run_krona --standardisation_taxpasta_format tsv --taxpasta_taxonomy_dir database/taxonomy --taxpasta_add_name --taxpasta_add_rank -ansi-log false

Traceback:

nf-core/taxprofiler execution completed unsuccessfully!
The exit status of the task that caused the workflow execution to fail was: 1.

The full error message was:

Error executing process > 'NFCORE_TAXPROFILER:TAXPROFILER:STANDARDISATION_PROFILES:TAXPASTA_MERGE (kaiju)'

Caused by:
  Process `NFCORE_TAXPROFILER:TAXPROFILER:STANDARDISATION_PROFILES:TAXPASTA_MERGE (kaiju)` terminated with an error exit status (1)

Command executed:

  taxpasta merge \
      -p kaiju -o kaiju_kaiju.tsv --taxonomy database/taxonomy --add-name --add-rank \
       \
       \
      sample1_se_kaiju.kaijutable.txt sample2_se_kaiju.kaijutable.txt sample3_se_kaiju.kaijutable.txt sample4_se_kaiju.kaijutable.txt sampel5_se_kaiju.kaijutable.txt sample6_se_kaiju.kaijutable.txt sample7_se_kaiju.kaijutable.txt sample8_se_kaiju.kaijutable.txt sample9_se_kaiju.kaijutable.txt sample10_se_kaiju.kaijutable.txt sample11_se_kaiju.kaijutable.txt sample12_se_kaiju.kaijutable.txt

  cat <<-END_VERSIONS > versions.yml
  "NFCORE_TAXPROFILER:TAXPROFILER:STANDARDISATION_PROFILES:TAXPASTA_MERGE":
      taxpasta: $(taxpasta --version)
  END_VERSIONS

Command exit status:
  1

Command output:
  [18:21:48] CRITICAL Error in sample 'sample1_se_kaiju.kaijutable'  merge.py:422
                      with profile                                                
                      'sample1_se_kaiju.kaijutable.txt'.                         
             CRITICAL   schema_context   column             check     merge.py:425
                      check_number  failure_case index                            
                      0         Column  percent  compositionality                 
                      2         False  None                                       

Command wrapper:
  [18:21:48] CRITICAL Error in sample 'sample1_se_kaiju.kaijutable'  merge.py:422
                      with profile                                                
                      'sample1_se_kaiju.kaijutable.txt'.                         
             CRITICAL   schema_context   column             check     merge.py:425
                      check_number  failure_case index                            
                      0         Column  percent  compositionality                 
                      2         False  None                                       

Work dir:
  work/9d/97336e25a9468c7fa536cddd606eb8

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`

Environment

Anything else?

Here is the header of the sample1_se_kaiju.kaiju.tsv.

file percent reads taxon_id taxon_name sample1_se_kaiju.kaiju.tsv 2.190930 76859 727 taxonid:727 sample1_se_kaiju.kaiju.tsv 1.868985 65565 470 taxonid:470 sample1_se_kaiju.kaiju.tsv 1.720755 60365 90241 taxonid:90241 sample1_se_kaiju.kaiju.tsv 1.217598 42714 1906665 taxonid:1906665 sample1_se_kaiju.kaiju.tsv 1.048986 36799 664683 taxonid:664683

LilyAnderssonLee commented 1 year ago

I did find that the sum of the percent column is 100.002 @jfy133 @sofstam

If someone wants to test it, I can send it to you privately.

jfy133 commented 1 year ago

@Midnighter seems to be similar to the Bracken bug I believe

Midnighter commented 1 year ago

Yeah, too stringent float comparison.

hkaspersen commented 1 year ago

Hello! I am also having issues with this, even with the newest version of Taxprofiler. The total sum of the percent column is in this case 100.001. Has this fix not been implemented in Taxprofiler yet?

jfy133 commented 1 year ago

@hkaspersen Dev version of taxprofiler coming in ETA week should have the fixed version of taxpasta! Sorry teaching and baby got in the way

hkaspersen commented 1 year ago

No worries! Thanks for the update!