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

Problem with swga count #49

Open
Rcoppee opened this issue Jul 7, 2020 · 2 comments
Open

Problem with swga count #49

Rcoppee opened this issue Jul 7, 2020 · 2 comments

Comments

@Rcoppee
Copy link

Rcoppee commented Jul 7, 2020

Dear swga community,

I have a problem when I use swga.

First of all, I didn't install virtualenv, the archive seems to have some problems. However, I success to install swga, and the swga init command works properly (which allows me to receive the foreground and background genomes. Two files are created.

Now, when I run the swga count command, I have a series of errors:

swga count, v0.4.4
  - force: False
  - max_dimer_bp: 3
  - exclude_threshold: 1
  - min_size: 5
  - input: None
  - min_fg_bind: 237
  - max_bg_bind: 21128
  - max_size: 12
Traceback (most recent call last):
  File "/home/maintenance-gg/.local/bin/swga", line 8, in <module>
    sys.exit(main())
  File "/home/maintenance-gg/.local/lib/python2.7/site-packages/swga/main.py", line 81, in main
    setup_and_run(cmd_class, args.command, remaining)
  File "/home/maintenance-gg/.local/lib/python2.7/site-packages/swga/main.py", line 49, in setup_and_run
    cmd.run()
  File "/home/maintenance-gg/.local/lib/python2.7/site-packages/swga/commands/count.py", line 27, in run
    self.count_kmers()
  File "/home/maintenance-gg/.local/lib/python2.7/site-packages/swga/commands/count.py", line 85, in count_kmers
    fg = swga.kmers.count_kmers(k, self.fg_genome_fp, output_dir)
  File "/home/maintenance-gg/.local/lib/python2.7/site-packages/swga/kmers.py", line 42, in count_kmers
    cmdarr = [swga.utils.dsk(), genome_fp, str(k), '-o', out, '-t', str(threshold)]
  File "/home/maintenance-gg/.local/lib/python2.7/site-packages/swga/utils.py", line 93, in dsk
    return _get_resource_file('dsk')
  File "/home/maintenance-gg/.local/lib/python2.7/site-packages/swga/utils.py", line 72, in _get_resource_file
    swga.error("Could not find `{}': try re-installing swga.".format(rs))
  File "/home/maintenance-gg/.local/lib/python2.7/site-packages/swga/__init__.py", line 25, in error
    raise SWGAError(msg)
swga.SWGAError: Could not find `dsk': try re-installing swga.

I uninstall dsk, then properly install it, but the error remains.
Do you know the origin of this error?

Thank you in advance!

Regards,

Asternosis

@SarahNadeau
Copy link

SarahNadeau commented Feb 22, 2022

In case anyone else runs into this, I got the same error and I think I it comes from swga looking for dsk in the wrong place.

_rs = os.path.join(sys.prefix, 'bin', rs)

I have swga installed in a Docker image, so I fixed this issue by copying dsk to where swga expects it in my Dockerfile:

cp /usr/local/bin/dsk /usr/bin/dsk

Now swga count runs file.

@SarahNadeau
Copy link

Same thing applies for set_finder from cliquer, which is needed for swga find_sets:

cp /usr/local/bin/set_finder /usr/bin/set_finder

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

No branches or pull requests

2 participants