How to view Kraken2 Results in Krona?

Good morning,

You can convert Kraken data to a format compatible with Krona by using the Convert Kraken data to Galaxy taxonomy representation tool, available at usegalaxy.org and .eu, as well as installable from the toolshed. I haven’t checked whether it’s compatible with kraken2 output, but since I was involved in its development, it would fall on me to update it if it isn’t.

1 Like

That tool supports the kraken results…

It is not working for the results of Kraken2.

1 Like

Good to know. We’ll have to create one for Kraken2, then.

1 Like

Hi , I am trying to install kraken2 databases through data manger. Its giving me an URL error to download the databases. Can you please check if the URL provided is correct?.
here is the error:
Fatal error: Exit code 1 ()
Possible unintended interpolation of @2 in string at /dep/_conda/envs/__kraken2@2.0.7_beta/bin/kraken2 line 16.
Traceback (most recent call last):
File “/data/shed_tools/testtoolshed.g2.bx.psu.edu/repos/dfornika/data_manager_build_kraken2_database/65cbfb5e6f65/data_manager_build_kraken2_database/data_manager/kraken2_build_minikraken.py”, line 100, in
main()
File “/data/shed_tools/testtoolshed.g2.bx.psu.edu/repos/dfornika/data_manager_build_kraken2_database/65cbfb5e6f65/data_manager_build_kraken2_database/data_manager/kraken2_build_minikraken.py”, line 93, in main
target_directory,
File “/data/shed_tools/testtoolshed.g2.bx.psu.edu/repos/dfornika/data_manager_build_kraken2_database/65cbfb5e6f65/data_manager_build_kraken2_database/data_manager/kraken2_build_minikraken.py”, line 44, in kraken2_build_minikraken
% minikraken2_version
File “/usr/lib64/python2.7/urllib2.py”, line 154, in urlopen
return opener.open(url, data, timeout)
File “/usr/lib64/python2.7/urllib2.py”, line 437, in open
response = meth(req, response)
File “/usr/lib64/python2.7/urllib2.py”, line 550, in http_response
‘http’, request, response, code, msg, hdrs)
File “/usr/lib64/python2.7/urllib2.py”, line 475, in error
return self._call_chain(*args)
File “/usr/lib64/python2.7/urllib2.py”, line 409, in _call_chain
result = func(*args)
File “/usr/lib64/python2.7/urllib2.py”, line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found

1 Like

Hi - You are using the version from the Test ToolShed. Tools there are for development (only) and can present with many problems.

You’ll need to either consider using the original Kraken tools/DM or wait for the Kraken2 DM to be ready. I don’t have an issue ticket yet for you to track but will check or create one and link it back.

I’ll also ping the developer at Gitter to see if they have any advice. They may post back here or at Gitter. Feel free to jump into the conversation either place. https://gitter.im/galaxy-iuc/iuc?at=5cc0add23b6cb0686a484480

Hi @JayanthiG, the kraken2 data manager is a work-in-progress. When it’s complete, it will be uploaded to the main toolshed under ownership of the iuc (Intergalactic Utilities Commission) group.

My progress on the data manager can be viewed on this pull request:

There is one thing that I could try in the short-term, though I’m not sure that it would solve your issue. I’m not sure that I’ve pushed the latest version of the data manager to the test toolshed. I’ll do that, then you could try re-installing the latest version to see if it works (unfortunately I can’t promise that it will).

1 Like

@JayanthiG I’ve attempted to update the test toolshed but it appears that it is already up-to-date. The latest revision is 29:65cbfb5e6f65 from 2019-03-29.

Based on your error message, it looks like the URL that was being used to download the minikraken database is invalid. I’ve just looked at the kraken2 site and it looks like they’ve re-organized the download links for the minikraken db recently (around 2019-04-23):

https://ccb.jhu.edu/software/kraken2/downloads.shtml

I’ll need to update the data manager to use the new links. The best way to stay up-to-date on the state of this tool is to watch the GitHub pull-request I linked to above.

1 Like

Great!. Thanks so much.

Thanks Dan.

@JayanthiG I’ve updated the URL in the data manager and pushed the update to both my GitHub pull-request and to the Test Toolshed. The latest revision (30:0aaff8fb824d) should pull the minikraken2 database from the correct location now.

Thanks so much Dan. Appreciate your help on it!.

Jayanthi

Hi Dan,

Please check the NCBI paths also corrected in the data manager to download the bacterial and viral databases via kraken2.

Fatal error: Exit code 1 ()

Possible unintended interpolation of @2 in string at /dep/_conda/envs/__kraken2@2.0.7_beta/bin/kraken2 line 16.

Possible unintended interpolation of @2 in string at /dep/_conda/envs/__kraken2@2.0.7_beta/bin/kraken2-build line 15.

Possible unintended interpolation of @2 in string at /dep/_conda/envs/__kraken2@2.0.7_beta/libexec/kraken2-build line 15.

Downloading nucleotide est accession to taxon map…rsync: link_stat “/taxonomy/accession2taxid/nucl_est.accession2taxid.gz” (in pub) failed: No such
file or directory (2)

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1650) [Receiver=3.1.2]

Traceback (most recent call last):

