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

kraken_file error when running MetaPhage (docker) #44

Closed
vanzyllj opened this issue May 10, 2022 · 23 comments
Closed

kraken_file error when running MetaPhage (docker) #44

vanzyllj opened this issue May 10, 2022 · 23 comments

Comments

@vanzyllj
Copy link

vanzyllj commented May 10, 2022

Hi There,

I get the following error when running MetaPhage even though the kraken2 and krona output files (*_output and *_report as well as *_krak_krona_abundancies.html) are created and the directory structure looks correct. Any idea where it might be going wrong?

**Error executing process > 'kraken_file (Creating the table...)'

Caused by:
  Process `kraken_file (Creating the table...)` terminated with an error exit status (1)

Command executed:

  Rscript /home/lonnie/MetaPhage/bin/Rscript/kraken_files.R /home/lonnie/MetaPhage_test metadata.csv

Command exit status:
  1

Command output:
   Input:  /home/lonnie/MetaPhage_test

Command error:
  Error: ERROR: taxonomy/kraken2 not found in: /home/lonnie/MetaPhage_test/taxonomy/kraken2
  Execution halted

Work dir**:  /home/lonnie/MetaPhage/work/fc/7042892072d65cde5b05740cc3c63d

Tip: you can replicate the issue by changing to the process work dir and entering the command bash .command.run****

Thank you in advance.

Regards
Lonnie

@vanzyllj
Copy link
Author

I'm using the Docker image btw.

@telatin
Copy link
Collaborator

telatin commented May 11, 2022

Hi, thanks for reporting. Are you using the 0.3 release or did you clone the repository?

@vanzyllj
Copy link
Author

I cloned into the repository

@vanzyllj vanzyllj changed the title Kraken2 error when running MetaPhage kraken_file error when running MetaPhage May 11, 2022
@telatin telatin changed the title kraken_file error when running MetaPhage kraken_file error when running MetaPhage (docker) May 19, 2022
@telatin
Copy link
Collaborator

telatin commented May 23, 2022

For
The records, I just tested the whole pipeline (both v0.3 and last commit) using docker and worked. Hence the issue is probably related to your specific dataset/metadata file. I will check a way to gather more info

@telatin
Copy link
Collaborator

telatin commented May 24, 2022

Did you create a "configuration file" using the provided "newProject.py" script?
See https://mattiapandolfovr.github.io/MetaPhage/new

Can you please upload the configuration file used?

@vanzyllj
Copy link
Author

vanzyllj commented May 25, 2022 via email

@MattiaPandolfoVR
Copy link
Owner

Hi Lonnie, could you please provide your metadata and config file? I fail to find them in the mail attachments.

@vanzyllj
Copy link
Author

vanzyllj commented May 25, 2022 via email

@MattiaPandolfoVR
Copy link
Owner

Hi again,

for some reason the mail has no attachments. Upload the files on Google drive and send me the folder link, thank you.

Regards
Mattia

@telatin
Copy link
Collaborator

telatin commented May 25, 2022

See https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/attaching-files to upload directly on github issue (not via mail).
Cheers
a

@vanzyllj
Copy link
Author

Here are the config and metadata files:

metadata.csv
nextflow.txt

@MattiaPandolfoVR
Copy link
Owner

Hi Lonnie,

your Sample names in the metadata.csv are numbers, which cause the sample_data() function to add the "sa" string in front. This function is used to create the phyloseq object, therefore the error: phyloseq tries to match the sample names in your count table (1 2 3 4) to these modified names (sa1, sa2, sa3, sa4), failing. I would suggest you to rename the samples adding some characters (e.g. sample1, sample2 etc).

Regards
Mattia

@vanzyllj
Copy link
Author

vanzyllj commented May 25, 2022 via email

@vanzyllj
Copy link
Author

Hi Mattia,

Unfortunately the change to the metadata file did not resolve the issue. Phyloseq still won't run. Please see the error below:

[a5/df1fca] process > summary (megahit) [100%] 1 of 1 ✔
[c1/fac0fa] process > file_chopper (megahit) [100%] 1 of 1 ✔
[- ] process > taxonomy_table (megahit) -
[30/f61abd] process > heatmap (megahit) [100%] 1 of 1, failed: 1 ✘
[- ] process > alpha_diversity [ 0%] 0 of 1
[- ] process > betadiversity [ 0%] 0 of 1
[- ] process > violin_plots [ 0%] 0 of 1
[- ] process > multiqc -
Error executing process > 'heatmap (megahit)'

Caused by:
Process heatmap (megahit) terminated with an error exit status (1)

