clodius icon indicating copy to clipboard operation
clodius copied to clipboard

clodius aggregate: NameError: global name '_bigwig' is not defined

Open dvera opened this issue 7 years ago • 9 comments

On ubuntu xenial with a fresh python 2.7.12 install, I get the following:

root@609c5b8e4115:/$ clodius aggregate bigwig HistonH3_cre_trt_rep1.bw
/usr/local/lib/python2.7/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Traceback (most recent call last):
  File "/usr/local/bin/clodius", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/clodius/cli/aggregate.py", line 1347, in bigwig
    _bigwig(
NameError: global name '_bigwig' is not defined

dvera avatar May 13 '18 14:05 dvera

I have the same issue. I even tried to use the docker in case it was some OS- or python-related issue, but I get the same error. Any ideas?

Rmulet avatar May 28 '18 13:05 Rmulet

It worked for me when running it in the higlass container (which has it installed).

dvera avatar May 28 '18 14:05 dvera

Thanks for the suggestion, but I got the same error. Perhaps we are using different versions of higlass.

Rmulet avatar May 28 '18 14:05 Rmulet

Maybe try pulling v0.2.63, which is what I'm using.

dvera avatar May 28 '18 14:05 dvera

That worked, thanks! Still, I hope they address this issue, as it seems it's being carried over to recent versions of Higlass as well...

Rmulet avatar May 28 '18 14:05 Rmulet

Btw, there's no need to aggregate bigwigs anymore. HiGlass can ingest them natively now (--filetype bigwig --datatype vector).

nvictus avatar May 28 '18 15:05 nvictus

That's great news! Very nice feature, thanks!

Rmulet avatar May 28 '18 15:05 Rmulet

Hi, I had the same problem and I tried to upload directly bigwig files, however the coordinates were all shifted from chromosome two on (I am using mm9 mouse build).

The way I generate the bigwig file is the following: I have a Grange object containing coordinates and score. I sort the grange object based on seqlevel so that chr2 is immediately after chr1. I export the grange to bigwig using export from rtracklayer

Do you have any idea on how I can solve the shift problem?

Thanks Zhan

zhanyinx avatar Jul 27 '18 09:07 zhanyinx

There's a chromosome ordering bug at the moment related to non-primary scaffolds (random and Un contigs). If that's the problem, a workaround for now is to omit the non-primary scaffolds from your bigwig. The second option is to export bedGraph and use clodius.

@pkerpedjiev Looks like clodius's bigwig option was removed in a655ff6 but the command wasn't deprecated.

nvictus avatar Aug 01 '18 02:08 nvictus