jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
346 stars 81 forks source link

Python and R interpreter not found #794

Closed sakcham closed 2 months ago

sakcham commented 4 months ago

Hi, I am trying to install SqueezeMeta on a server. After everything runs successfully, test_install.pl gives the following warning:

Some SqueezeMeta dependencies could not be found in your environment or failed to execute!

Does this need to be fixed? If yes, how do I do it?

fpusan commented 4 months ago

Are you installing through our conda package?

sakcham commented 4 months ago

Yes

sakcham commented 4 months ago

Ok, evolution of the problem. I went into the envs directory and modified the permission (chmod 755) for python3 and R. It seems to have resolved the previous error. Now I have the following warnings.

WARNING: Some SqueezeMeta dependencies could not be found in your environment or failed to execute!

Suggestions?

fpusan commented 4 months ago

And have you activated the right environment? Python and R should be there

sakcham commented 4 months ago

Yes, I have activated it.

fpusan commented 4 months ago

Ah, didn't see your previous message about the permissions. Perhaps you installed the package with sudo? If so , install It as a normal user

sakcham commented 4 months ago

I installed it as a normal user. The libraries also exist in the libs/R/library folder. How to get it working? If I am correct, these libraries are for SQMtools analysis, the pipeline should be running right?

fpusan commented 4 months ago

DAStool (which is part of the main pipeline) also needs a couple of those libraries (doMC and maybe reshape2 if I recall correctly). I am surprised that you needed to modify file permissions, or that R is not finding the libraries. Just in case, can you check whether you are using the R interpreter from the SqueezeMeta conda environment by running which R?

sakcham commented 4 months ago

Hi!

So I checked, its using the SqueezeMeta R.

Output for which R: /gpfs1/scratch/sakcham/programs/miniconda3/envs/SqueezeMeta/bin/R.

However, I fixed the error, needed to modify permission for the seds directory.

Now only "pathview" library cannot be found.

I ran the samples and all completed successfully, except that I do not get the bins output. But I cannot see an error either.

1 01.run_all_assemblies.pl (megahit) 2 02.rnas.pl 3 03.run_prodigal.pl 4 04.rundiamond.pl 5 05.run_hmmer.pl 6 06.lca.pl 7 07.fun3assign.pl 9 09.summarycontigs3.pl 10 10.mapsamples.pl 11 11.mcount.pl 12 12.funcover.pl 13 13.mergeannot2.pl 14 14.runbinning.pl 15 15.dastool.pl 19 19.getcontigs.pl 21 21.stats.pl END

It is not running scripts 16,17 and 18 for some reason. Any suggestions on how to fix this? is this because of the input parameters? I used -taxbinmode s+c to is it because path view package is not accessible?

fpusan commented 4 months ago

pathview missing shouldn't be a problem at the main pipeline, only with SQMtools Can you open your R terminal and try to install It manually from bioconductor? Is this our test dataset? If not can you try running out test dataset with default parameters and see if binning works there?

sakcham commented 4 months ago

The test dataset run completed, It did not run the scripts 16, 17 and 18 either. It gives the same error with my samples as well. I think it's an issue with DASTools. Here is the error:

[1 days, 14 hours, 26 minutes, 11 seconds]: STEP15 -> DAS_TOOL MERGING: 15.dastool.pl Rscript execution error: Permission denied mv: cannot stat ‘/gpfs1/scratch/sakcham/sqm_test/test/intermediate/binners/DAS/test_DASTool_bins/*’: No such file or directory wc: /gpfs1/scratch/sakcham/sqm_test/test/results/bins/: Is a directory WARNING: File /gpfs1/scratch/sakcham/sqm_test/test/results/bins/ is empty!. DAStool did not generate results Skipping BIN TAX ASSIGNMENT: DAS_Tool did not predict bins. Skipping CHECKM: DAS_Tool did not predict bins. Skipping BIN TABLE CREATION: (You already know: DAS_Tool did not predict bins.) [1 days, 14 hours, 29 minutes, 15 seconds]: STEP19 -> CREATING CONTIG TABLE: 19.getcontigs.pl Reading taxa for contigs information...done! Reading GC & length... done! Reading number of genes... done! Reading coverages... done! Reading bins... done! Creating contig table...done!

CONTIG TABLE CREATED: /gpfs1/scratch/sakcham/sqm_test/test/results/19.test.contigtable

Skipping MINPATH: DAS_Tool did not predict bins. [1 days, 14 hours, 30 minutes, 30 seconds]: STEP21 -> MAKING FINAL STATISTICS: 21.stats.pl -p destination: Broken pipe Output in /gpfs1/scratch/sakcham/sqm_test/test/results/21.test.stats

Deleting temporary files in /gpfs1/scratch/sakcham/sqm_test/test/temp [1 days, 14 hours, 31 minutes, 1 seconds]: FINISHED -> Have fun!

WARNINGS: DAS Tool abnormal termination: file /gpfs1/scratch/sakcham/sqm_test/test/results/bins/ is empty. There are NO BINS!

How do I move forward?

fpusan commented 4 months ago

Rscript execution error: Permission denied

First time I see this happening. Where is SqueezeMeta installed? Is it installed under your (non-root) user?

Anyways this seems to be related to a lack of execution permissions in /path/to/SqueezeMeta/bin/DAS_Tool/src. So you can probably fix it manually (same as you fixed the previous problems).

sakcham commented 3 months ago

Ok, so it worked, but I also had to make the DASTools under R libs executable for some reason. This is the output from the test dataset

DAS

Number of bins 69 Complete >= 50% 32 Complete >= 75% 19 Complete >= 90% 9 Contamination < 10% 65 Contamination >= 50% 0 Congruent bins 14 Disparity >0 55 Disparity >= 0.25 15 Hi-qual bins (>90% complete,<10% contam) 9 Good-qual bins (>75% complete,<10% contam) 18

Is that correct? All in order?

fpusan commented 3 months ago

Seems about right. Are you getting bins, taxi, completeness, etc in the results/*bintable file?

fpusan commented 2 months ago

Closing due to lack of activity, feel free to reopen