File “/data/shed_tools/testtoolshed.g2.bx.psu.edu/repos/dfornika/data_manager_build_kraken2_database/65cbfb5e6f65/data_manager_build_kraken2_database/data_manager/kraken2_build_standard.py”,
line 113, in

main()

File “/data/shed_tools/testtoolshed.g2.bx.psu.edu/repos/dfornika/data_manager_build_kraken2_database/65cbfb5e6f65/data_manager_build_kraken2_database/data_manager/kraken2_build_standard.py”,
line 106, in main

target_directory,

File “/data/shed_tools/testtoolshed.g2.bx.psu.edu/repos/dfornika/data_manager_build_kraken2_database/65cbfb5e6f65/data_manager_build_kraken2_database/data_manager/kraken2_build_standard.py”,
line 47, in kraken2_build_standard

subprocess.check_call([‘kraken2-build’] + args, cwd=target_directory)

File “/usr/lib64/python2.7/subprocess.py”, line 542, in check_call

raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command ‘[‘kraken2-build’, ‘–threads’, ‘1’, ‘–standard’, ‘–kmer-len’, ‘35’, ‘–minimizer-len’, ‘31’, ‘–minimizer-spaces’,
‘6’, ‘–db’, ‘2019-04-24T222820Z_standard_kmer-len35_minimizer-len31_minimizer-spaces6’]’ returned non-zero exit status 23

Thanks,

Jayanthi

Hmm, thanks for reporting, but that may need to be fixed in kraken2 itself. The ‘standard’ data manager works a bit differently. It launches kraken2-build --standard, which handles finding and downloading the data from NCBI. So if there is a problem with those URLs it will need to be fixed in the kraken2 codebase.

I’ll try running kraken2-build directly on the command-line and see if that has the same problem.

@JayanthiG It looks like this issue has been fixed in a recent commit:

…but there hasn’t been a kraken2 release since that commit, so the fixed version isn’t available on bioconda or galaxy.

Dan,

I have tried to install it with the latest revision. But it gives me the error.

Jayanthi

@JayanthiG which error are you referring to this time? Which database are you trying to build?

I am trying to download NCBI databases through data manger using
Kraken2 Standard Database Builder database builder (Galaxy Version 2.0.7_beta)

An error occured while running the tool testtoolshed.g2.bx.psu.edu/repos/dfornika/data_manager_build_kraken2_database/kraken2_build_standard/2.0.7_beta.

Tool execution generated the following messages:

Fatal error: Exit code 1 ()

Possible unintended interpolation of @2 in string at /dep/_conda/envs/__kraken2@2.0.7_beta/bin/kraken2 line 16.

Possible unintended interpolation of @2 in string at /dep/_conda/envs/__kraken2@2.0.7_beta/bin/kraken2-build line 15.

Possible unintended interpolation of @2 in string at /dep/_conda/envs/__kraken2@2.0.7_beta/libexec/kraken2-build line 15.

Downloading nucleotide est accession to taxon map…rsync: link_stat “/taxonomy/accession2taxid/nucl_est.accession2taxid.gz” (in pub) failed: No such
file or directory (2)

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1650) [Receiver=3.1.2]

Traceback (most recent call last):

File “/data/shed_tools/testtoolshed.g2.bx.psu.edu/repos/dfornika/data_manager_build_kraken2_database/65cbfb5e6f65/data_manager_build_kraken2_database/data_manager/kraken2_build_standard.py”,
line 113, in

main()

File “/data/shed_tools/testtoolshed.g2.bx.psu.edu/repos/dfornika/data_manager_build_kraken2_database/65cbfb5e6f65/data_manager_build_kraken2_database/data_manager/kraken2_build_standard.py”,
line 106, in main

target_directory,

File “/data/shed_tools/testtoolshed.g2.bx.psu.edu/repos/dfornika/data_manager_build_kraken2_database/65cbfb5e6f65/data_manager_build_kraken2_database/data_manager/kraken2_build_standard.py”,
line 47, in kraken2_build_standard

subprocess.check_call([‘kraken2-build’] + args, cwd=target_directory)

File “/usr/lib64/python2.7/subprocess.py”, line 542, in check_call

raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command ‘[‘kraken2-build’, ‘–threads’, ‘1’, ‘–standard’, ‘–kmer-len’, ‘35’, ‘–minimizer-len’, ‘31’, ‘–minimizer-spaces’,
‘6’, ‘–db’, ‘2019-04-24T222820Z_standard_kmer-len35_minimizer-len31_minimizer-spaces6’]’ returned non-zero exit status 23

@JayanthiG Yes, that is out of my control. There will have to be a new release of kraken2 in order for that functionality to be fixed.

There was a recent request on the kraken2 GitHub issue tracker to tag a new release but it will be up to the maintainers of that repository to decide when to tag the next release

@JayanthiG Yes, that is out of my control. There will have to be a new release of kraken2 in order for that functionality to be fixed.

There was a recent request on the kraken2 GitHub issue tracker to tag a new release but it will be up to the maintainers of that repository to decide when to tag the next release

Edit: kraken2-2.0.8-beta has been released. Once it’s been updated in bioconda then the galaxy tool can be update to use the latest version.

2 posts were split to a new topic: Kraken2 tool error