Commit 489bfc1f authored by Sebastien Carrere's avatar Sebastien Carrere
Browse files

Merge branch 'main' of...

Merge branch 'main' of https://forgemia.inra.fr/inter_cati_omics/hackathon_octobre2021/atelier_repro into main
parents 21eaae1c dddddd03
Pipeline #42409 passed with stage
in 1 minute and 11 seconds
/_book/
/node_modules/
/book.pdf
/book.mobi
/book.epub
\ No newline at end of file
# requiring the environment of NodeJS 10
image: node:10
# add 'node_modules' to cache for speeding up builds
cache:
paths:
- node_modules/ # Node modules and dependencies
before_script:
- npm install gitbook-cli -g # install gitbook
- gitbook fetch 3.2.3 # fetch final stable version
- gitbook install # add any requested plugins in book.json
test:
stage: test
script:
- gitbook build . public # build to public path
only:
- branches # this job will affect every branch except 'main'
except:
- main
# the 'pages' job will deploy and build your site to the 'public' path
pages:
stage: deploy
script:
- gitbook build . public # build to public path
artifacts:
paths:
- public
expire_in: 1 week
only:
- main # this job will affect only the 'master' branch
Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true).into {chanFastq1 ; chanFastq2}
chanFastq1.view()
chanFastq2.view()
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
chanFastq.view()
chanFastq.view()
nextflow.enable.dsl=2
chanPath = Channel.fromPath('./rawdata/dev/control/SRR*_{1,2}.fastq.gz')
chanPath.view()
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
num = [0, 1, 2]
process gunzip {
publishDir('result')
tag("${id} ${num}")
input:
tuple val(id), path(reads)
each num
output:
path('*.fastq', emit: outfile)
script:
println("groovy: " + id + " num: " + num)
"""
#!/usr/bin/env bash
gzip -kcd $reads[0] > ${id}.R1.${readNum}.fastq
touch myfile
"""
}
workflow {
gunzip(chanFastq, num)
gunzip.out.outfile.view()
}
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
chanNum = Channel.of(0, 1, 2)
process gunzip {
publishDir('result')
tag("${id} ${num}")
input:
tuple val(id), path(reads)
val(num)
output:
path('*.fastq', emit: outfile)
script:
println("groovy: " + id + " num: " + num)
readNum = num + 1
readFile = reads[num]
"""
#!/usr/bin/env bash
gzip -kcd $readFile > ${id}.R${readNum}.fastq
touch myfile
"""
}
workflow {
gunzip(chanFastq, chanNum)
gunzip.out.outfile.view()
}
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
process gunzip {
publishDir('result')
tag("${id}") // id correspond a la variable dans input
input:
tuple val(id), path(reads)
output:
path('*.fastq', emit: outfile)
script:
// ici du groovy
println("groovy: " + id)
"""
# ici ce qui me plait, par défaut du bash
#!/usr/bin/env bash
gzip -kcd ${reads[0]} > ${id}.R1.fastq
touch myfile
"""
}
workflow {
gunzip(chanFastq)
gunzip.out.outfile.view()
}
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
process gunzip {
publishDir('result')
tag("${id}") // id correspond a la variable dans input
input:
tuple val(id), path(reads)
output:
path('*.fastq')
script:
// ici du groovy
println("groovy: " + id)
"""
# ici ce qui me plait, par défaut du bash
#!/usr/bin/env bash
gzip -kcd ${reads[0]} > ${id}.R1.fastq
touch myfile
"""
}
process gzip {
publishDir('result')
tag("${id}")
input:
path(reads)
output:
path('*.fastq.gz')
script:
"""
#!/usr/bin/env bash
gzip -kc ${reads} > ${reads}.gz
"""
}
workflow {
gunzip(chanFastq) | gzip
}
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
process gunzip {
publishDir('result')
tag("${id}") // id correspond a la variable dans input
input:
tuple val(id), path(reads)
output:
path('*.fastq', emit: outfile)
when:
reads[0].endsWith("gz")
script:
// ici du groovy
println("groovy: " + id)
"""
# ici ce qui me plait, par défaut du bash
#!/usr/bin/env bash
gzip -kcd ${reads[0]} > ${id}.R1.fastq
touch myfile
"""
}
workflow {
gunzip(chanFastq)
gunzip.out.outfile.view()
}
nextflow.enable.dsl=2
include { gunzip;gzip } from './module/gzip/main'
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
workflow {
gunzip(chanFastq)
gzip(gunzip.out.outfile)
}
nextflow.enable.dsl=2
include { gunzip;gzip } from './module/gzip/main'
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
workflow gunzipw {
take:
reads
main:
gunzip(reads)
emit:
outfile = gunzip.out.outfile
}
workflow gzipw {
take:
reads
main:
gzip(reads)
}
workflow {
gunzipw(chanFastq)
gzipw(gunzipw.out.outfile)
}
nextflow.enable.dsl=2
include { gunzip } from './module/gzip/main.nf'
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
workflow {
gunzip(chanFastq)
}
nextflow.enable.dsl=2
process gunzip {
publishDir('result')
tag("${id}")
input:
tuple val(id), path(reads)
output:
path('*.fastq', emit: outfile)
script:
"""
#!/usr/bin/env bash
gzip -kcd ${reads[0]} > ${id}.R1.fastq
touch myfile
"""
}
process gzip {
publishDir('result')
tag("${id}")
input:
path(reads)
output:
path('*.fastq.gz')
script:
"""
#!/usr/bin/env bash
gzip -kc ${reads} > ${reads}.gz
"""
}
nextflow.enable.dsl=2
version = ['1.9','1.1']
process softwareVersions {
label "local"
publishDir "${params.outdir}/", mode: 'copy'
conda "bwa samtools=${samtoolsVersion}"
input:
each(samtoolsVersion)
output:
path("software_versions.*.txt")
script:
"""
echo "#Software versions" > software_versions.${samtoolsVersion}.txt
samtools --version | grep samtools >> software_versions.${samtoolsVersion}.txt
bwa 2>&1 | grep Version >> software_versions.${samtoolsVersion}.txt
"""
}
workflow {
softwareVersions(version)
}
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( params.reads, size: 2, checkIfExists: true)
modeList = ['multithread', 'local']
process index {
storeDir 'indices/bwa'
conda 'bwa'
input:
path(genome)
output:
path("$genome*", emit: indices)
script:
"""
bwa index $genome
"""
}
process mapping {
publishDir("${params.outdir}/01.mapping")
tag("${id}")
label "multithread"
conda 'bwa'
input:
tuple val(id), path(reads)
path(index)
path(genome)
output:
path('*.sam')
script:
"""
bwa mem -t ${task.cpus} ${genome} $reads > ${id}.mapping.sam
"""
}
workflow {
index(params.genome)
mapping(chanFastq, index.out.indices, params.genome)
}
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( params.reads, size: 2, checkIfExists: true) //change
process gunzip {
publishDir(params.outdir) //change
tag("${id}") // id correspond a la variable dans input
input:
tuple val(id), path(reads)
output:
path('*.fastq')
script:
// ici du groovy
println("groovy: " + id)
"""
# ici ce qui me plait, par défaut du bash
#!/usr/bin/env bash
gzip -kcd ${reads[0]} > ${id}.R1.fastq
touch myfile
"""
}
process gzip {
publishDir("$params.outdir") // change
tag("${reads}")
input:
path(reads)
output:
path('*.fastq.gz')
script:
"""
#!/usr/bin/env bash
gzip -kc ${reads} > ${reads}.gz
"""
}
workflow {
gunzip(chanFastq) | gzip
}
/*
* -------------------------------------------------
* Nextflow SLURM/GENOLOGIN config file
* -------------------------------------------------
*/
singularity.autoMounts = true
process {
cpus = 1
memory = 12.GB
executor = 'slurm'
withLabel: multithread {
cpus = 16
memory = 64.GB
}
withLabel: local {
executor = 'local'
cpus = 1
memory = 2.GB
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment