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.

Cannot convert output from Scirpy to dandelion

See original GitHub issue

Description of the bug

I try to convert the AnnData after clonal assignment by Scirpy into dandelion format. The result showed that “field productive has invalid bool T + T”. I would like to convert it for updating germline sequence of each BCR sequences using dandelion because I did not find this function in Scirpy. However, if you could suggest the other ways. Feel free to let me know.

Minimal reproducible example

import scirpy as ir

ABC_irdata_exclude_orphan_dandelion = ir.io.to_dandelion(ABC_irdata_exclude_orphan)
ABC_irdata_exclude_orphan_dandelion

The error message produced by the code above

~/.conda/envs/dandelion/lib/python3.8/site-packages/airr/schema.py in validate_row(self, row)
    276                 if spec == 'number':  self.to_float(row[f], validate=True)
    277             except ValidationError as e:
--> 278                 raise ValidationError('field %s has %s' %(f, e))
    279 
    280         return True

ValidationError: field productive has invalid bool T + T

Version information

versions

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
zktuongcommented, Jun 27, 2022

Hi @grst,

i’ve just release sc-dandelion==0.2.3 (it’s actually 0.2.2 but i thought my upload went wrong) Need to wait for https://github.com/pypa/warehouse/issues/11696 to be fixed before making any changes here though… =(

1reaction
zktuongcommented, Jun 9, 2022

ok. the ‘issue’ is with line 273: https://github.com/scverse/scirpy/blob/2c5b99e7c5205adc506a10d1aca97250051fab81/scirpy/io/_datastructures.py#L260-L273

because dandelion’s productive column in the metadata will update the productive key that scirpy was making from to_airr_cells because it appears later https://github.com/scverse/scirpy/blob/2c5b99e7c5205adc506a10d1aca97250051fab81/scirpy/io/_io.py#L726-L739

Can confirm that if just change the name away from productive on dandelion’s side, it resolves this.

@sbenjamaporn if you just rename the current productive column to productive_status:

adata.obs.rename(columns={'productive':'productive_status'}, inplace=True)

you should be able to do the transfer.

I will action this on dandelion’s side to rename productive to productive_status.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support for BCR · Issue #132 · scverse/scirpy - GitHub
I think it would be relatively easy for me to write dandelion -> scirpy converter based on your scirpy.io.read_airr function (because ...
Read more >
Interoperability with scirpy — dandelion documentation
It is now possible to convert the file formats between dandelion>=0.1.1 and scirpy>=0.6.2 [Sturm2020] to enhance the collaboration between the analysis ...
Read more >
Dandelion pappus morphing is actuated by radially patterned ...
Unlike other hygroscopic plant movements, the dandelion makes use of radially symmetric swelling to generate torque, which may help to ...
Read more >
Liquid filters: html filters - Shopify.dev
HTML filters create HTML elements based on Liquid properties or a store's assets.
Read more >
TensorFlow - Importing data from a TensorBoard TFEvent file?
You can use the script serialize_tensorboard, which will take in a logdir and ... more than once whose values are floats and returns...
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