Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems in reading fastq file #249

Open
PrimettaFaccioli opened this issue May 17, 2023 · 5 comments
Open

Problems in reading fastq file #249

PrimettaFaccioli opened this issue May 17, 2023 · 5 comments

Comments

@PrimettaFaccioli
Copy link

PrimettaFaccioli commented May 17, 2023

Please find below the error reported by nextflow. Could you please help me? Many thanks.

[nf-core/smrnaseq] Pipeline completed with errors-
ERROR ~ Error executing process > 'NFCORE_SMRNASEQ:SMRNASEQ:MIRTRACE:MIRTRACE_RUN (1)'

Caused by:
  Cannot cast object 'data.fastq.gz' with class 'nextflow.processor.TaskPath' to class 'java.util.List' -- Check script '/home/primetta/.nextflow/assets/nf-core/smrnaseq/./workflows/../subworkflows/local/../../modules/local/mirtrace.nf' at line: 28

Source block:
  def primer = adapter ? "--adapter ${adapter}" : ""
  def protocol = params.protocol == 'custom' ? '' : "--protocol $params.protocol"
  def java_mem = ''
  if(task.memory){
          tmem = task.memory.toBytes()
          java_mem = "-Xms${tmem} -Xmx${tmem}"
      }
  def config_lines = [ids,reads]
      .transpose()
      .collect({ id, path -> "echo '${path},${id}' >> mirtrace_config" })
  """
      export mirtracejar=\$(dirname \$(which mirtrace))
  
      ${config_lines.join("\n    ")}
  
      java $java_mem -jar \$mirtracejar/mirtrace.jar --mirtrace-wrapper-name mirtrace qc  \\
          --species $params.mirtrace_species \\
          $primer \\
          $protocol \\
          --config mirtrace_config \\
          --write-fasta \\
          --output-dir mirtrace \\
          --force
  
      cat <<-END_VERSIONS > versions.yml
      ${task.process}":
          mirtrace: \$(echo \$(mirtrace -v 2>&1))
      END_VERSIONS
    

@apeltzer
Copy link
Member

Can you post more information? Samplesheet, your parameters etc pp.?

@PrimettaFaccioli
Copy link
Author

Hi! This was just a test run so I have a samplesheet (prova_corsa.csv) with only one sample (30909144 raw single illumina reads):

sample,fastq_1
test1,/home/primetta/Desktop/broccoli/ensembl_56/data.fastq.gz

The command was this:

nextflow run nf-core/smrnaseq --input prova_corsa.csv --outdir test --fasta genome.fa -profile docker --mirtrace_species ath --max_cpus 3 --max_memory 25.GB -w work

Many thanks for your help.

@PrimettaFaccioli
Copy link
Author

I have done some more tests:

  1. nextflow run nf-core/smrnaseq -profile test,docker --outdir test
    Everything was working but I cannot find some of the expected folders in results, e.g. mirdeep, mirtop
  2. I have then used the genome file of the above test and one of the fastq files, both downloaded by the test pipeline (so the ones that works in the test run, not my files) and run the pipeline again with my original parameters:
    nextflow run nf-core/smrnaseq --input prova_corsa.csv --outdir prova1/test --fasta prova1/genome.fa -profile docker --mirtrace_species ath --max_cpus 3 --max_memory 25.GB -w prova1/work
    but in this case it was not working reporting the same error that I posted some days ago
    -[nf-core/smrnaseq] Pipeline completed with errors-
    ERROR ~ Error executing process > 'NFCORE_SMRNASEQ:SMRNASEQ:MIRTRACE:MIRTRACE_RUN (1)'

Caused by:
Cannot cast object 'Ctl-N3-R1_S3_L001_R1_001.fastq.gz' with class 'nextflow.processor.TaskPath' to class 'java.util.List' -- Check script '/home/primetta/.nextflow/assets/nf-core/smrnaseq/./workflows/../subworkflows/local/../../modules/local/mirtrace.nf' at line: 28

Source block:
def primer = adapter ? "--adapter ${adapter}" : ""
def protocol = params.protocol == 'custom' ? '' : "--protocol $params.protocol"
def java_mem = ''
if(task.memory){
tmem = task.memory.toBytes()
java_mem = "-Xms${tmem} -Xmx${tmem}"
}
def config_lines = [ids,reads]
.transpose()
.collect({ id, path -> "echo '${path},${id}' >> mirtrace_config" })
"""
export mirtracejar=$(dirname $(which mirtrace))

  ${config_lines.join("\n    ")}

  java $java_mem -jar \$mirtracejar/mirtrace.jar --mirtrace-wrapper-name mirtrace qc  \\
      --species $params.mirtrace_species \\
      $primer \\
      $protocol \\
      --config mirtrace_config \\
      --write-fasta \\
      --output-dir mirtrace \\
      --force

  cat <<-END_VERSIONS > versions.yml
  ${task.process}":
      mirtrace: \$(echo \$(mirtrace -v 2>&1))
  END_VERSIONS
  """

Tip: when you have fixed the problem you can continue the execution adding the option -resume to the run command line

-- Check '.nextflow.log' file for details

@shivani303
Copy link

Hey @PrimettaFaccioli are you able to solve this issue?

@seiboldfyr
Copy link

Following up on this issue - I'm seeing the same error. Was there any resolution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants