Example cc_variants.sqlite dataset trouble

46 views
Skip to first unread message

Mark Sfeir

unread,
Apr 27, 2022, 12:03:12 PM4/27/22
to R/qtl2 discussion
Working through the examples in the R/qtl2 user guide on Kbroman.com, I received an error when attempting to set up (by downloading the necessary files in the target directory) and use the query_variants function shown there to query the cc_variants.sqlite data. I had no such issue using the query_genes function to query the mouse_genes.sqlite data, in a similar way.

Here is the error message I got in RStudio:

> variants_2_97.5 = query_variants(2,97,98)
Error: database disk image is malformed
In addition: Warning message:
Couldn't set synchronous mode: database disk image is malformed
Use `synchronous` = NULL to turn off this warning. 

Any guidance on what may be happening here, or what I should do? Maybe this file has been corrupted somehow in a way that isn't isolated to my computer? 

I would appreciate any help,
Mark Sfeir at the UNC Nutrition Research Institute 

Karl Broman

unread,
Apr 27, 2022, 12:06:27 PM4/27/22
to R/qtl2 discussion
My guess is that the download was incomplete, so I would try again with that.

karl

Mark Sfeir

unread,
Apr 28, 2022, 10:52:28 AM4/28/22
to R/qtl2 discussion
I tried downloading again, adjusting the default "timeout" option to try to support a larger file size in the following way:

> options(timeout = 1000)

> download.file(url="https://figshare.com/ndownloader/files/18533342",destfile = "cc_variants.sqlite")

trying URL 'https://figshare.com/ndownloader/files/18533342'

Content type 'application/octet-stream' length 4159954944 bytes (3967.2 MB)

downloaded 3967.2 MB


As shown above, it appeared to me that the file was downloaded in its entirety in this way, though I still went on to get the same error when creating and using my query_variant function.

Do I need to increase the timeout option even more, or is there anything else I should try next? 

-Mark


Karl Broman

unread,
Apr 28, 2022, 10:57:45 AM4/28/22
to R/qtl2 discussion
I’m not sure what’s going on. Could you show me all the rest of the code, leading up to the error?

karl

Mark Sfeir

unread,
Apr 28, 2022, 11:08:10 AM4/28/22
to R/qtl2 discussion
And amid that .Rhistory session I sent, I deleted the previous version of cc_variants.sqlite manually in my Windows file explorer system to make room for the new attempt.  :/

Mark Sfeir

unread,
Apr 28, 2022, 11:21:59 AM4/28/22
to R/qtl2 discussion
qtl2_cc_variants_example_query_Rhistory.PNG

Karl Broman

unread,
Apr 28, 2022, 11:23:00 AM4/28/22
to R/qtl2 discussion
Maybe try download.file() again using mode = "wb"

karl

Mark Sfeir

unread,
Apr 28, 2022, 11:24:39 AM4/28/22
to R/qtl2 discussion
Thank you, I'll try that, though I may need to pick this back up another day. 

Mark Sfeir

unread,
Apr 28, 2022, 12:02:54 PM4/28/22
to R/qtl2 discussion
It looks like using mode = 'wb', the download worked as intended! I'm not sure if the 'wb' mode is worth using every time on Windows, especially since I hadn't specified it before when I successfully downloaded and use the "query_genes" function from the same part of the R/qtl2 user guide. It is good to know though, and I should be set for following the rest of the example for now. 
Thank you 
-Mark

Reply all
Reply to author
Forward
0 new messages