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

Missing dependency in orp_transrate Docker container #31

Open
IdoBar opened this issue Dec 31, 2024 · 0 comments
Open

Missing dependency in orp_transrate Docker container #31

IdoBar opened this issue Dec 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@IdoBar
Copy link

IdoBar commented Dec 31, 2024

Description of the bug

Transrate fails to run from the suggested orp_transrate Docker container (docker.io-avanibhojwani-orp_transrate-1.0.3_cv1.2.img) due to missing BLAST in the container.

There are 2 ways to solve this:

  1. Build or find an orp-transrate container that has blast installed in the environment
  2. Use the full ORP Docker container and make sure it activates the internal orp conda environment within the container and disable binding the /home folder (see below how I edited the ORP_TRANSRATE module to do that)
process ORP_TRANSRATE {
    tag "$meta.id"
    label 'process_high'

    // Using conda or the biocontainer for transrate results in a SNAP index error.
    // However, the error does not occur when using the tarball from the Oyster River Protocol.
    // see https://github.com/blahah/transrate/issues/248
    // container 'docker.io/avanibhojwani/orp_transrate:1.0.3_cv1.2'
    container 'docker.io/macmaneslab/orp:2.3.3'
    containerOptions = '--no-mount /home'
    
    input:
    tuple val(meta), path(fasta)         // assembly file
    tuple val(meta), path(reads)         // processed reads
    path reference                       // reference proteins or transcripts fasta

    output:
    path "${fasta.baseName}/"           , emit: transrate_results
    path "assemblies.csv"               , emit: summary_csv
    path "transrate.log"                , emit: log
    path "versions.yml"                 , emit: versions

    when:
    task.ext.when == null || task.ext.when

    script:
    // Exit if running this module with -profile conda / -profile mamba
    if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
        error "ORP_TRANSRATE module does not support Conda. Please use Docker / Singularity / Podman instead."
    }
    def args = task.ext.args ?: ''
    def prefix = task.ext.prefix ?: "${meta.id}"
    def reference = params.transrate_reference ? "--reference ${params.transrate_reference}" : ""

    """
    source /home/orp/Oyster_River_Protocol/software/anaconda/install/bin/activate orp
    gunzip -c ${reads[0]} > ${prefix}_1.fq
    gunzip -c ${reads[1]} > ${prefix}_2.fq

    
    transrate \\
        --assembly $fasta \\
        --left ${prefix}_1.fq \\
        --right ${prefix}_2.fq \\
        --threads $task.cpus \\
        $reference \\
        $args

    cp .command.out transrate.log
    cp -r transrate_results/* ./

    cat <<-END_VERSIONS > versions.yml
    "${task.process}":
        transrate: \$(transrate -v)
    END_VERSIONS
    """
}

Command used and terminal output

$ nextflow-24.04.4-all run nf-core/denovotranscript -r 1.1.0 \
		 --input Mnova_samplesheet.csv \
		 --transrate_reference /home/ibar/adna/sandbox/OTE14085/Minke_genome/ncbi_dataset/data/GCF_949987535.1/protein.faa \
		 --fasta /home/ibar/adna/sandbox/OTE14085/Mnova_genome/HumpbackWhale_Final_Genome_forNCBI.fasta \
		 --outdir assembly_results \
		 --assemblers trinity,rnaspades \
		 -with-tower \
		 -profile apptainer,bunya \
		 -c /home/ibar/.nextflow/bunya.config \
		 -resume

Error executing process > 'NFCORE_DENOVOTRANSCRIPT:DENOVOTRANSCRIPT:TRANSRATE (pooled_reads)'

Caused by:
  Process `NFCORE_DENOVOTRANSCRIPT:DENOVOTRANSCRIPT:TRANSRATE (pooled_reads)` terminated with an error exit status (1)


Command executed:

  gunzip -c pooled_reads_1.merged.fastq.gz > pooled_reads_1.fq
  gunzip -c pooled_reads_2.merged.fastq.gz > pooled_reads_2.fq
  
  transrate \
      --assembly all_assembled.okay.mrna \
      --left pooled_reads_1.fq \
      --right pooled_reads_2.fq \
      --threads 12 \
      --reference /home/ibar/adna/sandbox/OTE14085/Minke_genome/ncbi_dataset/data/GCF_949987535.1/protein.faa \
  
  
  cp .command.out transrate.log
  cp -r transrate_results/* ./
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_DENOVOTRANSCRIPT:DENOVOTRANSCRIPT:TRANSRATE":
      transrate: $(transrate -v)
  END_VERSIONS

Command exit status:
  1

Command output:
  Dependencies are missing:
    - blastplus (2.2.[0-9])
  You are running the packaged version of transrate
  This comes with the read-metrics dependencies pre-installed
  

Command wrapper:
  Dependencies are missing:
    - blastplus (2.2.[0-9])
  You are running the packaged version of transrate
  This comes with the read-metrics dependencies pre-installed
  

Work dir:
  /scratch/project_mnt/S0016/sandbox/OTE14085/Mnova_denovotranscript_assembly/work/37/77c01c90c440f4d3b427ca1cddf9db

Relevant files

No response

System information

Nextflow version (eg. 24.04.4)
Hardware: HPC
Executor: slurm
Container engine: Apptainer
OS: Rocky Linux release 8.10 (Green Obsidian)
Version of nf-core/denovotranscript: 1.1.0
@IdoBar IdoBar added the bug Something isn't working label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant