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

Tissue Specific Markers #6

Open
andrewdchen opened this issue Jan 9, 2024 · 1 comment
Open

Tissue Specific Markers #6

andrewdchen opened this issue Jan 9, 2024 · 1 comment

Comments

@andrewdchen
Copy link

Hello! Think this is a great tool, but was wondering how tissue specific markers were compiled? And how we would try extending existing databases i.e. if I want to add several breast specific markers to be run alongside the other breast markers already in the database, is there a recommended way to do this?

@chloelulu
Copy link
Owner

Hi @andrewdchen, thanks for your interest in our tool and sorry for the late reply. Below code use the demodata(data(demodata)) as an example of your markers.

scMayoMapDatabase2 <- reshape2::melt(scMayoMapDatabase,id.vars= c('tissue','gene'))
yourDB <- demodata %>% mutate(variable = paste0('breast: ',celltype)) %>% dplyr::select(-celltype) %>% # add the column of tissue type with cell types
  mutate(tissue = 'breast',gene = toupper(gene)) # add tissue name, convert gene into uppercase
newDB <- rbind(scMayoMapDatabase2, yourDB) # combine the scMayoDatabase with your marker pool, please make sure they are in the same format. 
newDB <- unique(newDB) # exclude the duplicates, sometimes the markers you supplied already exist in the scMayoDatabase
db <- tidyr::spread(newDB, key = c('variable'), value = 'value')
db[is.na(db)] <- 0
obj <- scMayoMap(data = data, tissue = 'breast', database = db)

Don't hesitate to reach out if you meet any issue in the application!

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