Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • dev
  • master
  • v0.1.0
  • v0.1.2
  • v0.2.0
  • v0.2.1
  • v0.2.2
  • v0.2.3
  • v0.2.4
  • v0.2.5
  • v0.2.6
  • v0.2.7
  • v0.2.8
  • v0.2.9
  • v0.3.0
  • v0.4.0
  • v2.0.0
17 results

Target

Select target project
  • LBMC/regards/nextflow
  • elabaron/nextflow
  • lanani/nextflow
  • mlepetit/nextflow
  • mdjaffar/nextflow
  • LBMC/RMI2/rmi2_pipelines
  • lpicard/nextflow
  • rseraphi/nextflow
  • hregue/nextflow
  • letien02/nextflow
  • mshamjal/nextflow
  • z483801/nextflow
  • fduveau/nextflow
  • cginevra/nextflow
  • dtorresc/nextflow
  • fmortreu/nextflow
  • jshapiro/nextflow
  • carpin/nextflow
  • LBMC/Delattre/JU28_59vs17_SNP
  • jclaud01/nextflow
  • dchalopi/nextflow
  • mvilcot/nextflow
  • mherbett/nextflow
  • lestrada/nextflow
  • nfontrod/nextflow
  • gbenoit/nextflow
  • gyvert/nextflow
  • aguill09/nextflow
  • alapendr/nextflow
  • jprobin/nextflow
  • vvanoost/nextflow
  • jblin/nextflow
  • mparis/nextflow
  • ogandril/nextflow
  • cbourgeo/nextflow
  • ggirau03/nextflow
  • ecombe01/nextflow
  • acorbin/nextflow
  • pberna01/nextflow
  • pmarie01/nextflow
  • rhoury/nextflow
  • lgely/nextflow
  • jvalat/nextflow
  • cfournea/nextflow
  • mprieux/nextflow
  • hpolvech/nextflow
  • LBMC/nextflow
  • mcariou/nextflow
  • z483800/nextflow
  • yjia01/nextflow
  • jkleine/nextflow
  • LBMC/Palladino/RNAseq_nextflow
  • jseimand/nextflow
  • nlecouvr/nextflow-nathan
54 results
Select Git revision
  • dev
  • master
  • v0.1.0
  • v0.1.2
  • v0.2.0
  • v0.2.1
  • v0.2.2
  • v0.2.3
  • v0.2.4
  • v0.2.5
  • v0.2.6
  • v0.2.7
  • v0.2.8
  • v0.2.9
  • v0.3.0
  • v0.4.0
