Skip to content

Export Raw - #177

Merged
ivirshup merged 1 commit into
scverse:masterfrom
ivirshup:export-raw
Jul 6, 2019
Merged

ivirshup merged 1 commit into
scverse:masterfrom
ivirshup:export-raw

Conversation

@ivirshup

@ivirshup ivirshup commented Jul 5, 2019 •

Copy link
Copy Markdown
Member

@falexwolf

Copy link
Copy Markdown
Member

Fine!

@codecov

codecov Bot commented Jul 6, 2019

Copy link
Copy Markdown

Codecov Report

Merging #177 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #177   +/-   ##
=======================================
  Coverage   78.85%   78.85%           
=======================================
  Files          12       12           
  Lines        2109     2109           
=======================================
  Hits         1663     1663           
  Misses        446      446

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2fef42a...9b99855. Read the comment docs.

@ivirshup
ivirshup merged commit 34e8616 into scverse:master Jul 6, 2019
@flying-sheep

Copy link
Copy Markdown
Member

@ivirshup

ivirshup commented Jul 7, 2019

Copy link
Copy Markdown
Member Author

I guess... I'm not a fan of Raw since it requires implementing a bunch of things twice, and can mostly be replaced by layers. I personally don't want to advertise it too much just in case we're able to deprecate it. I do, however, think we should export from a consistent location, mostly so it can be used for type annotations and dispatch.

If other people like it, I'd be happy to hear that point of view. It's just something which I don't use, but have to code around.

@ivirshup ivirshup mentioned this pull request Jul 7, 2019
@falexwolf

falexwolf commented Jul 7, 2019 •

Copy link
Copy Markdown
Member

I agree with you, Isaac. :) I've essentially entirely stopped using it myself in the past year. I would also not advertise too much but rather work towards more consistent solutions.

.layers completely works as a replacement if one never actually filters on variables, but replaces every filtering stepped by a purely annotation based solution. It wouldn't be hard at all to make this the default in Scanpy, generally; it's just that I still lack bandwidth...

@LuckyMD

LuckyMD commented Jul 7, 2019

Copy link
Copy Markdown

I currently use it to store uncorrected data in the single cell tutorial. Could change that to layers in the next update though. Is there a layers equivalent to use_raw for plotting functions?

@ivirshup

ivirshup commented Jul 8, 2019

Copy link
Copy Markdown
Member Author

@LuckyMD Mostly the layer key word argument.

@falexwolf no worries. I think Raw would take a while to fully excise since there's so much logic dealing with it. The main argument I can see for Raw is that a boolean filter (like we have with highly variable genes) has to be re-applied each time it's used, so there's a performance cost. There are ways around this, but it'd take some consideration to choose one.

Right now, some plotting functions have use_raw as None, which turns to True if raw is defined. This would be a big change in behavior if raw is deprecated, since there's no convention for what "raw" is in layers. I also think the current behavior could be more consistently documented.

@falexwolf

Copy link
Copy Markdown
Member

@LuckyMD It's perfectly fine that your tutorial uses it; the Seurat-based tutorial also uses it and people can continue. I just agreed with Isaac that we shouldn't advertise beyond because I also don't like it. Thinking a bit more, though, addingRaw to the docs is more a clarification than an advertisement as long as the tutorials legitly keep using it.

@ivirshup All that logic should be maintained and would be replaced with a special slot in .layers called 'raw'. Then it really boils down to merely a more elegant implementation. For instance, it would be nice to be able to generate an AnnData from any layer (something that people have asked for Raw)... But, it's not a priority...

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

Successfully merging this pull request may close these issues.

4 participants