- 
                Notifications
    You must be signed in to change notification settings 
- Fork 928
New module: Ribodetector #9209
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
          
     Open
      
      
            maxibor
  wants to merge
  7
  commits into
  nf-core:master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
maxibor:ribodetector
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +283
        
        
          −0
        
        
          
        
      
    
  
  
     Open
                    New module: Ribodetector #9209
Changes from all commits
      Commits
    
    
            Show all changes
          
          
            7 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      ccfdc1a
              
                module: add ribodetector
              
              
                 6ccf8e1
              
                Merge branch 'master' of github.com:nf-core/modules into ribodetector
              
              
                 f54b3c0
              
                Merge branch 'master' into ribodetector
              
              
                maxibor 3cd7387
              
                fix: pr review suggestions
              
              
                 f1cc6ce
              
                test: update snapshot assertion
              
              
                 de4d11f
              
                Merge branch 'master' into ribodetector
              
              
                maxibor 6ab5a92
              
                Merge branch 'master' into ribodetector
              
              
                maxibor File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
          Some comments aren't visible on the classic Files Changed page.
        
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
| channels: | ||
| - conda-forge | ||
| - bioconda | ||
| dependencies: | ||
| - "bioconda::ribodetector=0.3.1" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| process RIBODETECTOR { | ||
| tag "$meta.id" | ||
| label 'process_medium' | ||
|  | ||
| conda "${moduleDir}/environment.yml" | ||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
| 'https://depot.galaxyproject.org/singularity/ribodetector:0.3.1--pyhdfd78af_0': | ||
| 'biocontainers/ribodetector:0.3.1--pyhdfd78af_0' }" | ||
|  | ||
| input: | ||
| tuple val(meta), path(fastq) | ||
| val length | ||
|  | ||
| output: | ||
| tuple val(meta), path("*.nonrna*.fastq.gz"), emit: fastq | ||
| tuple val(meta), path("*.log") , emit: log | ||
| path "versions.yml" , emit: versions | ||
|  | ||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|  | ||
| script: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| ribodetector_bin = task.accelerator ? "ribodetector" : "ribodetector_cpu" | ||
| ribodetector_mem = task.accelerator ? "-m $task.memory.toGiga()" : "" | ||
| output = meta.single_end ? "${prefix}.nonrna.fastq.gz" : "${prefix}.nonrna.1.fastq.gz ${prefix}.nonrna.2.fastq.gz" | ||
|  | ||
| """ | ||
| ${ribodetector_bin} \\ | ||
| -i ${fastq} \\ | ||
| -o ${output} \\ | ||
| -l ${length} \\ | ||
| -t ${task.cpus} \\ | ||
| --log ${prefix}.log \\ | ||
| ${ribodetector_mem} \\ | ||
| ${args} | ||
|  | ||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| ribodetector: \$(ribodetector --version | sed 's/ribodetector //g') | ||
| END_VERSIONS | ||
| """ | ||
|  | ||
|         
                  maxibor marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| stub: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
