This code uses the biomaRt
package to connect to the Ensembl database,
retrieve information about certain genes, and write the results to a file.
The code first connects to the Ensembl database using the useMart()
function
and specifies that the dataset being used is "hsapiens_gene_ensembl"
(human genes).
Then it reads a file called "genes.txt"
which contain list of gene IDs.
It uses the getBM()
function to query the Ensembl database for the HGNC symbol,
chromosome name, and band for the genes specified in the genes.txt file.
Finally, it writes the results of the query to a file called "out.txt"
in
tab-separated format. One suggestion could be to verify if the file
"genes.txt" exists before trying to read it, and to check the results
of the query, in order to validate the returned data is correct.
-
Notifications
You must be signed in to change notification settings - Fork 0
Piergiorge/Biomart_code
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published