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

Removing Rik genes from figR.d listing #24

Open
sylestiel opened this issue Feb 9, 2023 · 10 comments
Open

Removing Rik genes from figR.d listing #24

sylestiel opened this issue Feb 9, 2023 · 10 comments

Comments

@sylestiel
Copy link

@vkartha
How may i remove the Rik genes from DORC gene listing before plotting heatmap.

@vkartha
Copy link

vkartha commented Feb 9, 2023

Hi @sylestiel , you can try something like this:

# Keep only gene symbols that don't end in Rik
genesToKeep <- unique(figR.d$DORC[!grepl(".*Rik$",figR.d$DORC,fixed=FALSE)])

# Make sure Rik genes are removed
genesToKeep

# See how many of these you have
length(genesToKeep)

# Then pass these to plotfigRHeatmap to subset
plotfigRHeatmap(figR.d,DORCs=genesToKeep)


@sylestiel
Copy link
Author

sylestiel commented Feb 9, 2023

@vkartha
Can you double check .*Rik$

The Riks are still present in the heatmap.

@vkartha
Copy link

vkartha commented Feb 9, 2023

Are you still seeing Rik genes come up when printing the contents of genesToKeep based on the above? It shouldn't be the case. Or are you seeing the Rik genes show up in the final heatmap, with empty values?

@sylestiel
Copy link
Author

I see it in the heatmap. The whole point was to remove it from the heatmap.

@vkartha
Copy link

vkartha commented Feb 9, 2023

Can you first confirm whether the Rik genes are printed as part of genesToKeep given my example above? Then I'll be able to tell if it's a grep issue (Tested this out already on my end) or if it's an internal dataframe wrangling issue

@sylestiel
Copy link
Author

How can I check?

I can only print part of it

@vkartha
Copy link

vkartha commented Feb 9, 2023

First see how many genes are returned as not having Rik based on my original grep command:
length(genesToKeep)

Then see if there are still any with Rik in them

table(grepl("Rik",genesToKeep)) # Returns TRUE if found

@vkartha
Copy link

vkartha commented Feb 9, 2023

I just tested this out on the toy dataset used in the package vignette (SHARE-seq) which is also mouse and also has Rik genes as DORCs, and the code snipped I pasted above worked to remove genes ending in Rik.

@sylestiel
Copy link
Author

Screen Shot 2023-02-09 at 2 01 24 PM

@sylestiel
Copy link
Author

sylestiel commented Feb 9, 2023

@vkartha
the genes to Keep appears to have worked. However, I cannot rid the Heatmap of it.

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

No branches or pull requests

2 participants