marbl / merqury

k-mer based assembly evaluation
Other
272 stars 19 forks source link

Rscript execution error #85

Open Raina-M opened 1 year ago

Raina-M commented 1 year ago

I installed Merqury (v1.3) through conda. After running merqury under conda environment: merqury.sh $WD/Carex_hic.meryl $REF Carex_pctg I got the most expected outputs such as qv, completeness, and hist files, but no plots were generated. After checking the log file, I found the error:

For 86366741 distinct 20-mers (with 24 bits used for indexing and 16 bits for tags):
    0.125 GB memory for kmer indices -     16777216 elements 64 bits wide)
    0.161 GB memory for kmer tags    -     86366741 elements 16 bits wide)
    0.050 GB memory for kmer values  -     86366741 elements  5 bits wide)
    0.336 GB memory

Will load 86366741 kmers.  Skipping 0 (too low) and 0 (too high) kmers.
Allocating space for 86382869 suffixes of 16 bits each -> 1382125904 bits (0.161 GB) in blocks of 32.000 MB
                     86382869 values   of 5 bits each -> 431914345 bits (0.050 GB) in blocks of 32.000 MB
Loaded 86366741 kmers.  Skipped 0 (too low) and 0 (too high) kmers.
-- Opening input sequences 'carex_ctg.hic.p_ctg.fasta'.
-- Opening output file '-'.
Bye!

Found 1 command tree.

PROCESSING TREE #1 using 48 threads.
  opIntersect
    Carex_hic.meryl
    carex_ctg.hic.p_ctg.meryl
    output to read.k20.carex_ctg.hic.p_ctg.meryl

Cleaning up.

Bye.

Found 1 command tree.

Found 1 command tree.

Found 1 command tree.
Rscript execution error: No such file or directory

So for some reason, merqury could not find Rscript, but if I run which Rscript, I got: /PATH/bin/conda-envs/envs/merqury/bin/Rscript And I also ran Rscript ./plot_spectra_cn.R I got the same error as following: Rscript execution error: No such file or directory

arangrhie commented 1 year ago

Please refer to this: https://github.com/marbl/merqury/issues/49#issuecomment-852394078 and see if this fixes the path issue. Also, try echo $MERQURY and see if that prints the right path.

The plot_spectra_cn.R could be run separately with

Rscript $MERQURY/plot/plot_spectra_cn.R --help

Sorry for the hassle!

Raina-M commented 1 year ago

Hello, thank you for the reply!

echo 1 in util.sh did not fix the problem. I got the same error message. And echo $MERQURY printed the right path.

Running plot_spectra_cn.R separately could derive the plots but I had to deactivate conda environment at first, otherwise, I still got an Rscript execution error.