|  | ||
| """ | ||
| echo $args | ||
|  | ||
| echo | gzip > ${prefix}.nonrna.1.fastq.gz | ||
| echo | gzip > ${prefix}.nonrna.2.fastq.gz | ||
| touch ${prefix}.log | ||
|  | ||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| ribodetector: \$(ribodetector --version | sed 's/ribodetector //g') | ||
| END_VERSIONS | ||
| """ | ||
| } | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
| name: "ribodetector" | ||
| description: Accurate and rapid RiboRNA sequences Detector based on deep | ||
| learning | ||
| keywords: | ||
| - RNA | ||
| - RNAseq | ||
| - rRNA | ||
| - ribosomal RNA | ||
| - rRNA depletion | ||
| - rRNA removal | ||
| - rRNA filtering | ||
| - deep learning | ||
| - Riboseq | ||
| - genomics | ||
| tools: | ||
| - "ribodetector": | ||
| description: "Accurate and rapid RiboRNA sequences detector based on deep learning" | ||
| homepage: "https://github.com/hzi-bifo/RiboDetector" | ||
| documentation: "https://github.com/hzi-bifo/RiboDetector" | ||
| tool_dev_url: "https://github.com/hzi-bifo/RiboDetector" | ||
| doi: "10.1093/nar/gkac112" | ||
| licence: ['GPL v3-or-later'] | ||
| identifier: biotools:ribodetector | ||
|  | ||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing riboseq sample information | ||
| e.g. `[ id:'sample1', single_end:false ] | ||
| - fastq: | ||
| type: file | ||
| description: | | ||
| List of input FastQ files of size 1 and 2 for single-end and paired-end data, | ||
| respectively. | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_1930 # fastq format | ||
| - length: | ||
| type: integer | ||
| description: | | ||
| Sequencing read length (mean length). Note: the accuracy reduces for reads shorter than 40 | ||
| pattern: "integer >= 1" | ||
| output: | ||
| fastq: | ||
| - - meta: | ||
| type: map | ||
| description: Groovy Map containing sample information | ||
| - "*.nonrna*.fastq.gz": | ||
| type: file | ||
| description: rRNA depleted FastQ files | ||
| pattern: "*.nonrna*.fastq.gz" | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_1930 # fastq format | ||
| - edam: http://edamontology.org/format_3989 # GZIP format | ||
| log: | ||
| - - meta: | ||
| type: map | ||
| description: Groovy Map containing sample information | ||
| - "*.log": | ||
| type: file | ||
| description: Log file from RiboDetector | ||
| pattern: "*.log" | ||
| ontologies: [] | ||
| versions: | ||
| - versions.yml: | ||
| type: file | ||
| description: File containing software versions | ||
| pattern: versions.yml | ||
| ontologies: | ||
| - edam: http://edamontology.org/format_3750 # YAML | ||
| authors: | ||
| - "@maxibor" | ||
| maintainers: | ||
| - "@maxibor" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,67 @@ | ||||||
| nextflow_process { | ||||||
|  | ||||||
| name "Test Process RIBODETECTOR" | ||||||
| script "../main.nf" | ||||||
| process "RIBODETECTOR" | ||||||
|  | ||||||
| tag "modules" | ||||||
| tag "modules_nfcore" | ||||||
| tag "ribodetector" | ||||||
|  | ||||||
| test("ribodetector - rnaseq PE input") { | ||||||
| when { | ||||||
| process { | ||||||
| """ | ||||||
| input[0] = [ | ||||||
| [ id:'test', single_end:false ], // meta map | ||||||
| [ | ||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), | ||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) | ||||||
| ] | ||||||
| ] | ||||||
| input[1] = 150 | ||||||
| """ | ||||||
| } | ||||||
| } | ||||||
|  | ||||||
| then { | ||||||
| assertAll( | ||||||
| { assert process.success }, | ||||||
| { assert process.out.fastq }, | ||||||
| { assert process.out.log }, | ||||||
| { assert path(process.out.log[0][1]).getText().contains("Writing output non-rRNA sequences") }, | ||||||
| { assert snapshot(process.out.versions).match("versions") } | ||||||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 
        Suggested change
       
 | ||||||
| ) | ||||||
| } | ||||||
|  | ||||||
| } | ||||||
|  | ||||||
| test("ribodetector - stub rnaseq PE input") { | ||||||
|  | ||||||
| options "-stub" | ||||||
|  | ||||||
| when { | ||||||
| process { | ||||||
| """ | ||||||
| input[0] = [ | ||||||
| [ id:'test', single_end:false ], // meta map | ||||||
| [ | ||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz', checkIfExists: true), | ||||||
| file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz', checkIfExists: true) | ||||||
| ] | ||||||
| ] | ||||||
| input[1] = 150 | ||||||
| """ | ||||||
| } | ||||||
| } | ||||||
|  | ||||||
| then { | ||||||
| assertAll( | ||||||
| { assert process.success }, | ||||||
| { assert snapshot(process.out).match() } | ||||||
| ) | ||||||
| } | ||||||
|  | ||||||
| } | ||||||
|  | ||||||
| } | ||||||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| { | ||
| "versions": { | ||
| "content": [ | ||
| [ | ||
| "versions.yml:md5,f98df8f0eaa704e4db74785adc9cc791" | ||
| ] | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.3", | ||
| "nextflow": "25.10.0" | ||
| }, | ||
| "timestamp": "2025-10-27T10:12:20.183608" | ||
| }, | ||
| "ribodetector - stub rnaseq PE input": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| [ | ||
| "test.nonrna.1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
| "test.nonrna.2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
| ] | ||
| ] | ||
| ], | ||
| "1": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "2": [ | ||
| "versions.yml:md5,f98df8f0eaa704e4db74785adc9cc791" | ||
| ], | ||
| "fastq": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| [ | ||
| "test.nonrna.1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
| "test.nonrna.2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
| ] | ||
| ] | ||
| ], | ||
| "log": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions": [ | ||
| "versions.yml:md5,f98df8f0eaa704e4db74785adc9cc791" | ||
| ] | ||
| } | ||
| ], | ||
| "meta": { | ||
| "nf-test": "0.9.3", | ||
| "nextflow": "25.10.0" | ||
| }, | ||
| "timestamp": "2025-10-27T10:12:59.627863" | ||
| } | ||
| } | 
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.