Skip to content

Seurat v3 hvg implementation - #1204

Merged
ivirshup merged 26 commits into
scverse:masterfrom
adamgayoso:seurat_v3_hvg_update
Jul 29, 2020
Merged

ivirshup merged 26 commits into
scverse:masterfrom
adamgayoso:seurat_v3_hvg_update

Conversation

@adamgayoso

@adamgayoso adamgayoso commented May 6, 2020 •

Copy link
Copy Markdown
Member

Fixes #993.

@adamgayoso

Copy link
Copy Markdown
Member Author

@ivirshup -- I still can't tell why Travis is failing. For some reason on Travis, loess is outputting a zero for the gene mentioned in the error message, but this doesn't happen locally for me.

@adamgayoso

Copy link
Copy Markdown
Member Author

I think the inconsistency I'm seeing is that the loess function gives different results on my Mac than it does on linux.

has2k1/scikit-misc#8

@adamgayoso

Copy link
Copy Markdown
Member Author

@ivirshup I'm not sure why this change makes it work, but looks like it works. Anyway, let me know how you would like to handle the repeated code for storing the outputs! Thanks.

@ivirshup ivirshup left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick review for the moment:

Could the repeated code just get put into a separate function?

I'm not sure I love the name. Could it be more descriptive of what it does?

I might leave a more in depth review to people more familiar with this code. @LuckyMD or @gokceneraslan do you think you could take a look at this?

Comment thread requirements.txt Resolved
@LuckyMD

LuckyMD commented May 7, 2020

Copy link
Copy Markdown
Contributor

I might leave a more in depth review to people more familiar with this code. @LuckyMD or @gokceneraslan do you think you could take a look at this?

Sorry, I don't think I will have time for this in the next 2 weeks. I'm finishing up a 2 larger projects atm.

@adamgayoso

Copy link
Copy Markdown
Member Author

@ivirshup this should be good to go now. I don't thin Codacy failing has anything to do with my code. @gokceneraslan would you be able to review?

Comment thread .travis.yml Resolved

@gokceneraslan gokceneraslan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an amazing contribution, thanks so much @adamgayoso. I added some comments.

@adamgayoso

adamgayoso commented Jun 16, 2020 •

Copy link
Copy Markdown
Member Author

@gokceneraslan why are the defaults for the main function all None (e.g., dispersion cutoffs)? It seems like if scanpydoc is picking up the defaults then we can make them not None and reduce some code?

@gokceneraslan

Copy link
Copy Markdown
Contributor

@gokceneraslan why are the defaults for the main function all None (e.g., dispersion cutoffs)? It seems like if scanpydoc is picking up the defaults then we can make them not None and reduce some code?

Honestly, I don't know. But @ivirshup also brought it up here #1180 (comment) and here #1180 (comment), I just didn't have time to address it. I am fine with making them not None.

@gokceneraslan

gokceneraslan commented Jun 17, 2020 •

Copy link
Copy Markdown
Contributor

But I think scanpydoc is very confused now for some reason. Documentation build is broken, it's visible in all some recent PRs too and there is not much we can do without the help of @falexwolf or @flying-sheep or @ivirshup, because we cannot even see the error message. My local builds are just fine 🤷

@adamgayoso

adamgayoso commented Jun 18, 2020 •

Copy link
Copy Markdown
Member Author

There's a strange issue I'm having where the gene sets when combining from different batches are not equal between this code and Seurat v3. The problem appears to be due to the fact that many genes have the same normalized variance in a given batch and the merging method uses ranks. So I believe the difference is due to genes being sorted differently with the same normalized variance. Perhaps this merging scheme is not ideal.

Otherwise, this PR is good to go.

@ivirshup

Copy link
Copy Markdown
Member

The docs should now be fixed on master. Updating the branch should fix that.

I've added a commit to fix that formatting test.

@adamgayoso could you compress the data files you're using for testing, and remove to uncompressed files from the git history? This is to keep the repo size as small as possible.

Otherwise, @gokceneraslan were you happy with the state this PR is in?

@adamgayoso
adamgayoso force-pushed the seurat_v3_hvg_update branch from 65368d2 to 6a9d731 Compare June 29, 2020 16:53
@adamgayoso

Copy link
Copy Markdown
Member Author

I think I messed something up when trying to rewrite the history @ivirshup :(

@adamgayoso
adamgayoso force-pushed the seurat_v3_hvg_update branch from 6a9d731 to 81f0217 Compare June 29, 2020 17:26
@adamgayoso

Copy link
Copy Markdown
Member Author

There's one more little issue with nan warnings that I need to handle.

@gokceneraslan

Copy link
Copy Markdown
Contributor

Any ideas why doc build still fails?

@ivirshup

ivirshup commented Jul 7, 2020

Copy link
Copy Markdown
Member

I believe the latest plotting PR broke it (#1210 (comment))

@fidelram

fidelram commented Jul 7, 2020 •

Copy link
Copy Markdown
Collaborator

@ivirshup @gokceneraslan Do you have access to the error details for readthedocs? I get 'page does not exists' error

@ivirshup ivirshup mentioned this pull request Jul 7, 2020
@adamgayoso

Copy link
Copy Markdown
Member Author

@gokceneraslan @ivirshup just checking in on this. Will this be part of the next release? Do you need anything else from me? It might be nice to note somewhere that when batch_key is not None, results aren't absolutely consistent with Seurat.

The problem appears to be due to the fact that many genes have the same normalized variance in a given batch and the merging method uses ranks. So I believe the difference is due to genes being sorted differently with the same normalized variance. Perhaps this merging scheme is not ideal.

@gokceneraslan

Copy link
Copy Markdown
Contributor

Looks good to me. I wish the batch_key option also worked well but we can improve it later on, I guess. Sorry for the delay.

Comment thread scanpy/_utils.py Resolved
@ivirshup ivirshup mentioned this pull request Jul 29, 2020
@ivirshup
ivirshup force-pushed the seurat_v3_hvg_update branch from 20ea3c4 to c2f4692 Compare July 29, 2020 08:04
@ivirshup

Copy link
Copy Markdown
Member

Awesome, thanks for this! I've added something to the release notes, let me know if you'd like to say more.

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.

Seurat v3 VST highly variable gene method

6 participants