Command executed:

Rscript /home/imbm-bioinformatics/Downloads/MetaPhage-0.3.0/bin/Rscript/heatmap.R count_table.csv taxonomy_table.csv metadata.csv library

Command exit status:
1

Command output:
(empty)

Command error:
Error in validObject(.Object) : invalid class “otu_table” object:
OTU abundance data must have non-zero dimensions.
Calls: filter_taxa ... .nextMethod -> callNextMethod -> .nextMethod -> validObject
Execution halted

Work dir:
/home/imbm-bioinformatics/Downloads/MetaPhage-0.3.0/work/30/f61abd786bdda3c28b76651a0f8d80

Tip: you can replicate the issue by changing to the process work dir and entering the command bash .command.run

Here are the new metadata and config files as well as the taxonomy and count tables:

metadata.csv

[nextflow.txt](https://github.com/MattiaPandolfoVR/MetaPhage/files/

count_table.csv

taxonomy_table.csv

@vanzyllj
Copy link
Author

nextflow.txt

@vanzyllj
Copy link
Author

vanzyllj commented May 31, 2022 via email

@MattiaPandolfoVR
Copy link
Owner

Hi Lonnie, sorry for the late reply,

No need to install different distros, the problem was related to the relative abundance filter applied to the phyloseq object, which i fixed. I already updated the code, download again the bin/Rscript folder only and launch MetaPhage (use -resume when you launch it to start from where it stopped). I hope this fix the issue!

Regards
Mattia

@vanzyllj
Copy link
Author

vanzyllj commented May 31, 2022 via email

@vanzyllj
Copy link
Author

vanzyllj commented Jun 1, 2022

Hi Mattia,

alpha diversity runs fine, however the heatmap and beta diversity still have issues.

The beta diversityy error is as follows:

Error executing process > 'betadiversity (megahit)'

Caused by:
Process betadiversity (megahit) terminated with an error exit status (1)

Command executed:

Rscript /home/imbm-bioinformatics/Downloads/MetaPhage-0.3.0/bin/Rscript/beta_diversity.R count_table.csv taxonomy_table.csv metadata.csv Site

Command exit status:
1

Command output:
(empty)

Command error:
Error in eval(expr, data, expr_env) : object 'Axis.2' not found
Calls: ... -> -> eval_expr -> eval -> eval
Execution halted

Whereas the heatmap error is:

Error executing process > 'heatmap (megahit)'

Caused by:
Process heatmap (megahit) terminated with an error exit status (1)

Command executed:

Rscript /home/imbm-bioinformatics/Downloads/MetaPhage-0.3.0/bin/Rscript/heatmap.R count_table.csv taxonomy_table.csv metadata.csv Site

Command exit status:
1

Command output:
(empty)

Command error:
Error in cluster::pam(sdata, k, diss = diss, ...) :
Number of clusters 'k' must be in {1,2, .., n-1}; hence n >= 2
Calls: %>% ... heatmaply.default -> heatmapr -> find_k -> pamk ->
Execution halted

The violin_plots error is:

Error executing process > 'violin_plots (megahit)'

Caused by:
Process violin_plots (megahit) terminated with an error exit status (1)

Command executed:

Rscript /home/imbm-bioinformatics/Downloads/MetaPhage-0.3.0/bin/Rscript/violin_plot.R count_table.csv taxonomy_table.csv metadata.csv Site

Command exit status:
1

Command output:
(empty)

Command error:
Error in file(filename, "r", encoding = encoding) :
cannot open the connection
Calls: shhh -> withCallingHandlers -> source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
cannot open file 'bin/Rscript/filter&CSSnormalize.R': No such file or directory
Execution halted

Regards
Lonnie

@MattiaPandolfoVR
Copy link
Owner

Hi Lonnie,

Your problem may be related to that "cannot open file 'bin/Rscript/filter&CSSnormalize.R': No such file or directory".
Are you sure you downloaded again the /bin/Rscript folder?

Regards,
Mattia

@vanzyllj
Copy link
Author

vanzyllj commented Jun 1, 2022

Hi Mattia,

Yes, that is the issue for violin plots, and it's easy enough to fix by editing the R.script file, but the other two are my main concern.

Regards
Lonnie

@MattiaPandolfoVR
Copy link
Owner

Hi there,

The problem was related to the sourcing of the filtering function. I updated the Rscripts using it, and tested (again) everything. It seems to work flawless, so download again the whole bin/Rscript folder to have the updated version. Let me know if the issue persist.

Regards,
Mattia

@vanzyllj
Copy link
Author

vanzyllj commented Jun 1, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants