diff --git a/src/chipster.nf b/src/chipster.nf index 6a4831f89382ea814310b5f2f0dcc2f6ad152f52..c81216d6fb8fdc79dae6f92a0e3365bb0f940786 100755 --- a/src/chipster.nf +++ b/src/chipster.nf @@ -31,8 +31,8 @@ params.genome = "data/tinyTestDataset/reference.fasta" @type: File */ -/* params.idxgenome = "data/tinyTestDataset/*.fasta.fai*" */ -/* already indexed reference genome +// params.idx = "" +/* already indexed reference genome ? enter path... @Type: String */ @@ -40,17 +40,16 @@ params.genome = "data/tinyTestDataset/reference.fasta" /* Parametres ctrl names & IP names utiliser l'oppérateur .join ou .filter -/* Params project folder +/* Params project Name */ params.project = "" -*/ /* Params out */ -params.fastp_out = 'fastp/' -params.index_fasta_out = "Indexed_genome/" -params.sort_bam_out = "Bam_filtered_sorted/" -params.index_bam_out = "Bam_filt_sort_indexed/" -params.bam_to_bigwig_out = "BigWig/" -params.peak_calling_bg_out = "Peak_calling/" +params.fastp_out = "$params.project/fastp/" +params.index_fasta_out = "$params.project/Indexed_genome/" +params.sort_bam_out = "$params.project/Bam_filtered_sorted/" +params.index_bam_out = "$params.project/Bam_filt_sort_indexed/" +params.bam_to_bigwig_out = "$params.project/BigWig/" +params.peak_calling_bg_out = "$params.project/Peak_calling/" /* **************************************************************** @@ -86,6 +85,16 @@ if (params.paired_end) { .set{ fastq_files } } +/* +if (params.idx != "") { + Channel + .fromPath( params.idx ) + .ifEmpty { error "Cannot find idexed genome reference files matching: ${params.idx}" } + .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], [it] ]} + .set { index_fasta.out } +} +*/ + Channel .fromPath( params.genome ) .ifEmpty { error "Cannot find any files matching: ${params.genome}" } @@ -115,9 +124,9 @@ Channel fastqc_mod = "./nf_modules/fastqc/main.nf" include { fastp_default } from "./nf_modules/fastp/main.nf" -include { fastqc_fastq as fastqc_raw } from fastqc_mod addParams(fastqc_fastq_out: '01_fastqc_raw/') -include { fastqc_fastq as fastqc_preprocessed } from fastqc_mod addParams(fastqc_fastq_out: '02_fastqc_preprocessed/') -include { multiqc } from './nf_modules/multiqc/main.nf' addParams(multiqc_out: "QC/") +include { fastqc_fastq as fastqc_raw } from fastqc_mod addParams(fastqc_fastq_out: "$params.project/01_fastqc_raw/") +include { fastqc_fastq as fastqc_preprocessed } from fastqc_mod addParams(fastqc_fastq_out: "$params.project/02_fastqc_preprocessed/") +include { multiqc } from './nf_modules/multiqc/main.nf' addParams(multiqc_out: "$params.project/QC/") include { index_fasta } from "./nf_modules/bowtie2/main.nf" include { mapping_fastq } from "./nf_modules/bowtie2/main.nf" include { filter_bam_quality } from "./nf_modules/samtools/main.nf"