[BioC] 'version' is missing error when running makeTxDbPackageFromUCSC
Hervé Pagès
hpages at fhcrc.org
Tue Sep 3 20:29:59 CEST 2013
Hi Michael,
Not easy for us to support the Intel compiler since our build machines
don't use it.
The error you get comes from the svn.time() function defined in IRanges.
svn.time() is used in the GenomicFeatures package to generate the
timestamp of a TranscriptDb object:
> example(makeTranscriptDb)
> txdb
TranscriptDb object:
| Db type: TranscriptDb
| Supporting package: GenomicFeatures
| transcript_nrow: 3
| exon_nrow: 4
| cds_nrow: 4
| Db created by: GenomicFeatures package from Bioconductor
| Creation time: 2013-09-03 11:09:39 -0700 (Tue, 03 Sep 2013)
| GenomicFeatures version at creation time: 1.13.34
| RSQLite version at creation time: 0.11.4
| DBSCHEMAVERSION: 1.0
The "Creation time" field above was set internally by a call to
svn.time():
> svn.time()
[1] "2013-09-03 11:10:32 -0700 (Tue, 03 Sep 2013)"
The C code for svn.time() is:
static int get_svn_time(time_t t, char *out, size_t out_size)
{
#if defined(__INTEL_COMPILER)
return -1;
#else /* defined(__INTEL_COMPILER) */
...
#endif /* defined(__INTEL_COMPILER) */
}
Last year I added this conditional compilation after someone reported
the Intel compiler was not able to compile get_svn_time(). With this
at least people using the Intel compiler can now install the IRanges
package, but, unfortunately, they still cannot use any of the functions
in GenomicFeatures that are based on makeTranscriptDb().
I would gladly accept a patch that makes get_svn_time() work with the
Intel compiler. Otherwise I could just modify makeTranscriptDb() so it
falls back on using date() if the call to svn.time() fails.
Cheers,
H.
On 08/28/2013 05:43 AM, Michael Steeves wrote:
> On 8/27/13 6:31 PM, Dan Tenenbaum wrote:
>> This means you have to supply a 'version' argument. See
>> ?makeTxDbPackageFromUCSC
>
> Dan:
>
> This does fix the issue on OS X, however I'm still getting an error
> running the example from the help page on RHEL:
>
> > txdb <- makeTxDbPackageFromUCSC(version="0.01",
> + maintainer="Some One <so at someplace.org>",
> + author="Some One <so at someplace.com>",
> + genome="sacCer2",
> + tablename="ensGene")
> Download the ensGene table ... OK
> Extract the 'transcripts' data frame ... OK
> Extract the 'splicings' data frame ... OK
> Download and preprocess the 'chrominfo' data frame ... OK
> Prepare the 'metadata' data frame ... OK
> Make the TranscriptDb object ... Error in .Call2("svn_time", PACKAGE =
> "IRanges") :
> IRanges internal error in svn_time(): get_svn_time() failed
>
> One of my colleagues did some investigation, and it looks like in the
> IRanges source code (str_utils.c) is where the problem is coming from:
>
> /*
> * 'out_size' should be at least 45 (for year < 10000, 44 chars will be
> * printed to it + '\0').
> */
> static int get_svn_time(time_t t, char *out, size_t out_size)
> {
> #if defined(__INTEL_COMPILER)
> return -1;
> #else /* defined(__INTEL_COMPILER) */
> struct tm result;
> int utc_offset, n;
>
> static const char
> *wday2str[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"},
> *mon2str[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
> "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
> *svn_format = "%d-%02d-%02d %02d:%02d:%02d %+03d00 (%s, %02d %s %d)";
>
> //localtime_r() not available on Windows+MinGW
> //localtime_r(&t, &result);
> result = *localtime(&t);
> #if defined(__APPLE__) || defined(__FreeBSD__)
> //'struct tm' has no member named 'tm_gmtoff' on Windows+MinGW
> utc_offset = result.tm_gmtoff / 3600;
> #else /* defined(__APPLE__) || defined(__FreeBSD__) */
> tzset();
> //timezone is not portable (is a function, not a long, on OS X Tiger)
> utc_offset = - (timezone / 3600);
> if (result.tm_isdst > 0)
> utc_offset++;
> #endif /* defined(__APPLE__) || defined(__FreeBSD__) */
> n = snprintf(out, out_size, svn_format,
> result.tm_year + 1900,
> result.tm_mon + 1,
> result.tm_mday,
> result.tm_hour,
> result.tm_min,
> result.tm_sec,
> utc_offset,
> wday2str[result.tm_wday],
> result.tm_mday,
> mon2str[result.tm_mon],
> result.tm_year + 1900);
> return n >= out_size ? -1 : 0;
> #endif /* defined(__INTEL_COMPILER) */
> }
>
> We are using the Intel compilers to build on Linux -- is this a bug, or
> is using the Intel compilers not supported?
>
>
> -Mike
>
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024
E-mail: hpages at fhcrc.org
Phone: (206) 667-5791
Fax: (206) 667-1319
More information about the Bioconductor
mailing list