diff --git a/src/chipster.nf b/src/chipster.nf
old mode 100644
new mode 100755
index 3516d2116f94fc1d225bfd5fa49f270f0928ba23..8da761d0e3e0a8b898a6f886f52f7ab2ed813960
--- a/src/chipster.nf
+++ b/src/chipster.nf
@@ -14,7 +14,7 @@ nextflow.enable.dsl=2
 */
 
 /*
-params.paired_end = true
+params.paired_end = false
 /* false for single end data, true for paired-end data
 
 @type: Boolean
@@ -26,18 +26,26 @@ params.fastq = "data/tinyTestDataset/fastq/*_{1,2}.fastq"
 @type: Files
 */
 
-params.genome = "data/tinyTestDataset/*.fasta"
+params.genome = "data/tinyTestDataset/reference.fasta"
 /* A genome file
 
 @type: File
 */
 
-params.idxgenome = "data/tinyTestDataset/*.fasta.fai*"
+/* params.idxgenome = "data/tinyTestDataset/*.fasta.fai*" */
 /* already indexed reference genome 
 
 @Type: String
 */
 
+/* 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/"
+
 /*
  ****************************************************************
                               Logs
@@ -46,7 +54,7 @@ params.idxgenome = "data/tinyTestDataset/*.fasta.fai*"
 
 log.info "fastq files : ${params.fastq}"
 log.info "genome file : ${params.genome}"
-log.info "indexed genome file : ${params.idxgenome}"
+/* log.info "indexed genome file : ${params.idxgenome}" */
 
 /*
 log.info "paired-end data: ${params.paired_end}"
@@ -60,23 +68,29 @@ log.info "output folder results/${params.folder}"
 */
 
 /* Raw reads fastq */
+/*
 Channel
-  .fromFilePairs( params.fastq )
+  .fromPath( params.fastq)
+  .map { it }
   .set { fastq_files }
-
-/* Reference Genome fasa file */
-/* Previous in .fromPath but raise an error : WARN: Input tuple does not 
-   match input set cardinality declared by process `index_fasta` 
-   -- offending value: /home/xavier/Scripts/Pipelines/ChIPster/data/tinyTestDataset/reference.fasta 
 */
 
+/* Raw paired-end reads fastq */
+Channel
+  .fromFilePairs( params.fastq, size: -1 )
+  .set { fastq_files }
+
 Channel
-  .fromFilePairs( params.genome, size: -1 )
+  .fromPath( params.genome )
+  .ifEmpty { error "Cannot find any files matching: ${params.genome}" }
+  .map{it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
   .set { genome_file } 
 
+/*
 Channel
   .fromFilePairs( params.idxgenome, size: -1 )
   .set { genome_idx }
+*/
 
 /*
  ****************************************************************
@@ -86,8 +100,8 @@ 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(out: '01_fastqc')
-include { fastqc_fastq as fastqc_preprocessed } from fastqc_mod addParams(out: '02_fastqc_preprocessed')
+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 { index_fasta } from "./nf_modules/bowtie2/main.nf"
 include { mapping_fastq } from "./nf_modules/bowtie2/main.nf"
@@ -95,7 +109,7 @@ include { filter_bam_quality } from "./nf_modules/samtools/main.nf"
 include { sort_bam } from "./nf_modules/samtools/main.nf"
 include { index_bam } from "./nf_modules/samtools/main.nf"
 include { bam_to_bigwig } from "./nf_modules/deeptools/main.nf"
-include { peak_calling } from "./nf_modules/macs3/main.nf"
+include { peak_calling_bg } from "./nf_modules/macs3/main.nf"
 
 /*
  ****************************************************************
@@ -117,10 +131,11 @@ workflow {
       fastqc_preprocessed.out.report
       ).collect()
   )
-
-  mapping_fastq(genome_idx.collect(), fastp_default.out.fastq)
-
-  // index reference genome & mapping preprocessed reads
+  // index reference genome
+  index_fasta(genome_file)
+  // mapping preprocessed reads
+  mapping_fastq(index_fasta.out.index.collect(), fastp_default.out.fastq)
+ 
   /*if (!params.idxgenome) {
     index_fasta(genome_file)
     mapping_fastq(index_fasta.out.index.collect(), fastp_default.out.fastq)
@@ -136,11 +151,11 @@ workflow {
   sort_bam(filter_bam_quality.out.bam)
 
   // samtools_index
-  index_bam(sort_bam.out.bam.collect())
+  index_bam(sort_bam.out.bam)
 
   // Create a bigwig file
   bam_to_bigwig(index_bam.out.bam_idx)
 
   // peak calling using MACS3 
-  // peak_calling(bam_to_bigwig.out.bw)
+  // peak_calling_bg(bam_to_bigwig.out.bw)
 }