Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Re-add trimgalore into monorepo
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'trimgalore-origin/master'
  • Loading branch information
KrisDavie committed Dec 7, 2020
2 parents 6034928 + 8496dbf commit 58137ba
Show file tree
Hide file tree
Showing 12 changed files with 819 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/trimgalore/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
notebooks/* linguist-vendored
28 changes: 28 additions & 0 deletions src/trimgalore/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
*checkpoint.ipynb
*checkpoint*
*checkpoint.py
*.test.ipynb
*.csv
*.loom
*.pickle
*.pyc
*.html
*egg*
.vscode
.nextflow
.nextflow*
data
refdata
work
out/notebooks
src/scenic/out
src/scenic/notebooks
src/scenic/data
refdata
data/10x/tiny
work/
out/
tests/
debug/
*.swp
*.swo
35 changes: 35 additions & 0 deletions src/trimgalore/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM python:3.7-slim

ENV DEBIAN_FRONTEND=noninteractive
RUN BUILDPKGS="build-essential zlib1g-dev git curl" && \
apt-get update && \
apt-get install -y --no-install-recommends apt-utils debconf locales && dpkg-reconfigure locales && \
apt-get install -y --no-install-recommends $BUILDPKGS

RUN pip install -U pip

##################################################
# cutadapt
RUN pip install cutadapt

##################################################
# fastQC
# RUN wget https://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.9.zip

##################################################
# trim galore
RUN curl -fsSL https://github.com/FelixKrueger/TrimGalore/archive/0.6.6.tar.gz -o trim_galore.tar.gz && \
tar xvzf trim_galore.tar.gz && \
mv TrimGalore-0.6.6/trim_galore /usr/bin/ && \
rm -r TrimGalore-0.6.6


RUN apt-get -y update && \
apt-get -y --no-install-recommends install \
# Need to run ps
procps \
pigz \
less && \
rm -rf /var/cache/apt/* && \
rm -rf /var/lib/apt/lists/*

674 changes: 674 additions & 0 deletions src/trimgalore/LICENSE

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/trimgalore/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

Trim Galore module
==================

This repository contains an implementation of Trim Galore for VIB-SingleCell-NF (VSN) pipelines.
See `here <https://www.bioinformatics.babraham.ac.uk/projects/trim_galore/>`_ for the original source.

Empty file added src/trimgalore/bin/.gitkeep
Empty file.
Empty file added src/trimgalore/conf/.gitkeep
Empty file.
26 changes: 26 additions & 0 deletions src/trimgalore/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
nextflow.preview.dsl=2

//////////////////////////////////////////////////////
// Import sub-workflows from the modules:

include SC__FILE_CONVERTER from '../utils/processes/utils.nf' params(params)

include SC__TEMPLATE__PROCESS1 from './processes/process1.nf' params(params)


//////////////////////////////////////////////////////
// Define the workflow

workflow template {

take:
data

main:
data = SC__FILE_CONVERTER(data)
data.view()

SC__TEMPLATE__PROCESS1(data)

}

Empty file.
37 changes: 37 additions & 0 deletions src/trimgalore/processes/trim.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
nextflow.preview.dsl=2

// binDir = !params.containsKey("test") ? "${workflow.projectDir}/src/template/bin/" : ""

toolParams = params.tools.trimgalore

process SC__TRIMGALORE__TRIM {

container toolParams.container
label 'compute_resources__cpu','compute_resources__24hqueue'

input:
tuple val(sampleId),
path(fastq_PE1),
path(fastq_PE2)

output:
tuple val(sampleId),
path("${sampleId}_dex_R1_val_1.fq.gz"),
path("${sampleId}_dex_R2_val_2.fq.gz"),
path("${sampleId}_dex_R1.fastq.gz_trimming_report.txt"),
path("${sampleId}_dex_R2.fastq.gz_trimming_report.txt")

script:
def sampleParams = params.parseConfig(sampleId, params.global, toolParams.trim)
processParams = sampleParams.local
"""
trim_galore \
-j ${task.cpus} \
-o . \
${fastq_PE1} \
${fastq_PE2} \
--paired \
--gzip
"""
}

11 changes: 11 additions & 0 deletions src/trimgalore/trimgalore.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
params {
tools {
trimgalore {
container = 'vibsinglecellnf/trimgalore:0.6.6'
trim {
paired = 'true'
}
}
}
}

Empty file.

0 comments on commit 58137ba

Please sign in to comment.