MaestSi / MetONTIIME

A Meta-barcoding pipeline for analysing ONT data in QIIME2 framework
GNU General Public License v3.0
78 stars 17 forks source link

Error executing 'derepSeq' process during analysis with provided example data #96

Closed linxavier1 closed 8 months ago

linxavier1 commented 8 months ago

Dear MetONTIIME maintainers and fellow users,

I am new to this and still learning my way around its analysis capabilities. I am seeking assistance with an error I encountered while attempting to perform sequence dereplication and feature clustering on provided example data.

ERROR ~ Error executing process > 'derepSeq'

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

Command executed:

  mkdir -p /home/hyf/Desktop/test/test_result/derepSeq

  qiime vsearch dereplicate-sequences 3499bacd2d--i-sequences /home/hyf/Desktop/test/test_result/importFastq/sequences.qza      --o-dereplicated-table /home/hyf/Desktop/test/test_result/derepSeq/table_tmp.qza  replicate t--o-dereplicated-sequences /home/hyf/Desktop/test/test_result/derepSeq/rep-seqs_tmp.qza

  qiime vsearch cluster-features-de-novo s          --i-sequences /home/hyf/Desktop/test/test_result/derepSeq/rep-seqs_tmp.qza )    --i-table /home/hyf/Desktop/test/test_result/derepSeq/table_tmp.qza         --p-perc-identity 1         --o-clustered-table /home/hyf/Desktop/test/test_result/derepSeq/table.qza       --o-clustered-sequences /home/hyf/Desktop/test/test_result/derepSeq/rep-seqs.qza        --p-threads 6

  rm /home/hyf/Desktop/test/test_result/derepSeq/table_tmp.qza /home/hyf/Desktop/test/test_result/derepSeq/rep-seqs_tmp.qza

  qiime feature-table summarize         --i-table /home/hyf/Desktop/test/test_result/derepSeq/table.qza         --o-visualization /home/hyf/Desktop/test/test_result/derepSeq/table.qzv     --m-sample-metadata-file /path/to/sample-metadata.tsv

  qiime feature-table tabulate-seqs         --i-data /home/hyf/Desktop/test/test_result/derepSeq/rep-seqs.qza       --o-visualization /home/hyf/Desktop/test/test_result/derepSeq/rep-seqs.qzv

Command exit status:
  1

Command output:
  (empty)

Command error:
  Usage: qiime vsearch dereplicate-sequences [OPTIONS]

I am unsure what might be causing this error and would greatly appreciate any guidance on how to resolve it. Any suggestions or pointers to relevant documentation would be immensely helpful.

Thank you in advance for your assistance!

Best regards, .nextflow.log metontiime2.conf.txt

MaestSi commented 8 months ago

Hi, I think this is the error:

Mar-17 23:30:57.795 [Actor Thread 16] DEBUG nextflow.util.CacheHelper - Unable to get file attributes file: /path/to/sequence.fasta -- Cause: java.nio.file.NoSuchFileException: /path/to/sequence.fasta
Mar-17 23:30:57.797 [Actor Thread 16] DEBUG nextflow.util.CacheHelper - Unable to get file attributes file: /path/to/taxonomy.tsv -- Cause: java.nio.file.NoSuchFileException: /path/to/taxonomy.tsv

In particular, at lines 7-11 in the metontiime2.conf file (or in the command line with --dbSequencesFasta and --dbTaxonomyTsv):

//Path to database file with sequences in fasta format
dbSequencesFasta="/path/to/sequence.fasta"
//Path to database file with sequence id-to-taxonomy correspondence in tsv format
dbTaxonomyTsv="/path/to/taxonomy.tsv"

you should set a value for dbSequencesFasta and dbTaxonomyTsv variables. Best, SM

linxavier1 commented 8 months ago

Dear MetONTIIME maintainers,

I hope this message finds you well. Following your instructions, I was able to successfully run the analysis with the example data. Your support was invaluable and greatly appreciated.

However, I've encountered a new challenge while attempting to analyze my own dataset. The error logs indicate that the process assignTaxonomy (1) terminated abnormally with an exit status of 137. This occurred despite the process appearing to have sufficient resources allocated as per the configuration in metontiome2.conf.

I've attached the relevant error (error.txt) and the .nextflow.log (.nextflow.log) for your reference. Additionally, I've included the configuration file (metontiome2.conf.txt) that I'm using for the analysis.

Could you please advise if there are any specific parameters or conditions that might lead to this issue? I would greatly appreciate any further assistance or direction you can provide to help resolve this new challenge. Your expertise is truly valued, and I look forward to your response.

Thank you once again for your time and help.

Best regards, .nextflow.log.txt error.txt metontiime2.conf.txt metontiime2.nf.txt

MaestSi commented 8 months ago

Hi, depending on whether you are using either singularity or docker profile, you should edit lines 133-134 or 229-230 of the .conf file, respectively.

cpus = { params.assignTaxonomy ? X : 1 }
memory = { params.assignTaxonomy ? Y.GB + (2.GB * (task.attempt-1)) : 1.GB }

In particular, in your current file you have X = 6 and Y = 10. While the number of cpus mainly impacts on the computational time needed for running the pipeline (and also on the RAM memory usage), the insufficient RAM memory may definitely cause this type of errors, resulting in a killed process. Depending on how much RAM you have available, I'd suggest to set the value for Y. This RAM memory usage depends on the number of reads, size of the database etc. The required value for Y for a standard project may be in the order of hundreds of GB. I'd suggest to set-up Nextflow Tower and monitor the memory usage for downsamplings of the full dataset. See this post for details. Best, SM

linxavier1 commented 8 months ago

Dear MetONTIIME maintainers,

Thank you for your prompt response and valuable suggestions. I have adjusted the memory allocation in my metontiome2.conf file as recommended and have also integrated the Nextflow Tower for resource monitoring by adding the tower token to the configuration.

However, I am now facing a new issue. When I attempt to run the workflow with the updated configuration, I receive the following error message:

Launching `metontiime2.nf` [prickly_jepsen] DSL2 - revision: ce81e587ac
Downloading plugin nf-tower@1.6.3
ERROR ~ Plugin with id nf-tower not found in any repository

Could you please guide me on how to resolve this issue? I believe it might be related to the plugin repository configuration or the tower setup, but I am not certain.

Thank you once again for your assistance. I am looking forward to your guidance so I can proceed with my analysis.

Best regards, .nextflow.log.txt metontiime2.conf.txt

MaestSi commented 8 months ago

Hi, it seems to be a Nextflow-related issue, failing to download the nf-tower plugin. It may either be a temporary issue (try again after a few hours), or you may try solving it by updating Nextflow version. Best, SM

MaestSi commented 8 months ago

Closing due to inactivity. Feel free to reopen it, in case you have any further issues. Best, SM