-
-
Save adomingues/1e4d9758d48b83febdebfa7dd97ca45a to your computer and use it in GitHub Desktop.
tximport functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A function (borrowed from the Sleuth documentation) for connecting Ensembl transcript names to common gene names | |
convert_tx_to_gene <- function(dat="drerio_gene_ensembl"){ | |
mart <- biomaRt::useMart( | |
biomart = "ensembl", | |
dataset = dat | |
) | |
t2g <- biomaRt::getBM( | |
attributes = c("ensembl_transcript_id", "ensembl_gene_id", "external_gene_name"), | |
mart = mart | |
) | |
t2g <- dplyr::rename( | |
t2g, | |
target_id = ensembl_transcript_id, ens_gene = ensembl_gene_id, ext_gene = external_gene_name) | |
return(t2g) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment