mgimenez720 / plaSquid

Nextflow pipeline for plasmid detection and classification from metagenomic data
GNU General Public License v3.0
7 stars 1 forks source link

Error-there is no package called ‘Biostrings’ #20

Open Jigyasa3 opened 8 months ago

Jigyasa3 commented 8 months ago

Hi @iferres and @mgimenez720,

Thank you for a great resource! I am running the plaSquid software on my plasmid genomes of interest. I was able to run the software on a handful of genomes without any error, but recently, I am getting the following error- Error-

executor >  local (5)
[-        ] process > SetPlsdb:DownPLSDB         -
[-        ] process > SetPlsdb:FormtPLSDB        -
[b5/e5522f] process > RIPsearch:Renamecntgs (1)  [100%] 1 of 1 ✔
[-        ] process > RIPsearch:AnnotContigs (1) -
[-        ] process > RIPsearch:RepSearch        -
[-        ] process > RIPsearch:DomainArch       -
[-        ] process > RIPsearch:FilterDom        -
[-        ] process > RIPsearch:IncSearch        -
[-        ] process > RIPsearch:MobSearch        -
[-        ] process > RIPsearch:RnaSearch (1)    -
[-        ] process > RIPsearch:IncClassif       -
[-        ] process > RIPsearch:IncFilter        -
[-        ] process > RIPsearch:MobFilter        -
[-        ] process > RIPsearch:GeneRetrieve     -
[22/9ddba8] process > Minidist:Splitter (1)      [100%] 1 of 1, failed: 1 ✘
[-        ] process > Minidist:Mapping_pr        -
[-        ] process > Minidist:Parse_paf         -
[-        ] process > SumOutput                  -
[-        ] process > FPCorrection               -
[-        ] process > ChrDetection               -
[-        ] process > FinalOutput                -
Error executing process > 'Minidist:Splitter (1)'

Caused by:
  Process `Minidist:Splitter (1)` terminated with an error exit status (1)

Command executed:

  splitter.R spl_contigs

Command exit status:
  1

Command output:
  (empty)

Command error:
  Error in library(Biostrings, quietly = T) : 
    there is no package called ‘Biostrings’
  Execution halted

Work dir:
  /groups/rubin/projects/jigyasa/ML/results/intergenicregion_find/oriV_annotation/plasquid/plsdb_prokka/plasmidgenomes/work/22/9ddba8bbe9f017ea46bd5a482e2a9d

Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`

My command-

conda activate plaSquid
for i in *fa;do file=`echo ${i}| sed 's/.fa//g'` ; nextflow run /home/jigyasaa/downloads/plaSquid/main.nf --contigs ${i} --outdir  ${OUT_DIR}/${file}/ ;done

I have checked that the R package is present in the environment (~/miniconda3/envs/plaSquid/lib/R/library). what might be going wrong here?

Jigyasa3 commented 8 months ago

The error is coming if I run the code in a bash script and submit it on SLURM. If I run interactively on the command line, then I don't get this error. Any suggestions to bypass that?

mgimenez720 commented 8 months ago

Hello @Jigyasa3, thank you for your comments, plaSquid didn't have the necessary config file to use slurm as executor. I have added that file, you should download it again and try to run it using -profile slurm. If you have singularity installed you could try -profile singularity, slurm.

The big problem with this issue is that we don't have access to a server with slurm installed, so I cannot test if those changes are enough to fix it.

Here you can find the nextflow documentation to support slurm as executor, it may be useful if the problem persists or if you want to customize other options for slurm execution.

Let us know if it works, thanks

Jigyasa3 commented 8 months ago

hi @mgimenez720

Thanks for replying! I re-ran the script after reinstalling the software and conda env, and I am still getting the following error-

code-

#!/bin/bash
#SBATCH --job-name=plasquid

#SBATCH --output=plasquid_%A-%a.out
#SBATCH -o out_plasquid.%j
#SBATCH -e err_plasquid.%j

cd ${IN_DIR}/
#for i in *fasta;do filename=`echo ${i}|sed 's/.fasta//g'` ; mkdir ${OUT_DIR}/${filename};done #create a separate output folder for each sample

conda activate plaSquid
for i in *fasta;do filename=`echo ${i}|sed 's/.fasta//g'` ;nextflow run /home/jigyasaa/downloads/plaSquid/main.nf --contigs ${i} --outdir  ${OUT_DIR}/${filename}/ -profile slurm ;done

error-

Error executing process > 'Minidist:Splitter (1)'

Caused by:
  Process `Minidist:Splitter (1)` terminated with an error exit status (1)

Command executed:

  splitter.R spl_contigs

Command exit status:
  1

Command output:
  (empty)

Command error:
  Error in library(Biostrings, quietly = T) : 
    there is no package called ‘Biostrings’
  Execution halted

Work dir:
  /groups/rubin/projects/jigyasa/ML/results/intergenicregion_find/oriV_annotation/plasquid/test_plasquid/work/65/c33219d5c5e87401ffaba1a9757806

Please let me know if you need more information about the code/environment/error. Looking forward to your reply!

mgimenez720 commented 8 months ago

Hello! Please try using -profile slurm, singularity or -profile slurm, conda instead of activating the conda environment before running. I am sorry I can't be of big help cause we don't have slurm to test the possible solutions.