Skip to content

Instantly share code, notes, and snippets.

View Akmazad's full-sized avatar
🎯
Time is a sword. Either you cut it, or get cut.

A K M AZAD Akmazad

🎯
Time is a sword. Either you cut it, or get cut.
View GitHub Profile
@Akmazad
Akmazad / uniprot_to_GeneSymbol.R
Created June 15, 2025 08:38
Convert a vector of Uniprot Protein IDs to Hugo Gene Symbols
uniprot_to_GeneSymbol <- function(uniprotList){
require(org.Hs.eg.db)
if(length(uniprotList) == 0)
stop("Uniprot ID list is empty")
geneSymbols <- mapIds(keys = uniprotList, keytype = "UNIPROT",
column = "SYMBOL",
multiVals = "first",
x = org.Hs.eg.db) %>% unname()
extractAlibrary_from_enrichr <-
function(library_title = "KEGG_2021_Human"){
require(speedr)
require(qdapTools)
require(dplyr)
# generate url for a given library title
url = paste0("https://maayanlab.cloud/Enrichr/geneSetLibrary?mode=text&libraryName=",
library_title)