question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with loompy.loompy.combine

See original GitHub issue

I’m trying to combine loom files with the latest version of loompy (pulled from GitHub, commit d0bd1bd), but I get the following error. tissue_looms is a list of strings; combined_name is a string (enforced in the function call), so I don’t think I’m passing something wrong to combine.

loompy.loompy.combine(
        files=list(map(str, tissue_looms)), # type: List[str]
        output_file=str(combined_name) # type: str
)
WARNING:root:╭── 'batch_scan_layers' is deprecated. Use 'scan' instead
WARNING:root:╰──> at /usr/local/lib/python3.6/dist-packages/loompy-2.0.6-py3.6.egg/loompy/loompy.py, line 377
<class 'bytes'>
Traceback (most recent call last):
  File "./merge_looms.py", line 111, in <module>
    main()
  File "./merge_looms.py", line 105, in main
    output_file=combined_name
  File "/usr/local/lib/python3.6/dist-packages/loompy-2.0.6-py3.6.egg/loompy/loompy.py", line 933, in combine
    ds.add_loom(f, key, batch_size=batch_size)
  File "/usr/local/lib/python3.6/dist-packages/loompy-2.0.6-py3.6.egg/loompy/loompy.py", line 381, in add_loom
    self.add_columns(vals, ca, fill_values=fill_values)
  File "/usr/local/lib/python3.6/dist-packages/loompy-2.0.6-py3.6.egg/loompy/loompy.py", line 328, in add_columns
    self.ca[key] = np.concatenate([self.ca[key], vals])
  File "/usr/local/lib/python3.6/dist-packages/loompy-2.0.6-py3.6.egg/loompy/attribute_manager.py", line 111, in __setitem__
    return self.__setattr__(name, val)
  File "/usr/local/lib/python3.6/dist-packages/loompy-2.0.6-py3.6.egg/loompy/attribute_manager.py", line 129, in __setattr__
    values = loompy.normalize_attr_values(val)
  File "/usr/local/lib/python3.6/dist-packages/loompy-2.0.6-py3.6.egg/loompy/normalize.py", line 72, in normalize_attr_values
    arr = normalize_attr_strings(arr)
  File "/usr/local/lib/python3.6/dist-packages/loompy-2.0.6-py3.6.egg/loompy/normalize.py", line 19, in normalize_attr_strings
    raise ValueError("Arbitrary numpy object arrays not supported (all elements must be string objects).")
ValueError: Arbitrary numpy object arrays not supported (all elements must be string objects).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sejirocommented, Mar 2, 2018

I have just updated the package on our cluster and my initial checks indicate this newer version of loompy does indeed solve my problem. Thank you for the follow up! Really like the work between all of your labs, been working a lot with seurat and velocyto recently.

best, -Sejiro

0reactions
slinnarssoncommented, Mar 20, 2018

Great, good to know!

Read more comments on GitHub >

github_iconTop Results From Across the Web

combine (function) — loompy 3.0.6 documentation
combine (function)¶. Combine the content of several Loom files. loompy. combine (files: List[str], output_file: str, key: str = None, file_attrs: Dict[str, ...
Read more >
Loading a pre-filtered loom file into pySCENIC - Biostars
Validate the exported .loom file using loompy . The LoomValidator() function will be able to provide details about the incorrect file attributes ...
Read more >
loompy Changelog - PyUp.io
`loompy.new()` creates an empty loom file, and returns it as a context manager. ... Better handling of global attributes when combining files
Read more >
Python Examples of loompy.connect - ProgramCreek.com
This page shows Python examples of loompy.connect. ... mode=mode, validate=False) except KeyError as e: logger.error(e) os.remove(file_path) ...
Read more >
Loompy
Loom is an efficient file format for large omics datasets. Loom files contain a main matrix, optional additional layers, a variable number of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found