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

vignettes(cellosaurus): describe annotation steps #30

Open
jjjermiah opened this issue Mar 12, 2024 · 1 comment
Open

vignettes(cellosaurus): describe annotation steps #30

jjjermiah opened this issue Mar 12, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jjjermiah
Copy link
Contributor

need to explain how to annotate to other fields:
example from the gdsc pipeline

field_map <- list(
    "id" = "id",
    "ac" = "accession",
    "sy" = "synonyms",
    "misspelling" = "misspellings",
    "di" = "diseases",
    "ca" = "category",
    "sx" = "sexOfCell",
    "ag" = "ageAtSampling",
    "derived-from-site" = "samplingSite"
)

fields <- names(field_map)

sampleMetadata[, paste0("cellosaurus.", fields) := {
    mapped <- AnnotationGx::mapCell2Accession(
        as.character(GDSC.COSMIC_ID), 
        from = "dr",
        to = fields,
        BPPARAM = BPPARAM
    )
    return(mapped[, 1:length(fields)])
    }
    
@jjjermiah
Copy link
Contributor Author

also how to map from something other than "name"

@jjjermiah jjjermiah self-assigned this Mar 12, 2024
@jjjermiah jjjermiah added the documentation Improvements or additions to documentation label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Todo
Development

No branches or pull requests

1 participant