Issue with DECIPHER::IdTaxa
0
0
Entering edit mode
@sebastianmynott-7437
Last seen 4.1 years ago
United Kingdom

I've encountered an issue which hasn't occurred previously. I’m running DECIPHER v2.16.1 in R v4.0.2 and RStudio v1.3.959. and have managed to downgrade to R v3.6.3 to see if it made any difference but it hasn't.

I get the following error, even when running the Examples from the IdTaxa function:

data("TrainingSet_16S")
fas <- system.file("extdata", "Bacteria_175seqs.fas", package="DECIPHER")
dna <- readDNAStringSet(fas)
dna <- RemoveGaps(dna)
ids <- IdTaxa(dna, TrainingSet_16S, strand="top")
Error in getMethod(f, c("XRawList", "XRawList")) :
no method found for function 'match' and signature XRawList, XRawList

The issue seems to present itself as a result of certain packages loading and getting in the way of the IdTaxa function but I can't seem to figure out a workaround. I've noticed that I can sometimes get the IdTaxa function to run if I restart the R session, load the DECIPHER library and run it before loading other libraries. However, even this fails if the last bits of the restart (see below) manage to run before I can run the function.

Registered S3 method overwritten by 'spdep':
  method   from
  plot.mst ape 
Registered S3 method overwritten by 'pegas':
  method      from
  print.amova ade4

I've also tried explicitly loading the XVector package as suggested here but to no avail.

Any assistance would be very much appreciated!

DECIPHER IdTaxa • 2.2k views
ADD COMMENT
0
Entering edit mode

UPDATE: I've done a clean reinstall of the latest version of R and reinstalled the latest versions only the packages that are used in my script (and their dependencies).

At first I had the same problem but then I removed the packages spdep, ape, pegas and ade4, which got IdTaxa running again.

However, now it won't multithread! I've checked parallel is correctly loaded.

Again, any assistance would be appreciated.

ADD REPLY
1
Entering edit mode

Hi Sebastian. If you are using a Mac, the compiler was changed so that multi-threading is no longer supported by default. See the recent thread here for how to enable it.

ADD REPLY
0
Entering edit mode

Erik,

Thanks for posting the link to these workarounds. I've followed the steps you used via Homebrew. My install path (Step 2) was the same as yours but Step 3 didn't work for me. I restarted RStudio and R. I also tried using these lines from http://mac.r-project.org/openmp:

CPPFLAGS += -Xclang -fopenmp
LDFLAGS += -lomp

Strangely enough, multithreading in other packages seems to be working. Do you have any suggestions for what I might try next?

Many thanks! Seb

ADD REPLY
0
Entering edit mode

Using Homebrew worked for me, but this is not the recommended way of enabling OpenMP. I haven't tried the recommended way, so I can't help you there.

Note that not all multithreaded packages use OpenMP, which might be why you observed multithreading on the Mac working in some of your other packages.

ADD REPLY
0
Entering edit mode

Ok. I'll keep trying options on my end to get it multithreading again.

The recommended way you mention is clearly intended as a workaround which could stop working at any point. Are you planning on updating DECIPHER to use another multithreading package that doesn't require OpenMP support?

Cheers, Seb

ADD REPLY
0
Entering edit mode

So it seems this issue has been affecting other packages, namely multithreading in data.table. So finally this solution has worked for me: https://github.com/Rdatatable/data.table/wiki/Installation#openmp-enabled-compiler-for-mac.

ADD REPLY

Login before adding your answer.

Traffic: 605 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