Hi!
I am trying to forge a BSgenome package for the most current Dmel6 genome using the FASTA file from Ensembl (BDGP6.32 v104). However, the package will not install and stops with an error:
* installing *source* package ‘BSgenome.Dmelanogaster.6.32’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Warning messages:
1: package ‘BiocGenerics’ was built under R version 4.0.5
2: package ‘GenomeInfoDb’ was built under R version 4.0.5
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Warning: package ‘BiocGenerics’ was built under R version 4.0.5
Warning: package ‘GenomeInfoDb’ was built under R version 4.0.5
Error: package or namespace load failed for ‘BSgenome.Dmelanogaster.6.32’:
.onLoad failed in loadNamespace() for 'BSgenome.Dmelanogaster.6.32', details:
call: .make_BSgenome_seqinfo(single_sequences, circ_seqs, genome, seqnames)
error: sequence names found in file '/Users/Geo/BSgenome.Dmelanogaster.6.32.Rcheck/00LOCK-BSgenome.Dmelanogaster.6.32/00new/BSgenome.Dmelanogaster.6.32/extdata/single_sequences.2bit' are not identical to 'seqnames'. May be the data on disk is corrupted?
Error: loading failed
Execution halted
ERROR: loading failed
I prepared the genome FASTA and created the 2bit file as follows:
library(Biostrings)
dna <- readDNAStringSet("Drosophila_melanogaster.BDGP6.32.dna.toplevel.fa.gz")
### Check seqnames.
current_SequenceName <- unlist(heads(strsplit(names(dna), " ", fixed=TRUE), n=1L))
names(dna) <- current_SequenceName
### Export as 2bit.
library(rtracklayer)
export.2bit(dna, "Dmel632.2bit")
Using the original sequence names or shortened names appeared not to make a difference. Any advice would be greatly appreciated!
Geo
Thanks! Took me a while to figure out that all BDGP6.nn releases are dm6-compatible. My errors in my pipeline were due to something else, not the release versions. Oh, well. Your examples will be very helpful in the future.
I was just puzzled that I could forge e.g. a Drosophila pseudoobscura version for BSgenome (dp6, which was not available then), but not create dm6 anew.