Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding annotation to the convolution windows #58

Closed
wants to merge 6 commits into from

Conversation

redst4r
Copy link
Contributor

@redst4r redst4r commented Oct 15, 2022

Hi,

I often need to look up what window i in CNV space (adata.obsm['X_cnv'][:,i]) corresponds to in gene space (i.e. which chromosome, which genes, which coordinates). Might relate to #50

Hence I added this information in adata.uns['cnv']['var']. Its pretty much the equivalent of .var in the epxression AnnData, just for the CNV-space.

For example, to get all windows from chromosome one, you'd do

ix_chr1= adata.uns['cnv']['var'].chromosome=="chr1"
adata.obsm['X_cnv'][:, ix_chr1]

Copy link
Member

@grst grst left a comment

Choose a reason for hiding this comment

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

Something went wrong with the black reformat (didn't read the line length from the config 🤔). Just fixing these to make the diff smaller & the review easier.

src/infercnvpy/tl/_infercnv.py Outdated Show resolved Hide resolved
src/infercnvpy/tl/_infercnv.py Show resolved Hide resolved
src/infercnvpy/tl/_infercnv.py Outdated Show resolved Hide resolved
src/infercnvpy/tl/_infercnv.py Outdated Show resolved Hide resolved
src/infercnvpy/tl/_infercnv.py Outdated Show resolved Hide resolved
@grst
Copy link
Member

grst commented Jun 20, 2024

Superseded by #132

@grst grst closed this Jun 20, 2024
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.

2 participants