diff --git a/conf/base.config b/conf/base.config index a550a4ac4605f4bd3d3f07fc3caa0aed8b8663c7..311c18643423c1721c76f2d9f909658332737721 100644 --- a/conf/base.config +++ b/conf/base.config @@ -52,7 +52,7 @@ process { memory = { check_max( 4.GB * task.attempt, 'memory' ) } time = { check_max( 5.h * task.attempt, 'time' ) } } - withName:build_matrix { + withName:build_contact_maps { cpus = { check_max( 1, 'cpus' ) } memory = { check_max( 6.GB * task.attempt, 'memory' ) } time = { check_max( 5.h * task.attempt, 'time' ) } diff --git a/conf/test.config b/conf/test.config index 4a8a3adf404a17d0393fe3a861fc09ad048de713..caad86ca198438491dfec3e51cac1151c51333c4 100644 --- a/conf/test.config +++ b/conf/test.config @@ -8,12 +8,15 @@ */ params { + // Limit resources so that this can run on Travis - max_cpus = 2 + max_cpus = 4 max_memory = 6.GB - max_time = 48.h + max_time = 1.h + // Input data - ['SRR400264_00', ['https://github.com/nf-core/test-datasets/raw/hic/SRR400264_00_R1.fastq.gz', 'https://github.com/nf-core/test-datasets/raw/hic/SRR400264_00_R1.fastq.gz']], - ['SRR400264_01', ['https://github.com/nf-core/test-datasets/raw/hic/SRR400264_01_R1.fastq.gz', 'https://github.com/nf-core/test-datasets/raw/hic/SRR400264_01_R1.fastq.gz']], + readPaths = [ + ['SRR400264_00', ['https://github.com/nf-core/test-datasets/raw/hic/SRR400264_00_R1.fastq.gz', 'https://github.com/nf-core/test-datasets/raw/hic/SRR400264_00_R2.fastq.gz']], + ['SRR400264_01', ['https://github.com/nf-core/test-datasets/raw/hic/SRR400264_01_R1.fastq.gz', 'https://github.com/nf-core/test-datasets/raw/hic/SRR400264_01_R2.fastq.gz']] ] } diff --git a/main.nf b/main.nf index 6ce793377e2a1bf0643af0adb7c1bf4c5d27d749..618977bc9bd792a5e5a2875e4bf5302a35480ae4 100644 --- a/main.nf +++ b/main.nf @@ -41,8 +41,8 @@ def helpMessage() { nextflow run nf-core/hic --reads '*_R{1,2}.fastq.gz' -profile docker Mandatory arguments: - --readsPath Path to input data (must be surrounded with quotes) - --genome Name of iGenomes reference + --reads Path to input data (must be surrounded with quotes) + // --genome Name of iGenomes reference -profile Configuration profile to use. Can use multiple (comma separated) Available: conda, docker, singularity, awsbatch, test and more. @@ -136,17 +136,34 @@ ch_output_docs = Channel.fromPath("$baseDir/docs/output.md") /* * input read files */ -Channel - .fromFilePairs( params.readPaths ) - .ifEmpty { exit 1, "params.readPaths was empty - no input files supplied" } - .set { raw_reads_pairs } - -raw_reads = Channel.create() -raw_reads_2 = Channel.create() -Channel - .fromFilePairs( params.readPaths ) - .separate( raw_reads, raw_reads_2 ) { a -> [tuple(a[0], a[1][0]), tuple(a[0], a[1][1])] } +if (params.readPaths){ + Channel + .from( params.readPaths ) + .map { row -> [ row[0], [file(row[1][0]), file(row[1][1])]] } + .ifEmpty { exit 1, "params.readPaths was empty - no input files supplied" } + .set { raw_reads_pairs } + + raw_reads = Channel.create() + raw_reads_2 = Channel.create() + + Channel + .from( params.readPaths ) + .map { row -> [ row[0], [file(row[1][0]), file(row[1][1])]] } + .separate( raw_reads, raw_reads_2 ) { a -> [tuple(a[0], a[1][0]), tuple(a[0], a[1][1])] } +}else{ + Channel + .fromFilePairs( params.reads ) + .ifEmpty { exit 1, "params.readPaths was empty - no input files supplied" } + .set { raw_reads_pairs } + + raw_reads = Channel.create() + raw_reads_2 = Channel.create() + + Channel + .fromFilePairs( params.reads ) + .separate( raw_reads, raw_reads_2 ) { a -> [tuple(a[0], a[1][0]), tuple(a[0], a[1][1])] } +} // SPlit fastq files // https://www.nextflow.io/docs/latest/operator.html#splitfastq diff --git a/nextflow.config b/nextflow.config index b4efd7cda9a82cc0c7d6b3b23899d3546aea3d9e..27c12fe50ae4b55371da95adefe4a593bd08a43d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -27,7 +27,7 @@ params { email = false plaintext_email = false help = false - igenomes_base = "./iGenomes" + //igenomes_base = "./iGenomes" tracedir = "${params.outdir}/pipeline_info" clusterOptions = false awsqueue = false @@ -63,9 +63,9 @@ profiles { } // Load igenomes.config if required -if(!params.igenomesIgnore){ - includeConfig 'conf/igenomes.config' -} +//if(!params.igenomesIgnore){ +// includeConfig 'conf/igenomes.config' +//} // Capture exit codes from upstream processes when piping process.shell = ['/bin/bash', '-euo', 'pipefail']