diff --git a/astrocyte_pkg.yml b/astrocyte_pkg.yml
index b812c4a85ff956e2f16af1d5b4ac1637cefbe1e3..c7ff94f607a1aadf0c894c1b149acca748952005 100644
--- a/astrocyte_pkg.yml
+++ b/astrocyte_pkg.yml
@@ -40,6 +40,8 @@ documentation_files:
 # A list of cluster environment modules that this workflow requires to run.
 # Specify versioned module names to ensure reproducability.
 workflow_modules:
+  - 'python/3.6.1-2-anaconda'
+  - 'trimgalore/0.4.1'
   - 'fastqc/0.11.5'
   - 'deeptools/2.3.5'
   - 'meme/4.11.1-gcc-openmpi'
@@ -114,7 +116,7 @@ vizapp_cran_packages:
   - shiny
   - shinyFiles
 
-# List of any Bioconductor packages, not provided by the modules, 
+# List of any Bioconductor packages, not provided by the modules,
 # that must be made available to the vizapp
 vizapp_bioc_packages:
   - qusage
diff --git a/workflow/main.nf b/workflow/main.nf
index 7648445a121d8fe2d9a800a725b24d17188bd3fb..6ee87c6c6c923739295ab73b0033f395d984d05a 100644
--- a/workflow/main.nf
+++ b/workflow/main.nf
@@ -62,7 +62,7 @@ rawReads = designFilePaths
 process trimReads {
 
   tag "$sampleId-$replicate"
-  publishDir "$baseDir/output/{task.process}/$sampleId-$replicate$/", mode: 'copy'
+  publishDir "$baseDir/output/{task.process}/$sampleId-$replicate/", mode: 'copy'
 
   input:
 
@@ -71,10 +71,19 @@ process trimReads {
   output:
 
   set sampleId, file('*.fq.gz'), biosample, factor, treatment, replicate, controlId into trimmedReads
+  file '*trimming_report.txt' into trimgalore_results
 
   script:
 
-  """
-  python $baseDir/scripts/trim_reads.py -f $reads
-  """
+  if (pairedEnd) {
+    """
+    python $baseDir/scripts/trim_reads.py -f $reads -p
+    """
+  }
+  else {
+    """
+    python $baseDir/scripts/check_design.py -f $reads
+    """
+  }
+
 }