BSgenomeForge version 1.52.0, error in .TwoBits_export
0
0
Entering edit mode
bioinagesh • 0
@bioinagesh-21741
Last seen 3 months ago
India

Hello,

I got the error while using forgeBSgenomeDataPkg during TwoBits_export since the inst directory is not creating. Please check the following comand output of forgeBSgenomeDataPkg, taceback, sessioninfo and zzz.r file

packageVersion("BSgenome")
[1] ‘1.52.0’
forgeBSgenomeDataPkg("oindicaseed.txt")
Creating package in ./BSgenome.Oindica.ASM465v1
Loading '1' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr1.fa' ... DONE
Loading '2' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr2.fa' ... DONE
Loading '3' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr3.fa' ... DONE
Loading '4' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr4.fa' ... DONE
Loading '5' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr5.fa' ... DONE
Loading '6' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr6.fa' ... DONE
Loading '7' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr7.fa' ... DONE
Loading '8' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr8.fa' ... DONE
Loading '9' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr9.fa' ... DONE
Loading '10' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr10.fa' ... DONE
Loading '11' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr11.fa' ... DONE
Loading '12' sequence from FASTA file '/home/ns43567/CEIB_rice_project/JHI/ensembl_indica/split_chromosome/outroot/chr12.fa' ... DONE
Writing all sequences to './BSgenome.Oindica.ASM465v1/inst/extdata/single_sequences.2bit' ... Error in .TwoBits_export(mapply(.DNAString_to_twoBit, object, seqnames),  :
  UCSC library operation failed
In addition: Warning messages:
1: In readLines(infile, n = 25000L) :
  incomplete final line found on 'oindicaseed.txt'
2: In .TwoBits_export(mapply(.DNAString_to_twoBit, object, seqnames),  :
  mustOpen: Can't open ./BSgenome.Oindica.ASM465v1/inst/extdata/single_sequences.2bit to write: No such file or directory

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /mnt/du-synology/v1shr1/scratch/ns43567/apps/conda/lib/libopenblasp-r0.3.7.so

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets
[8] methods   base

other attached packages:
[1] BSgenome_1.52.0      rtracklayer_1.44.3   Biostrings_2.52.0
[4] XVector_0.24.0       GenomicRanges_1.36.0 GenomeInfoDb_1.20.0
[7] IRanges_2.18.2       S4Vectors_0.22.0     BiocGenerics_0.30.0

loaded via a namespace (and not attached):
 [1] matrixStats_0.54.0          lattice_0.20-38
 [3] XML_3.98-1.20               Rsamtools_2.0.0
 [5] GenomicAlignments_1.20.1    bitops_1.0-6
 [7] grid_3.6.1                  zlibbioc_1.30.0
 [9] Matrix_1.2-17               BiocParallel_1.18.1
[11] tools_3.6.1                 Biobase_2.44.0
[13] RCurl_1.95-4.12             DelayedArray_0.10.0
[15] compiler_3.6.1              SummarizedExperiment_1.14.1
[17] GenomeInfoDbData_1.2.1


traceback()
14: .TwoBits_export(mapply(.DNAString_to_twoBit, object, seqnames),
        twoBitPath(path(con)))
13: .local(object, con, format, ...)
12: export(object, FileForFormat(con, format), ...)
11: export(object, FileForFormat(con, format), ...)
10: export(seqs, dest_filepath, format = "2bit")
9: export(seqs, dest_filepath, format = "2bit")
8: .forgeTwobitFileFromFastaFiles(seqnames, prefix, suffix, seqs_srcdir,
       seqs_destdir, verbose = verbose)
7: forgeSeqFiles(.seqnames, mseqnames = .mseqnames, seqfile_name = x@seqfile_name,
       prefix = x@seqfiles_prefix, suffix = x@seqfiles_suffix, seqs_srcdir = seqs_srcdir,
       seqs_destdir = seqs_destdir, ondisk_seq_format = x@ondisk_seq_format,
       verbose = verbose)
6: forgeBSgenomeDataPkg(y, seqs_srcdir = seqs_srcdir, destdir = destdir,
       verbose = verbose)
5: forgeBSgenomeDataPkg(y, seqs_srcdir = seqs_srcdir, destdir = destdir,
       verbose = verbose)
4: forgeBSgenomeDataPkg(y, seqs_srcdir = seqs_srcdir, destdir = destdir,
       verbose = verbose)
3: forgeBSgenomeDataPkg(y, seqs_srcdir = seqs_srcdir, destdir = destdir,
       verbose = verbose)
2: forgeBSgenomeDataPkg("oindicaseed.txt")
1: forgeBSgenomeDataPkg("oindicaseed.txt")

R/zzz.R file

.pkgname <- "BSgenome.Oindica.ASM465v1"

.seqnames <- paste(c(1:12), sep="")

.circ_seqs <- NULL

.mseqnames <- NULL

.onLoad <- function(libname, pkgname)
{
    if (pkgname != .pkgname)
        stop("package name (", pkgname, ") is not ",
             "the expected name (", .pkgname, ")")
    extdata_dirpath <- system.file("extdata", package=pkgname,
                                   lib.loc=libname, mustWork=TRUE)

    ## Make and export BSgenome object.
    bsgenome <- BSgenome(
        organism="Oryza sativa indica",
        common_name="rice",
        provider="ensembl",
        provider_version="v1",
        release_date="2011",
        release_name="ASM465v1",
        source_url="ftp://ftp.ensemblgenomes.org/pub/plants/release-44/fasta/oryza_indica/dna/",
        seqnames=.seqnames,
        circ_seqs=.circ_seqs,
        mseqnames=.mseqnames,
        seqs_pkgname=pkgname,
        seqs_dirpath=extdata_dirpath
    )

    ns <- asNamespace(pkgname)

    objname <- pkgname
    assign(objname, bsgenome, envir=ns)
    namespaceExport(ns, objname)

    old_objname <- "Oindica"
    assign(old_objname, bsgenome, envir=ns)
    namespaceExport(ns, old_objname)
}

Thank you verymuch.

bsgenome forge twobits_export bioconductor • 355 views
ADD COMMENT
0
Entering edit mode

Can you please show us the output of:

tree `echo 'cat(system.file(package="BSgenome"))' | R --vanilla --slave`

Thanks,

H.

ADD REPLY
0
Entering edit mode

Hi,

I am unable to get the tree command in our institute cluster. I am trying to install it in the local user but haven't succeded. Can I get any alternative command for the required information otherwise I will check with the admin and update here.

Thanks a lot!

Nagesh

ADD REPLY
1
Entering edit mode

Just do:

cd `echo 'cat(system.file(package="BSgenome"))' | R --vanilla --slave`
ls -al pkgtemplates/BSgenome_datapkg/inst/

All we need to know is whether we see the extdata subfolder there. The extdata subfolder is an empty subfolder but it's important to have it there as it's part of the pkg template used to forge BSgenome data packages.

I suspect you don't have the extdata subfolder, which would indicate that BSgenome was installed from an incorrect/incomplete source tarball. You see, a few years ago R core changed the behavior of R CMD build: they decided that by default R CMD build should ignore the empty folders found in the package source tree. By doing so they broke R CMD build on all packages that rely on the presence of some empty folders in their directory structure in order to function properly. They decided that package developers should now use --keep-empty-dirs if they wanted R CMD build to preserve the directory structure of their package. Problem is that package developers don't control what other people do to build package source tarballs. This is why the Bioconductor build system uses this option to build all package source tarballs (see https://bioconductor.org/checkResults/3.9/bioc-LATEST/BSgenome/malbec2-buildsrc.html).

So let's see if it is the case that BSgenome was installed from a broken source tarball on your system.

H.

ADD REPLY

Login before adding your answer.

Traffic: 238 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6