// Default parameters
params.mismatches = 1
params.genomeSize = "hs"
params.config = "config.txt"
params.threads = 2
// Print Help
if (params.help) {
log.info ''
log.info 'C I P H E R - N F ~ version 1.0.0'
log.info '================================='
log.info 'ChIP-Seq Pipeline'
log.info ''
log.info 'Usage: '
log.info ' cipher.nf --config --index [OPTIONS]...'
log.info ''
log.info 'Options: GENERAL'
log.info ' --help Show this message and exit.'
log.info ' --config A tab separated file containing read information. (Default: config.txt)'
log.info ' --index A Bowtie2 index directory.'
log.info ' --threads Allow N_THREADS per sample. (Default: 2)'
log.info 'Options: BOWTIE2'
log.info ' --mismatches Allow max N_MISMATCHES for a read. (Default: 1)'
log.info ''
exit 1
}
config_file = file(params.config)
// Check required parameters
if (!params.config) {
exit 1, "Please specify a config file"
}
if (!params.index) {
exit 1, "Please specify a bowtie2 index directory"
}
// Create fastq channel
fastqs = Channel
.from(config_file.readLines())
.map { line ->
list = line.split()
id = list[0]
path = file(list[1])
[ id, path ]
}
/*
* Step 1. Trimming fastq files via trim_galore
*/
process trimming {
input:
set id, file(fastq_file) from fastqs
output:
set id, file("${id}_trimmed.fq.gz") into trimmedfastqs
script:
"""
trim_galore --fastqc ${fastq_file}
"""
}
/*
* Step 2. Map trimmed fastq files to bowtie2 index
*/
process mapping {
input:
set id, file(trimmed_fastq_file) from trimmedfastqs
output:
set id, file("${id}.sam") into sams
script:
"""
bowtie2 -q -N ${params.mismatches} --quiet -p ${params.threads} -x ${params.index} -U ${trimmed_fastq_file} -S > ${id}.sam
"""
}nextflow run '/dataA/code/cipher-nf/cipher.nf' --index '/dataA/data/hg19_ref/Homo_sapiens/Ensembl/GRCh37/Sequence/Bowtie2Index/genome'Hi Carlos,
Just from a quick look at your code, it might be that "trimmedfastqs" channel is empty. From what I see in process 1, it's not clear how you fill the channel.
Cheers,
Maria
--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/nextflow.
For more options, visit https://groups.google.com/d/optout.
If I understand correct your "trim_galone" processs produces many *_trimmed.fq.gz files which you want to put in the "trimmedfastqs" channel.
So try to replace the $id in the
"${id}_trimmed.fq.gz")
With a "*"
*_trimmed.fq.gz
indicating to it that it should get all the files.
Could you please include the file ".nextflow.log" for the run you are experiencing this problem?
Thanks,
Paolo
--