Closed splaisan closed 1 year ago
@splaisan Thanks for the detailed report. The issue is due to lambda not being available for macOS in Bioconda, see https://anaconda.org/bioconda/lambda/files and https://github.com/bioconda/bioconda-recipes/blob/master/recipes/lambda/meta.yaml#L13 . Since it seems that's the only package among the direct dependencies of lotus2 that is not available for macOS, I can try to update the lambda bioconda recipe to build that as well.
thanks @nsoranzo, can I install lambda on my mac using macport to fill the gap? or build it from some source? I use macport (and not brew) but I see a lambda is present there although with a version number 0.1.4 and math related (does not sound right!) https://ports.macports.org/port/lambda/details/
maybe this one is more suited? https://github.com/seqan/lambda/releases/download/lambda-v1.9.5/lambda2-1.9.5-Darwin-x86_64.zip
lambda2 version: 1.9.5 SeqAn version: 2.4.0
thanks S
I think https://github.com/seqan/lambda/releases/tag/lambda-v1.0.3 would be the best, 1.9.5 is actually a 2.x pre-release and AFAIK lotus2 works only with the 1.x series.
Any way, my attempt at building lambda on macOS for bioconda is at https://github.com/bioconda/bioconda-recipes/pull/37996 .
tried to build from the 1.0.3 source you linked but the build commands found on their wiki do not execute, not enough into cmake to fix it myself, I will wait on your solution. Best S
It took a few more tries, but lambda (1.0.3 and 2.0.0) for macOS is now available in bioconda!
@splaisan Can you try again and let us know?
Thanks Nicola,
It first failed with conda/mamba install -c bioconda lotus2
with - nothing provides python-igraph needed by swarm-2.1.10-py27_0
but finally worked after adding conda-forge
as first repo with mamba install -c conda-forge -c bioconda lotus2
the final recipe on my mac is thus (with mamba installed in base env):
$ conda create -c conda-forge -c bioconda --strict-channel-priority -n lotus2
$ conda activate lotus2
$ mamba install -c conda-forge -c bioconda lotus2
# test
$ lotus2 -v
LotuS 2.22
thanks a lot for the great support! right in time for next week training with Falk ;-)
Great to hear @splaisan , thanks for reporting back!
oepsy!
I have a new issue when running the second example ./lotus2 -i Example/ -m Example/miSeqMap.sm.txt -o myTestRun2 -s configs/sdm_miSeq2.txt -p miSeq -amplicon_type SSU -forwardPrimer GTGYCAGCMGCCGCGGTAA -reversePrimer GGACTACNVGGGTWTCTAAT -CL dada2 -refDB SLV -taxAligner lambda
I believe this is due to my own R packages mixing up with yours (probably my dada2 &| Rcpp)
$ lotus2 -i $CONDA_PREFIX/share/lotus2-2.22-0/Example/ -m $CONDA_PREFIX/share/lotus2-2.22-0/Example/miSeqMap.sm.txt -o myTestRun2 -s $CONDA_PREFIX/share/lotus2-2.22-0/configs/sdm_miSeq2.txt -p miSeq -amplicon_type SSU -forwardPrimer GTGYCAGCMGCCGCGGTAA -reversePrimer GGACTACNVGGGTWTCTAAT -CL dada2 -refDB SLV -taxAligner lambda
Using Silva SSU ref seq database.
--------------------------------------------------------------------------------
00:00:00 LotuS 2.22
ARGS
perl /opt/miniconda3/envs/lotus2/bin/lotus2 -i /opt/miniconda3/envs/lotus2/share/lotus2-2.22-0/Example/
-m /opt/miniconda3/envs/lotus2/share/lotus2-2.22-0/Example/miSeqMap.sm.txt
-o myTestRun2 -s /opt/miniconda3/envs/lotus2/share/lotus2-2.22-0/configs/sdm_miSeq2.txt
-p miSeq -amplicon_type SSU -forwardPrimer GTGYCAGCMGCCGCGGTAA
-reversePrimer GGACTACNVGGGTWTCTAAT -CL dada2 -refDB SLV
-taxAligner lambda
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
00:00:00 Reading mapping file
Sequence files are indicated in mapping file.
Switching to paired end read mode
Found "SequencingRun" column, with 1 categories (C)
--------------------------------------------------------------------------------
------------ I/O configuration --------------
Input /opt/miniconda3/envs/lotus2/share/lotus2-2.22-0/Example/
Output myTestRun2
SDM options /opt/miniconda3/envs/lotus2/share/lotus2-2.22-0/configs/sdm_miSeq2.txt
TempDir myTestRun2/tmpFiles/
------------ Configuration LotuS --------------
de novo sequence clustering with DADA2 into ASV's
Sequencing platform miseq
Amplicon target bacteria, SSU
Dereplication filter 8:1,4:2,3:3
Clustering algorithm DADA2 into ASV's
Read mapping (non tax) minimap2
ASV clustering based on sequence error profiles (-dada2seed 0)
Precluster read merging No
Ref Chimera checking Yes (DB=/opt/miniconda3/envs/lotus2/share/lotus2-2.22-0//DB//rdp_gold.fa, -chim_skew 2)
deNovo Chimera check Yes
Tax assignment Lambda (-LCA_frac 0.8, -LCA_cover 0.5, ids 97,95,93,91,88,78,0, -useBestBlastHitOnly 0)
ReferenceDatabase SILVA
RefDB location /opt/miniconda3/envs/lotus2/share/lotus2-2.22-0//DB//SLV_138.1_SSU.fasta
ASV phylogeny Yes (mafft, fasttree2)
Unclassified ASV's Kept in matrix
--------------------------------------------
--------------------------------------------------------------------------------
00:00:01 Demultiplexing, filtering, dereplicating input files, this
might take some time..
check progress at myTestRun2/LotuSLogS/LotuS_progout.log
00:00:01 Finished primary read processing with sdm:
Reads processed: 500; 500 (pair 1;pair 2)
Accepted (High qual): 332; 436 (46; 82 end-trimmed)
Accepted (Mid qual): 10;28
Rejected: 158; 36
Dereplication block 0: 13 unique sequences (avg size 9; 117 counts)
For an extensive report see myTestRun2/LotuSLogS//demulti.log
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
00:00:01 DADA2 ASV clustering
check progress at myTestRun2/LotuSLogS/LotuS_progout.log
CMD failed: /opt/miniconda3/envs/lotus2/bin/Rscript --vanilla /opt/miniconda3/envs/lotus2/share/lotus2-2.22-0/bin/R/dada2_pip.R myTestRun2/tmpFiles//demultiplexed/ myTestRun2/tmpFiles/ 0 1 myTestRun2/primary/in.map myTestRun2/tmpFiles//derep.fas
see myTestRun2/LotuSLogS/LotuS_progout.log for error log
R is OK it seems
$ R
WARNING: ignoring environment value of R_HOME
Error in .makeMessage(..., domain = domain) :
3 arguments passed to .Internal(gettext) which requires 2
R version 4.1.3 (2022-03-10) -- "One Push-Up"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Error in .makeMessage(..., domain = domain, appendLF = appendLF) :
3 arguments passed to .Internal(gettext) which requires 2
which R
/opt/miniconda3/envs/lotus2/bin/R
but the $R_LIBS library path is mine (non-canonical) instead of yours (/opt/miniconda3/envs/lotus2/lib/R/library
)
.libPaths()
[1] "/opt/R_LIBS"
I tried:
export R_LIBS=/opt/miniconda3/envs/lotus2/lib/R/library
cat myTestRun2/LotuSLogS/LotuS_progout.log
This is sdm (simple demultiplexer) 2.05 beta.
Checking for reverse primers on 1st read.
Checking for switched pairs.
Run with 1 cores.At PID-0292-1_S1_L001_R1_001.fastq.sm.gz:
Writing demultiplexed files to : myTestRun2/tmpFiles//demultiplexed/
67.2% of 250 reads accepted (89.6% end-trimmed)
Pair 2: 92% of 250 reads accepted (83.2% end - trimmed)
At PID-0292-2_S2_L001_R1_001.fastq.sm.gz:
Writing demultiplexed files to : myTestRun2/tmpFiles//demultiplexed/
69.6% of 250 reads accepted (92% end-trimmed)
Pair 2: 93.6% of 250 reads accepted (84% end - trimmed)
Evaluating and writing dereplicated reads..
Dereplication: 13 unique sequences (avg size 9; 117 counts)
193/206 not passing derep conditions (223 counts; 8:1,4:2,3:3)
sdm 2.05 beta
Input File: several
Output File: myTestRun2/tmpFiles//demulti.1.fna
Reads processed: 500; 500 (pair 1;pair 2)
Rejected: 158; 36
Accepted (High qual): 332; 436 (46; 82 end-trimmed)
Accepted (Mid qual): 10;28
Singletons among these: 0; 0
Bad Reads recovered with dereplication: 8
Short amplicon mode.
Min/Avg/Max stats Pair 1
- sequence Length : 101/169.756/170
- Quality : 27/35.244/38
- Median sequence Length : 0, Quality : 0
- Accum. Error 0.120159
Trimmed due to:
> 25 avg qual_ in 20 bp windows : 0; 0
> (3.75) acc. errors, trimmed seqs : 0; 0
Rejected due to:
< min Sequence length (100) : 34; 36
-after Quality trimming : 34; 36
< avg Quality (27) : 0; 0
< window (50 nt) avg. Quality (25) : 23; 27
> max Sequence length (1000) : 0; 0
> (8) homo-nt run : 0; 0
> (0) amb. Bases : 0; 0
> (2.5) binomial est. errors : 124; 0
Specific sequence searches:
-With fwd Primer remaining (<= 0 mismatches, required) : 0; 0
-With rev Primer remaining (<= 0 mismatches) : 0; 0
-Barcode unidentified (max 0 errors) : 0
SampleID Barcode Instances
ANG1 166
ANG2 174
Time taken: : 76ms
WARNING: ignoring environment value of R_HOME
Bioconductor version 3.14 (BiocManager 1.30.19), R 4.1.3 (2022-03-10)
Warning message:
package(s) not installed when version(s) same as or greater than current; use
`force = TRUE` to re-install: 'dada2'
Detected 2 samples in batch C (1/1) .. Computing error profiles
Learning error profiles for the forward reads:
Error in learnErrors(filtFs, nbases = bp4error, multithread = ncores) :
could not find function "learnErrors"
Error in errF : object 'errF' not found
Execution halted
the R_LIBS is somehow better but not yet fixed
$R
...
> .libPaths()
[1] "/opt/miniconda3/envs/lotus2/lib/R/library"
[2] "/opt/R_LIBS"
> version
_
platform x86_64-apple-darwin13.4.0
arch x86_64
os darwin13.4.0
system x86_64, darwin13.4.0
status
major 4
minor 1.3
year 2022
month 03
day 10
svn rev 81868
language R
version.string R version 4.1.3 (2022-03-10)
nickname One Push-Up
I renamed my $HOME .Renviron
to avoid any definition of R_LIBS and tried the example on both my mac and my ubuntu server (same R install and conda env install method and paths)
under ubuntu it leads to a working R and the example2 commands runs (currently building the LAMBDA index)
on mac it keeps failing but I do not have anymore the R systematic error Error in .makeMessage(..., domain = domain) : 3 arguments passed to .Internal(gettext) which requires 2
Bioconductor version 3.14 (BiocManager 1.30.19), R 4.1.3 (2022-03-10)
Warning message:
package(s) not installed when version(s) same as or greater than current; use
`force = TRUE` to re-install: 'dada2'
Detected 2 samples in batch C (1/1) .. Computing error profiles
Learning error profiles for the forward reads:
Error in learnErrors(filtFs, nbases = bp4error, multithread = ncores) :
could not find function "learnErrors"
Error in errF : object 'errF' not found
Execution halted
By comparing my packages between mac and ubuntu, I found that the mac instance is missing one R package to load dada2 (GenomeInfoDbData)
> library("dada2")
Loading required package: Rcpp
Error: package or namespace load failed for ‘dada2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘GenomeInfoDbData’
> BiocManager::install("GenomeInfoDbData")
Bioconductor version 3.14 (BiocManager 1.30.19), R 4.1.3 (2022-03-10)
Installing package(s) 'GenomeInfoDbData'
trying URL 'https://bioconductor.org/packages/3.14/data/annotation/src/contrib/GenomeInfoDbData_1.2.7.tar.gz'
Content type 'application/octet-stream' length 11193674 bytes (10.7 MB)
==================================================
downloaded 10.7 MB
* installing *source* package ‘GenomeInfoDbData’ ...
** using staged installation
** data
** inst
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (GenomeInfoDbData)
The downloaded source packages are in
‘/private/var/folders/9t/3znyqdv97hd88564_qzqt39d78gyqt/T/RtmpETXFDY/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
> library("dada2")
# OK
after adding manually ‘GenomeInfoDbData’ in R, the run is now also building the LAMBDA index
Not sure where are R 4.2 / Bioconductor 3.16 packages coming from, but they are not from the conda environment. I can only guess there was some environment variable interfering. Any way nothing we can fix on lotus2 / bioconda side, I believe, sorry.
I finally fixed it.
My system R was indeed interfering.
I had defined R_LIBS
in my $HOME .Renviron
and this was propagated in conda.
I need this for RStudio and R on my laptop so I could not really remove it but I found a way by editing the the lotus activate and deactivate scripts in your conda to swap, not only RSTUDIO_WHICH_R
, but also R_HOME and R_LIBS.
Maybe this issue comes back for other users, I had it already for other condas and had to quit on it, now I have a fix
Now the ticket is officially closed, I could run the demo without any error message
Following info on the related issue 24, I tried the following:
I tried installing with conda but it failed
I then tried with mamba
The error is not very verbose, any idea how to fix this?
Thanks in advance