Working with miRBase v21

This is an embarrassed note as I could not download miRBase using ftp. Hopefully, I can figure it out somehow and keep a note for future use.

Scenario I: I wanted to download database files from mirbase ftp server

I was at miRBase download page
Here is the README file
I clicked Go to the FTP site to download al file.
From my linux window, " ftp ftp.mirbase.org/pub/mirbase/21/database_files/" gets me "unknown host" error
What did I do wrong??

Well, the fix is simple, the serve name was only mirbase.org haha

ftp mirbase.org
user: anonymous
pass: li11@niehs.nih.gov
prompt

Frank created a database called miRBaseV21 on the “wine” server

mysql> show grants for li11;
| GRANT ALL PRIVILEGES ON `li11`.* TO ‘li11’@’%’ WITH GRANT OPTION
| GRANT ALL PRIVILEGES ON `mirDB`.* TO ‘li11’@’%’
| GRANT ALL PRIVILEGES ON `methylSNPdb`.* TO ‘li11’@’%’
| GRANT ALL PRIVILEGES ON `miRBaseV21`.* TO ‘li11’@’%’
| GRANT ALL PRIVILEGES ON `mus_musculus_core_73_38`.* TO ‘li11’@’%’

Scenario II: I need to create the schema downloaded from mirbase.

It turns out that "mysqldump" does not work following my earlier post, it could be that I do NOT have root privillege
Followed this link, I used "mysql> source ~/mysql_jyl/miRBase/miRBaseV21/tables.sql" ; 

In the end, I imported all the data into the database:

mysql> load data local infile ‘~/mysql_jyl/miRBase/miRBaseV21/wikipedia.txt’ into table wikipedia ;

Now, I am working on R scripts for the analytical components. At first, I have to work on connecting to the mysql database. Here are a few lines of code to connect:

library(RMySQL)
mydb = dbConnect(MySQL(), user='li11', password='password', dbname='mirDB', host='wine.niehs.nih.gov')
dbListTables(mydb)
dbListFields(mydb, 'resCenter')

It turns out that it is quite simple and straightforward with the following help links:

Main link at R-blogger
A brief tutorial post by Manoj Kumar

To transfer my RATEmiRs from wine to my windows machine, here are a few simple steps:

1. On linux, do the mysqldump: mysqldump -u li11 -ppassword RATEmiRs > ~/RATEMiRs.sql 
2. On windows machine: Log in mysql database and create a database (create database ratemirs)
3. Do a simple restore: mysql -u li11 -p ratemirs < x:\RATEMiRs.sql

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.