modules icon indicating copy to clipboard operation
modules copied to clipboard

new module: trimmomatic

Open alyssa-ab opened this issue 3 years ago • 4 comments

Is there an existing module for this?

  • [X] I have searched for the existing module

Is there an open PR for this?

  • [X] I have searched for existing PRs

Is there an open issue for this?

  • [X] I have searched for existing issues

Are you going to work on this?

  • [x] If I'm planning to work on this module, I added myself to the Assignees to facilitate tracking who is working on the module

alyssa-ab avatar Jun 01 '22 16:06 alyssa-ab

Creating module for trimmomatic Using cutadapt as a reference module for a similar process.

alyssa-ab avatar Jun 07 '22 14:06 alyssa-ab

Test fails [Command exit status: 1]

.command.err output

           Usage:                                                                                    
                  PE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog                   
         <trimLogFile>] [-summary <statsSummaryFile>] [-quiet] [-validatePairs]                      
         [-basein <inputBase> | <inputFile1> <inputFile2>] [-baseout <outputBase> |                  
         <outputFile1P> <outputFile1U> <outputFile2P> <outputFile2U>] <trimmer1>...                  
              or:                                                                                    
                  SE [-version] [-threads <threads>] [-phred33|-phred64] [-trimlog                   
         <trimLogFile>] [-summary <statsSummaryFile>] [-quiet] <inputFile>                           
         <outputFile> <trimmer1>...                                                                  
              or:                                                                                    
                  -version                       

.command.sh

trimmomatic \
    --cores 2 \
     \
    -o test.trim.fastq.gz \
    test_1.fastq.gz \
    > test.trimmomatic.log
cat <<-END_VERSIONS > versions.yml
"test_trimmomatic_single_end:TRIMMOMATIC":
    trimmomatic: $(trimmomatic --version)
END_VERSIONS```

alyssa-ab avatar Jun 07 '22 14:06 alyssa-ab

Ah, the issue is that trimmomatic handles the PE and SE differently than cutadapt:

def trimmed  = meta.single_end ? "SE ${prefix}.trim.fastq.gz" : "PE ${prefix}_1.trim.fastq.gz ${prefix}_2.trim.fastq.gz"

Or actually

def trimmed  = meta.single_end ? "SE ${reads}" : "PE ${reads}"

might work.

edmundmiller avatar Jun 07 '22 19:06 edmundmiller