Question: Find the most frequently appeared genes in a list of pathways and genes
0
gravatar for Kim
6 months ago by
Kim0
Kim0 wrote:

Hello everyone

I have a list of pathways and genes involved in those pathways as follow (the real list is much longer):

enter image description here

I want to see which genes appear most frequently in these pathways. Do you know how to do that in R or recommend any tools?

Thank you very much

ADD COMMENTlink modified 6 months ago by zx87549.0k • written 6 months ago by Kim0

Paste your data as text, please.

ADD REPLYlink written 6 months ago by zx87549.0k
2
gravatar for Benn
6 months ago by
Benn7.9k
Netherlands
Benn7.9k wrote:

You can use R packages tidyr and dplyr for this.

# First import into R
table.file <- read.table("your.file.txt", header = T, sep = "\t", stringsAsFactors = F)

library(tidyr)

# Get your genes in separate rows
table.genes.sep <- separate_rows(table.file, Submitted.entities.found, sep = ";")

library(dplyr)

# use dplyr to count genes and sort
table.genes.count <- table.genes.sep %>% count(Submitted.entities.found, sort = TRUE)
ADD COMMENTlink modified 6 months ago • written 6 months ago by Benn7.9k
1
gravatar for zx8754
6 months ago by
zx87549.0k
London
zx87549.0k wrote:

Something like this, which will display most frequent 10 gene names:

head(names(table(unlist(strsplit(table.file$Submitted.entities.found, sep = ";")))), n = 10)
ADD COMMENTlink written 6 months ago by zx87549.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1244 users visited in the last hour