16 results
Show changes
Showing
with 474 additions and 361 deletions
#!/bin/sh
docker build src/docker_modules/cutadapt/1.14 -t 'cutadapt:1.14'
#!/bin/sh
docker build src/docker_modules/deepTools/3.0.2 -t 'deeptools:3.0.2'
#!/bin/sh
docker build src/docker_modules/file_handle/0.1.1 -t 'file_handle:0.1.1'
#!/bin/sh
docker build src/docker_modules/pigz/2.4 -t 'pigz:2.4'
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
nextflow.enable.dsl=2
include {
fastp
} from './nf_modules/fastp/main'
workflow csv_parsing {
if (params.csv_path.size() > 0) {
log.info "loading local csv files"
Channel
.fromPath(params.csv_path, checkIfExists: true)
.ifEmpty { error
log.error """
=============================================================
WARNING! No csv input file precised.
Use '--csv_path <file.csv>'
Or '--help' for more informations
=============================================================
"""
}
.splitCsv(header: true, sep: ";", strip: true)
.flatMap{
it -> [
[(it.IP + it.WCE).md5(), "IP", "w", file(it.IP)],
[(it.IP + it.WCE).md5(), "WCE", "w", file(it.WCE)]
]
}
.map{ it ->
if (it[1] instanceof List){
it
} else {
[it[0], [it[1]], it[2], it[3], [it[4]]]
}
}
.map{
it ->
if (it[1].size() == 2){ // if data are paired_end
[
"index": it[0],
"group": ref_order(it),
"ip": it[2],
"type": it[3],
"id": read_order(it)[0],
"file": read_order(it)
]
} else {
[
"index": it[0],
"group": it[1].simpleName,
"ip": it[2],
"type": it[3],
"id": it[4].simpleName,
"file": [it[4].simpleName, it[4]]
]
}
}
.set{input_csv}
} else {
log.info "loading remotes SRA csv files"
Channel
.fromPath(params.csv_sra, checkIfExists: true)
.ifEmpty { error
log.error """
=============================================================
WARNING! No csv input file precised.
Use '--csv_path <file.csv>' or
Use '--csv_SRA <file.csv>'
Or '--help' for more informations
=============================================================
"""
}
.splitCsv(header: true, sep: ";", strip: true)
.flatMap{
it -> [
[[it.IP_w + it.WCE_w + it.IP_m + it.WCE_m], t.IP_w, "IP", "w", it.IP_w],
[[it.IP_w + it.WCE_w + it.IP_m + it.WCE_m], it.IP_w, "WCE", "w", it.WCE_w],
[[it.IP_w + it.WCE_w + it.IP_m + it.WCE_m], it.IP_w, "IP", "m", it.IP_m],
[[it.IP_w + it.WCE_w + it.IP_m + it.WCE_m], it.IP_w, "WCE", "m", it.WCE_m]
]
}
.map{
it ->
if (it[1].size() == 2){ // if data are paired_end
[
"index": (
it[0][0][0].simpleName +
it[0][0][1].simpleName +
it[0][0][2].simpleName +
it[0][0][3].simpleName
).md5(),
"group": it[1][0].simpleName,
"ip": it[2],
"type": it[3],
"id": it[4][0].simpleName[0..-4],
"file": [it[4][0].simpleName[0..-4], it[4]]
]
} else {
[
"index": (
it[0][0].simpleName +
it[0][1].simpleName +
it[0][2].simpleName +
it[0][3].simpleName
).md5(),
"group": it[1].simpleName,
"ip": it[2],
"type": it[3],
"id": it[4].simpleName,
"file": [it[4].simpleName, it[4]]
]
}
}
.set{input_csv}
}
emit:
input_csv
}
workflow {
}
\ No newline at end of file
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
nextflow.enable.dsl=2
/*
Testing pipeline for marseq scRNASeq analysis
*/
include { adaptor_removal} from "./nf_modules/cutadapt/main.nf"
include {
index_fasta;
count;
index_fasta_velocity;
count_velocity
} from "./nf_modules/kb/main.nf" addParams(
kb_protocol: "marsseq",
count_out: "quantification/",
count_velocity_out: "quantification_velocity/"
)
params.fasta = "http://ftp.ensembl.org/pub/release-98/fasta/gallus_gallus/dna/Gallus_gallus.GRCg6a.dna.toplevel.fa.gz"
params.fastq = "data/CF42_45/*/*R{1,2}.fastq.gz"
params.gtf = "http://ftp.ensembl.org/pub/release-98/gtf/gallus_gallus/Gallus_gallus.GRCg6a.98.gtf.gz"
params.transcript_to_gene = ""
params.whitelist = "data/expected_whitelist.txt"
params.config = "data/marseq_flexi_splitter.yaml"
params.workflow_type = "classic"
log.info "fastq files (--fastq): ${params.fastq}"
log.info "fasta file (--fasta): ${params.fasta}"
log.info "gtf file (--gtf): ${params.gtf}"
log.info "transcript_to_gene file (--transcript_to_gene): ${params.transcript_to_gene}"
log.info "whitelist file (--whitelist): ${params.whitelist}"
log.info "config file (--config): ${params.config}"
channel
.fromFilePairs( params.fastq, size: -1)
.set { fastq_files }
channel
.fromPath( params.fasta )
.ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" }
.map { it -> [it.simpleName, it]}
.set { fasta_files }
channel
.fromPath( params.gtf )
.ifEmpty { error "Cannot find any gtf files matching: ${params.gtf}" }
.map { it -> [it.simpleName, it]}
.set { gtf_files }
if (params.whitelist == "") {
channel.empty()
.set { whitelist_files }
} else {
channel
.fromPath( params.whitelist )
.map { it -> [it.simpleName, it]}
.set { whitelist_files }
}
channel
.fromPath( params.config )
.ifEmpty { error "Cannot find any config files matching: ${params.config}" }
.map { it -> [it.simpleName, it]}
.set { config_files }
workflow {
adaptor_removal(fastq_files)
if (params.workflow_type == "classic") {
index_fasta(
fasta_files,
gtf_files
)
count(
index_fasta.out.index,
adaptor_removal.out.fastq,
index_fasta.out.t2g, whitelist_files,config_files
)
} else {
index_fasta_velocity(
fasta_files,
gtf_files
)
count_velocity(
index_fasta_velocity.out.index,
adaptor_removal.out.fastq,
index_fasta_velocity.out.t2g,
whitelist_files,
config_files
)
}
}
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
nextflow.enable.dsl=2
/*
Testing pipeline for marseq scRNASeq analysis
*/
include {
mapping;
} from "./nf_modules/bwa/main.nf"
include {
sort_bam;
} from "./nf_modules/samtools/main.nf"
include {
germline_cohort_data_variant_calling;
} from "./nf_modules/gatk4/main.nf" addParams(
variant_calling_out: "vcf/",
)
params.fastq = ""
params.fasta = ""
channel
.fromFilePairs( params.fastq, size: -1)
.set { fastq_files }
channel
.fromPath( params.fasta )
.map { it -> [it.simpleName, it]}
.set { fasta_files }
workflow {
mapping(fasta_files, fastq_files)
sort_bam(mapping.out.bam)
germline_cohort_data_variant_calling(sort_bam.out.bam, fasta_files)
}
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
Channel
.fromPath( "data/tiny_dataset/fasta/*.fasta" )
.set { fasta_file }
process sample_fasta {
publishDir "results/sampling/", mode: 'copy'
input:
file fasta from fasta_file
output:
file "*_sample.fasta" into fasta_sample
script:
"""
head ${fasta} > ${fasta.baseName}_sample.fasta
"""
}
#!/bin/sh
# SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
#SBATCH --job-name=nextflow
#SBATCH --ntasks=1
#SBATCH --output=results/nextflow_%j.log
#SBATCH --licenses=sps
####################################
# change to your path
SCRATCH=/sps/lbmc/lmodolo/nextflow
${SCRATCH}/nextflow run ${SCRATCH}/src/solution_RNASeq.nf -profile ccin2p3 \
--fastq "${SCRATCH}/data/tiny_dataset/fastq/*_R{1,2}.fastq" \
--fasta "${SCRATCH}/data/tiny_dataset/fasta/tiny_v2.fasta" \
--bed "${SCRATCH}/data/tiny_dataset/annot/tiny.bed" \
-ansi-log \
-w "${SCRATCH}/work/"
wait
#!/bin/sh
# SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
java -version
curl -s https://get.nextflow.io | bash
// SPDX-FileCopyrightText: 2022 Laurent Modolo <laurent.modolo@ens-lyon.fr>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
nextflowVersion = '>=20'
manifest {
homePage = 'https://gitbio.ens-lyon.fr/LBMC/nextflow'
description = 'pipeline to '
mainScript = 'main.nf'
version = '0.0.0'
}
report {
enabled = true
file = "$baseDir/../results/report.html"
}
profiles {
docker {
docker.temp = "auto"
docker.enabled = true
process {
errorStrategy = 'finish'
memory = '16GB'
withLabel: big_mem_mono_cpus {
cpus = 1
}
withLabel: big_mem_multi_cpus {
cpus = 4
}
withLabel: small_mem_mono_cpus {
cpus = 1
memory = '2GB'
}
withLabel: small_mem_multi_cpus {
cpus = 4
memory = '2GB'
}
}
}
podman {
charliecloud.enabled = true
charliecloud.cacheDir = "./bin/"
process {
errorStrategy = 'finish'
memory = '16GB'
withLabel: big_mem_mono_cpus {
cpus = 1
}
withLabel: big_mem_multi_cpus {
cpus = 4
}
withLabel: small_mem_mono_cpus {
cpus = 1
memory = '2GB'
}
withLabel: small_mem_multi_cpus {
cpus = 4
memory = '2GB'
}
}
}
singularity {
singularity.enabled = true
singularity.cacheDir = "./bin/"
process {
errorStrategy = 'finish'
memory = '16GB'
withLabel: big_mem_mono_cpus {
cpus = 1
}
withLabel: big_mem_multi_cpus {
cpus = 4
}
withLabel: small_mem_mono_cpus {
cpus = 1
memory = '2GB'
}
withLabel: small_mem_multi_cpus {
cpus = 4
memory = '2GB'
}
}
}
psmn {
charliecloud.enabled = true
charliecloud.cacheDir = "/Xnfs/abc/charliecloud"
charliecloud.runOptions = "--bind /scratch:/scratch --bind /Xnfs:/Xnfs --bind /home:/home"
charliecloud.readOnlyInputs = true
process{
errorStrategy = { sleep(Math.pow(2, task.attempt) * 200 as long); return 'retry' }
maxRetries = 3
executor = "slurm"
queue = "Lake"
withLabel: big_mem_mono_cpus {
cpus = 1
memory = "128GB"
time = "24h"
}
withLabel: big_mem_multi_cpus {
cpus = 32
memory = "192GB"
time = "24h"
}
withLabel: small_mem_mono_cpus {
cpus = 1
memory = "16GB"
time = "24h"
}
withLabel: small_mem_multi_cpus {
cpus = 32
memory = "16GB"
time = "24h"
}
}
}
ccin2p3 {
singularity.enabled = true
singularity.cacheDir = "$baseDir/../bin/"
singularity.runOptions = "--bind /pbs,/sps,/scratch,/tmp"
process{
maxRetries = 3
withLabel: big_mem_mono_cpus {
scratch = true
stageInMode = "copy"
stageOutMode = "rsync"
executor = "slurm"
clusterOptions = "--licenses=sps"
cpus = 1
memory = "8GB"
queue = "htc"
}
withLabel: big_mem_multi_cpus {
scratch = true
stageInMode = "copy"
stageOutMode = "rsync"
executor = "slurm"
clusterOptions = "--licenses=sps"
cpus = 1
memory = "8GB"
queue = "htc"
}
withLabel: small_mem_mono_cpus {
scratch = true
stageInMode = "copy"
stageOutMode = "rsync"
executor = "slurm"
clusterOptions = "--licenses=sps"
cpus = 1
memory = "8GB"
queue = "htc"
}
withLabel: small_mem_multi_cpus {
scratch = true
stageInMode = "copy"
stageOutMode = "rsync"
executor = "slurm"
clusterOptions = "--licenses=sps"
cpus = 1
memory = "8GB"
queue = "htc"
}
}
}
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$fasta_from_bed {
container = "bedtools:2.25.0"
}
}
}
sge {
process{
$fasta_from_bed {
beforeScript = "module purge; module load BEDtools/2.25.0"
}
}
}
}
/*
* bedtools :
* Imputs : fastq files
* Output : fastq files
*/
/* fasta extraction */
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
"""
}
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
"""
}
nextflow src/nf_modules/BEDtools/tests/fasta_from_bed.nf \
-c src/nf_modules/BEDtools/bedtools.config \
-profile docker \
--fasta "data/tiny_dataset/fasta/tiny_v2.fasta" \
--bed "data/tiny_dataset/annot/tiny.bed" \
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$index_fasta {
container = "bowtie2:2.3.4.1"
}
$mapping_fastq {
container = "bowtie2:2.3.4.1"
}
}
}
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"
}
}
}
}
/*
* 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
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.toList()
output:
file "*.bam" into bam_files
script:
"""
bowtie2 --very-sensitive -p ${task.cpus} -x ${index[0].baseName} \
-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}" }
.set { fastq_files }
Channel
.fromPath( params.index )
.ifEmpty { error "Cannot find any index files matching: ${params.index}" }
.set { index_files }
process mapping_fastq {
tag "$reads.baseName"
cpus 4
publishDir "results/mapping/bams/", mode: 'copy'
input:
file reads from fastq_files
file index from index_files.toList()
output:
file "*.bam" into bam_files
script:
"""
bowtie2 --very_sensitive -p ${task.cpus} -x ${index[0].baseName} \
-U ${reads} 2> \
${reads.baseName}_bowtie2_report.txt | \
samtools view -Sb - > ${reads.baseName}.bam
if grep -q "Error" ${fasta.baseName}_bowtie2_report.txt; then
exit 1
fi
"""
}
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
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
"""
}
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.toList()
output:
file "*.bam" into bam_files
script:
"""
bowtie2 --very-sensitive -p ${task.cpus} -x ${index[0].baseName} \
-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
"""
}
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}" }
.set { fastq_files }
Channel
.fromPath( params.index )
.ifEmpty { error "Cannot find any index files matching: ${params.index}" }
.set { index_files }
process mapping_fastq {
tag "$reads.baseName"
cpus 4
publishDir "results/mapping/bams/", mode: 'copy'
input:
file reads from fastq_files
file index from index_files.toList()
output:
file "*.bam" into bam_files
script:
"""
bowtie2 --very_sensitive -p ${task.cpus} -x ${index[0].baseName} \
-U ${reads} 2> \
${reads.baseName}_bowtie2_report.txt | \
samtools view -Sb - > ${reads.baseName}.bam
if grep -q "Error" ${reads.baseName}_bowtie2_report.txt; then
exit 1
fi
"""
}