We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you meet problem by using mouse_genes_to_human like,
mouse_genes_to_human(tpm_data) # Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached: [www.ensembl.org:443] Operation timed out after 10001 milliseconds with 0 bytes received
you can create your own function by modify the original code:
my_mouse_genes_to_human <- function (gene_expression_matrix, mirror = "www") { gene.names.mouse <- rownames(gene_expression_matrix) gene_expression_matrix$gene_name <- gene.names.mouse # add host to 2021 version, otherwise may have bug human <- useMart("ensembl", dataset = "hsapiens_gene_ensembl", host = "https://dec2021.archive.ensembl.org/") mouse <- useMart("ensembl", dataset = "mmusculus_gene_ensembl", host = "https://dec2021.archive.ensembl.org/") genes.retrieved <- getLDS(attributes = c("mgi_symbol"), filters = "mgi_symbol", values = gene.names.mouse, mart = mouse, attributesL = c("hgnc_symbol"), martL = human, uniqueRows = T) newGenes.counts <- gene_expression_matrix %>% left_join(., genes.retrieved, by = c(gene_name = "MGI.symbol")) %>% dplyr::select(., -c("gene_name")) %>% dplyr::select(., c("HGNC.symbol", everything())) %>% .[!(is.na(.$HGNC.symbol)), ] colnames(newGenes.counts)[1] <- "gene_name" newGenes.counts <- newGenes.counts[!(duplicated(newGenes.counts$gene_name)), ] %>% as.data.frame(.) rownames(newGenes.counts) <- newGenes.counts$gene_name newGenes.counts <- dplyr::select(newGenes.counts, -c("gene_name")) fraction <- 100 * (nrow(newGenes.counts)/nrow(gene_expression_matrix)) %>% round(., 1) message(paste0("ATTENTION: Only the ", fraction, "% of genes was maintained")) return(newGenes.counts) }
then using
# mouse data, change to human gene ID expression_matrix_humanGenes <- my_mouse_genes_to_human(gene_expression_matrix, mirror = "www")
This will solve your problem.
The text was updated successfully, but these errors were encountered:
Error: 'mouse_genes_to_human' is not an exported object from 'namespace:immunedeconv'
Sorry, something went wrong.
No branches or pull requests
If you meet problem by using mouse_genes_to_human like,
you can create your own function by modify the original code:
then using
This will solve your problem.
The text was updated successfully, but these errors were encountered: