Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LBMC
Delattre
belari_Y_FISH
Commits
139175cb
Verified
Commit
139175cb
authored
Aug 22, 2018
by
Laurent Modolo
Browse files
Merge branch 'dev'
parents
a4809608
7aaaa9ed
Changes
87
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
139175cb
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.0] - 2018-08-22
### Added
- This fine changelog
### Changed
- the structure of `src/nf_modules`: the `tests` folder was removed
### Removed
- nothings
src/docker_modules/HTSeq/0.8.0/Dockerfile
View file @
139175cb
...
...
@@ -14,4 +14,5 @@ RUN apt-get update && \
apt-get clean
RUN
pip3
install
numpy
==
1.14.3
RUN
pip3
install
pysam
==
0.15.0
RUN
pip3
install
HTSeq
==
${
HTSEQ_VERSION
}
src/docker_modules/RSEM/1.3.0/Dockerfile
View file @
139175cb
...
...
@@ -4,7 +4,7 @@ MAINTAINER Laurent Modolo
ENV
RSEM_VERSION=1.3.0
ENV
BOWTIE2_VERSION=2.3.4.1
ENV
SAMTOOLS_VERSION=1.7
ENV
PACKAGES git=1:2.17
.0
* \
ENV
PACKAGES git=1:2.17* \
build-essential=12.4* \
ca-certificates=20180409 \
zlib1g-dev=1:1.2.11* \
...
...
src/nf_modules/BEDtools/
bedtools
.config
→
src/nf_modules/BEDtools/
fasta_from_bed
.config
View file @
139175cb
File moved
src/nf_modules/BEDtools/
bedtools
.nf
→
src/nf_modules/BEDtools/
fasta_from_bed
.nf
View file @
139175cb
File moved
src/nf_modules/BEDtools/tests
/tests
.sh
→
src/nf_modules/BEDtools/tests.sh
View file @
139175cb
nextflow src/nf_modules/BEDtools/
tests/
fasta_from_bed.nf
\
-c
src/nf_modules/BEDtools/
bedtools
.config
\
nextflow src/nf_modules/BEDtools/fasta_from_bed.nf
\
-c
src/nf_modules/BEDtools/
fasta_from_bed
.config
\
-profile
docker
\
--fasta
"data/tiny_dataset/fasta/tiny_v2.fasta"
\
--bed
"data/tiny_dataset/annot/tiny.bed"
\
src/nf_modules/BEDtools/tests/fasta_from_bed.nf
deleted
100644 → 0
View file @
a4809608
params.fastq = "$baseDir/data/fasta/*.fasta"
params.bed = "$baseDir/data/annot/*.bed"
log.info "fasta file : ${params.fasta}"
log.info "bed file : ${params.bed}"
Channel
.fromPath( params.fasta )
.ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" }
.set { fasta_files }
Channel
.fromPath( params.bed )
.ifEmpty { error "Cannot find any bed files matching: ${params.bed}" }
.set { bed_files }
process fasta_from_bed {
tag "${bed.baseName}"
cpus 4
publishDir "results/fasta/", mode: 'copy'
input:
file fasta from fasta_files
file bed from bed_files
output:
file "*_extracted.fasta" into fasta_files_extracted
script:
"""
bedtools getfasta -name \
-fi ${fasta} -bed ${bed} -fo ${bed.baseName}_extracted.fasta
"""
}
src/nf_modules/Bowtie/bowtie.nf
deleted
100644 → 0
View file @
a4809608
/*
* Bowtie :
* Imputs : fastq files
* Imputs : fasta files
* Output : bam files
*/
/* fasta indexing */
params.fasta = "$baseDir/data/bam/*.fasta"
log.info "fasta files : ${params.fasta}"
Channel
.fromPath( params.fasta )
.ifEmpty { error "Cannot find any bam files matching: ${params.fasta}" }
.set { fasta_file }
process index_fasta {
tag "$fasta.baseName"
cpus 4
publishDir "results/mapping/index/", mode: 'copy'
input:
file fasta from fasta_file
output:
file "*.index*" into index_files
file "*_report.txt" into indexing_report
script:
"""
bowtie-build --threads ${task.cpus} -f ${fasta} ${fasta.baseName}.index &> ${fasta.baseName}_bowtie_report.txt
if grep -q "Error" ${fasta.baseName}_bowtie_report.txt; then
exit 1
fi
"""
}
/*
* for paired-end data
*/
params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq"
params.index = "$baseDir/data/index/*.index.*"
log.info "fastq files : ${params.fastq}"
log.info "index files : ${params.index}"
Channel
.fromFilePairs( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.set { fastq_files }
Channel
.fromPath( params.index )
.ifEmpty { error "Cannot find any index files matching: ${params.index}" }
.set { index_files }
process mapping_fastq {
tag "$pair_id"
cpus 4
publishDir "results/mapping/bams/", mode: 'copy'
input:
set pair_id, file(reads) from fastq_files
file index from index_files.collect()
output:
file "*.bam" into bam_files
file "*_report.txt" into mapping_report
script:
index_id = index[0]
for (index_file in index) {
if (index_file =~ /.*\.1\.ebwt/ && !(index_file =~ /.*\.rev\.1\.ebwt/)) {
index_id = ( index_file =~ /(.*)\.1\.ebwt/)[0][1]
}
}
"""
# -v specify the max number of missmatch, -k the number of match reported per
# reads
bowtie --best -v 3 -k 1 --sam -p ${task.cpus} ${index_id} \
-1 ${reads[0]} -2 ${reads[1]} 2> \
${pair_id}_bowtie_report.txt | \
samtools view -Sb - > ${pair_id}.bam
if grep -q "Error" ${pair_id}_bowtie_report.txt; then
exit 1
fi
"""
}
/*
* for single-end data
*/
params.mean = 200
params.sd = 100
log.info "fastq files : ${params.fastq}"
log.info "index files : ${params.index}"
log.info "mean read size: ${params.mean}"
log.info "sd read size: ${params.sd}"
Channel
.fromPath( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { fastq_files }
Channel
.fromPath( params.index )
.ifEmpty { error "Cannot find any index files matching: ${params.index}" }
.set { index_files }
process mapping_fastq {
tag "$file_id"
cpus 4
publishDir "results/mapping/quantification/", mode: 'copy'
input:
set file_id, file(reads) from fastq_files
file index from index_files.collect()
output:
file "*" into count_files
script:
"""
mkdir ${file_id}
kallisto quant -i ${index} -t ${task.cpus} --single \
--bias --bootstrap-samples 100 -o ${file_id} \
-l ${params.mean} -s ${params.sd} \
${reads} > ${file_id}_kallisto_report.txt
"""
}
src/nf_modules/Bowtie/indexing.config
0 → 100644
View file @
139175cb
profiles
{
docker
{
docker
.
temp
=
'auto'
docker
.
enabled
=
true
process
{
$
index_fasta
{
container
=
"bowtie:1.2.2"
}
}
}
sge
{
process
{
$
index_fasta
{
beforeScript
=
"module purge; module load Bowtie/1.2.2"
}
}
}
}
src/nf_modules/Bowtie/
tests/
index.nf
→
src/nf_modules/Bowtie/index
ing
.nf
View file @
139175cb
/* fasta indexing */
params.fasta = "$baseDir/data/bam/*.fasta"
log.info "fasta files : ${params.fasta}"
...
...
src/nf_modules/Bowtie/
bowtie
.config
→
src/nf_modules/Bowtie/
mapping_paired
.config
View file @
139175cb
...
...
@@ -3,9 +3,6 @@ profiles {
docker
.
temp
=
'auto'
docker
.
enabled
=
true
process
{
$
index_fasta
{
container
=
"bowtie:1.2.2"
}
$
mapping_fastq
{
container
=
"bowtie:1.2.2"
}
...
...
@@ -13,9 +10,6 @@ profiles {
}
sge
{
process
{
$
index_fasta
{
beforeScript
=
"module purge; module load Bowtie/1.2.2"
}
$
mapping_fastq
{
beforeScript
=
"module purge; module load SAMtools/1.7; module load Bowtie/1.2.2"
}
...
...
src/nf_modules/Bowtie/
tests/
mapping_paired.nf
→
src/nf_modules/Bowtie/mapping_paired.nf
View file @
139175cb
/*
* mapping paired fastq
*/
params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq"
params.index = "$baseDir/data/index/*.index.*"
...
...
src/nf_modules/Bowtie/mapping_single.config
0 → 100644
View file @
139175cb
profiles
{
docker
{
docker
.
temp
=
'auto'
docker
.
enabled
=
true
process
{
$
mapping_fastq
{
container
=
"bowtie:1.2.2"
}
}
}
sge
{
process
{
$
mapping_fastq
{
beforeScript
=
"module purge; module load SAMtools/1.7; module load Bowtie/1.2.2"
}
}
}
}
src/nf_modules/Bowtie/
tests/
mapping_single.nf
→
src/nf_modules/Bowtie/mapping_single.nf
View file @
139175cb
/*
* mapping single end fastq
*/
params.fastq = "$baseDir/data/fastq/*.fastq"
log.info "fastq files : ${params.fastq}"
...
...
src/nf_modules/Bowtie/tests
/tests
.sh
→
src/nf_modules/Bowtie/tests.sh
View file @
139175cb
./nextflow src/nf_modules/Bowtie/
tests/
index.nf
\
-c
src/nf_modules/Bowtie/
bowtie
.config
\
./nextflow src/nf_modules/Bowtie/index
ing
.nf
\
-c
src/nf_modules/Bowtie/
indexing
.config
\
-profile
docker
\
--fasta
"data/tiny_dataset/fasta/tiny_v2.fasta"
./nextflow src/nf_modules/Bowtie/
tests/
mapping_single.nf
\
-c
src/nf_modules/Bowtie/
bowti
e.config
\
./nextflow src/nf_modules/Bowtie/mapping_single.nf
\
-c
src/nf_modules/Bowtie/
mapping_singl
e.config
\
-profile
docker
\
--index
"results/mapping/index/*.ebwt"
\
--fastq
"data/tiny_dataset/fastq/tiny*_S.fastq"
./nextflow src/nf_modules/Bowtie/
tests/
mapping_paired.nf
\
-c
src/nf_modules/Bowtie/
bowtie
.config
\
./nextflow src/nf_modules/Bowtie/mapping_paired.nf
\
-c
src/nf_modules/Bowtie/
mapping_paired
.config
\
-profile
docker
\
--index
"results/mapping/index/*.ebwt"
\
--fastq
"data/tiny_dataset/fastq/tiny*_R{1,2}.fastq"
...
...
src/nf_modules/Bowtie2/bowtie2.nf
deleted
100644 → 0
View file @
a4809608
/*
* Bowtie2 :
* Imputs : fastq files
* Imputs : fasta files
* Output : bam files
*/
/* fasta indexing */
params.fasta = "$baseDir/data/bam/*.fasta"
log.info "fasta files : ${params.fasta}"
Channel
.fromPath( params.fasta )
.ifEmpty { error "Cannot find any bam files matching: ${params.fasta}" }
.set { fasta_file }
process index_fasta {
tag "$fasta.baseName"
cpus 4
publishDir "results/mapping/index/", mode: 'copy'
input:
file fasta from fasta_file
output:
file "*.index*" into index_files
file "*_report.txt" into indexing_report
script:
"""
bowtie2-build --threads ${task.cpus} ${fasta} ${fasta.baseName}.index &> ${fasta.baseName}_bowtie2_report.txt
if grep -q "Error" ${fasta.baseName}_bowtie2_report.txt; then
exit 1
fi
"""
}
/*
* for paired-end data
*/
params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq"
params.index = "$baseDir/data/index/*.index.*"
log.info "fastq files : ${params.fastq}"
log.info "index files : ${params.index}"
Channel
.fromFilePairs( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.set { fastq_files }
Channel
.fromPath( params.index )
.ifEmpty { error "Cannot find any index files matching: ${params.index}" }
.set { index_files }
process mapping_fastq {
tag "$pair_id"
cpus 4
publishDir "results/mapping/bams/", mode: 'copy'
input:
set pair_id, file(reads) from fastq_files
file index from index_files.collect()
output:
set pair_id, "*.bam" into bam_files
file "*_report.txt" into mapping_report
script:
index_id = index[0]
for (index_file in index) {
if (index_file =~ /.*\.1\.bt2/ && !(index_file =~ /.*\.rev\.1\.bt2/)) {
index_id = ( index_file =~ /(.*)\.1\.bt2/)[0][1]
}
}
"""
bowtie2 --very-sensitive -p ${task.cpus} -x ${index_id} \
-1 ${reads[0]} -2 ${reads[1]} 2> \
${pair_id}_bowtie2_report.txt | \
samtools view -Sb - > ${pair_id}.bam
if grep -q "Error" ${pair_id}_bowtie2_report.txt; then
exit 1
fi
"""
}
/*
* for single-end data
*/
params.fastq = "$baseDir/data/fastq/*.fastq"
log.info "fastq files : ${params.fastq}"
log.info "index files : ${params.index}"
Channel
.fromPath( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { fastq_files }
Channel
.fromPath( params.index )
.ifEmpty { error "Cannot find any index files matching: ${params.index}" }
.set { index_files }
process mapping_fastq {
tag "$file_id"
cpus 4
publishDir "results/mapping/bams/", mode: 'copy'
input:
set file_id, file(reads) from fastq_files
file index from index_files.collect()
output:
set file_id, "*.bam" into bam_files
file "*_report.txt" into mapping_report
script:
index_id = index[0]
for (index_file in index) {
if (index_file =~ /.*\.1\.bt2/ && !(index_file =~ /.*\.rev\.1\.bt2/)) {
index_id = ( index_file =~ /(.*)\.1\.bt2/)[0][1]
}
}
"""
bowtie2 --very-sensitive -p ${task.cpus} -x ${index_id} \
-U ${reads} 2> \
${file_id}_bowtie2_report.txt | \
samtools view -Sb - > ${file_id}.bam
if grep -q "Error" ${file_id}_bowtie2_report.txt; then
exit 1
fi
"""
}
src/nf_modules/Bowtie2/indexing.config
0 → 100644
View file @
139175cb
profiles
{
docker
{
docker
.
temp
=
'auto'
docker
.
enabled
=
true
process
{
$
index_fasta
{
container
=
"bowtie2:2.3.4.1"
}
}
}
sge
{
process
{
$
index_fasta
{
beforeScript
=
"module purge; module load Bowtie2/2.3.4.1"
}
}
}
}
src/nf_modules/Bowtie2/
tests/
index.nf
→
src/nf_modules/Bowtie2/index
ing
.nf
View file @
139175cb
File moved
src/nf_modules/Bowtie2/
bowtie2
.config
→
src/nf_modules/Bowtie2/
mapping_paired
.config
View file @
139175cb
...
...
@@ -3,9 +3,6 @@ profiles {
docker
.
temp
=
'auto'
docker
.
enabled
=
true
process
{
$
index_fasta
{
container
=
"bowtie2:2.3.4.1"
}
$
mapping_fastq
{
container
=
"bowtie2:2.3.4.1"
}
...
...
@@ -13,9 +10,6 @@ profiles {
}
sge
{
process
{
$
index_fasta
{
beforeScript
=
"module purge; module load Bowtie2/2.3.4.1"
}
$
mapping_fastq
{
beforeScript
=
"module purge; module load SAMtools/1.7; module load Bowtie2/2.3.4.1"
}
...
...
src/nf_modules/Bowtie2/
tests/
mapping_paired.nf
→
src/nf_modules/Bowtie2/mapping_paired.nf
View file @
139175cb
File moved
Prev
1
2
3
4
5
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment