Hi all, Even though Nextflow runs without any erro...
# chipseq
j
Hi all, Even though Nextflow runs without any error messages, there are some issues with my results. My peak data only represents 10-20 peaks per macs2 peak file... I built the library with 1ng of IP samples, and I think is sufficient. Antibodies to IP have been identified by ChIP-qPCR, and some papers have used the same antibodies for ChIP. Checking the bigWig data, I found that the peak patterns of the input and IP samples were very similar and the scale (signal range?) was almost the same, 0.07 to 0.08. As this is my first ChIP sequencing, I am not sure how to solve this problem. Please give me some advice. Thanks for your help.
here is my script
Copy code
nextflow run nf-core/chipseq \
--input samplesheet_chip.csv \
--outdir ./result \
--gtf /GRCh38/gencode.v45.primary_assembly.basic.annotation.gtf.gz \
--fasta /GRCh38/GRCh38.primary_assembly.genome.fa.gz \
--blacklist /GRCh38/hg38-blacklist.v2.bed \
--read_length 100 \
--narrow_peak \
-profile docker
I found this issue in https://github.com/nf-core/chipseq/issues/374 and I tried make custom.config file in which every codes are same with modules.config and only '--nomodel --extsize 147' is added. But I got this error message
Copy code
N E X T F L O W  ~  version 23.10.1
ERROR ~ Unable to parse config file: '/home/jiwon/nf-core/configs/custom.config'

  Cannot compare groovy.util.ConfigObject with value '[:]' and java.lang.Integer with value '0'


 -- Check '.nextflow.log' file for details
my script is here
Copy code
nextflow run nf-core/chipseq \
--input samplesheet_chip.csv \
--outdir ./result_nomodel \
--gtf /GRCh38/gencode.v45.primary_assembly.basic.annotation.gtf.gz \
--fasta /GRCh38/GRCh38.primary_assembly.genome.fa.gz \
--blacklist /GRCh38/hg38-blacklist.v2.bed \
--read_length 100 \
-c ~/nf-core/configs/custom.config \
-profile docker
j
Hi, could you share your
custom.config
here please?
j
Hi, here is my custom.config
Copy code
process {
        withName: 'MACS2_CALLPEAK' {
            ext.args   = [
                '--keep-dup all',
                params.narrow_peak      ? '' : "--broad --broad-cutoff ${params.broad_cutoff}",
                params.save_macs_pileup ? '--bdg --SPMR' : '',
                params.macs_fdr         ? "--pvalue ${params.macs_pvalue}" : '',
                params.macs_pvalue      ? "--qvalue ${params.macs_fdr}" : '',
                '--nomodel --extsize 147' //New argument here
            ].join(' ').trim()
and I am wondering that the full codes (like modules.config) are needed in custom.config or partial code (only including the process 'MACS_CALLPEAK') is acceptable I am new to anlayse sequencing data...🥲 I also run nextflow with another custom.config
Copy code
process {
        withName: 'MACS2_CALLPEAK' {
        ext.args   = [
            '--keep-dup all --broad --broad-cutoff 0.1',
            'gsize 2406655830',
            '--format BAM',
            '--nomodel --extsize 147'].join(' ').trim()
}
but I got same error message
Copy code
N E X T F L O W  ~  version 23.10.1
ERROR ~ Unable to parse config file: '/home/jiwon/nf-core/configs/custom2.config'

  Compile failed for sources FixedSetSources[name='/groovy/script/Script2CBC105D2D5866D8F35C196055A1D6ED/_nf_config_04547fe9']. Cause: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  /groovy/script/Script2CBC105D2D5866D8F35C196055A1D6ED/_nf_config_04547fe9: 1: Unexpected input: '{' @ line 1, column 9.
     process {
             ^

  1 error


 -- Check '.nextflow.log' file for details
j
No you only need to provide the process that you want to tune and the expression you want to modify in this case
ext.args
, the others such as
publishDir
directive won’t be modified. You have to keep in mind that your
ext.args
will overwrite anything that is set by default by the
ext.args
declaration in the
modules.config
(here). Also, the parameters are not read at the time when the
custom.config
is resolved and thus, for instance
params.narrow_peak
,
params.save_macs_pileup
, etc. won’t be effective in your
custom.config
. I will suggest that you simply provide the arguments you want to use with macs2 as a single string, e.g.:
Copy code
process {
        withName: 'MACS2_CALLPEAK' {
            ext.args   = '--keep-dup all --nomodel --extsize 147'
        }
}
j
Oh, It works!Now the nextflow is running!!THANKS!!🎉 then in this case, the original
ext.arg
is remained and set by default
Copy code
process {
        withName: 'MACS2_CALLPEAK' {
            ext.args   = [
                '--keep-dup all',
                params.narrow_peak      ? '' : "--broad --broad-cutoff ${params.broad_cutoff}",
                params.save_macs_pileup ? '--bdg --SPMR' : '',
                params.macs_fdr         ? "--pvalue ${params.macs_pvalue}" : '',
                params.macs_pvalue      ? "--qvalue ${params.macs_fdr}" : '',
            ].join(' ').trim()
and only e`xt.args = '--keep-dup all --nomodel --extsize 147'` this part overwrite? or in nextflow runninng, ignore the original
ext.arg
and only use
custom.config
? I am sorry I don't fully understand about
custom.config
..
j
No, the original
ext.args
is overwritten and only the
custom.config
is used What is not overwritten is the rest of the directives under the
MACS2_CALLPEAK
process selector in the
modules.config
, 👉🏻 https://github.com/nf-core/chipseq/blob/51eba00b32885c4d0bec60db3cb0a45eb61e34c5/conf/modules.config#L534-L540
j
then if I want to chang the parameter of macs2 pvalue or narrow/broad peak mode, I should just write the parameter in
ext.args
like this?
Copy code
ext.args   = ['--keep-dup all --nomodel --extsize 147',
              '-pvalue 0.05',
              '--broad'].join(' ').trim()
j
If you want to call broad peaks you can use:
Copy code
process {
        withName: 'MACS2_CALLPEAK' {
            ext.args   = '--keep-dup all --nomodel --extsize 147 --pvalue 0.05 --broad --broad-cutoff 0.1'
        }
}
I though, you were calling narrow peaks as this is specified in your script
j
Oh, I understand! Thanks a lot to your help☺️
👌🏻 1