Matthew Brooks
04/26/2024, 3:03 AM#! /bin/bash
#SBATCH --job-name=nextflow-main
#SBATCH --cpus-per-task=4
#SBATCH --mem=32G
#SBATCH --gres=lscratch:200
#SBATCH --time=72:00:00
module load nextflow
export NXF_SINGULARITY_CACHEDIR=/data/$USER/nxf_singularity_cache;
export SINGULARITY_CACHEDIR=/data/$USER/.singularity;
export TMPDIR=/lscratch/$SLURM_JOB_ID
export NXF_JVM_ARGS="-Xms2g -Xmx16g"
nextflow run nf-core/chipseq -r 2.0.0 \
-profile biowulf \
--input samplesheet.csv \
--outdir output \
--gtf /data/brooksma/Index/Human/ENS/v111/Homo_sapiens.GRCh38.111.gtf.gz \
--fasta /data/brooksma/Index/Human/ENS/v111/Homo_sapiens.GRCh38.dna_sm.primary_assembly.fa.gz \
--igenomes_ignore --genome null \
--read_length 100
Here's the error:
Error executing process > 'NFCORE_CHIPSEQ:CHIPSEQ:FILTER_BAM_BAMTOOLS:BAM_REMOVE_ORPHANS (B4_9_H3K4me3)'
Caused by:
Process `NFCORE_CHIPSEQ:CHIPSEQ:FILTER_BAM_BAMTOOLS:BAM_REMOVE_ORPHANS (B4_9_H3K4me3)` terminated with an error exit status (1)
Command executed:
samtools sort -n -@ 6 -o B4_9_H3K4me3.mLb.clN.name.sorted.bam -T B4_9_H3K4me3.mLb.clN.name.sorted B4_9_H3K4me3.mLb.flT.sorted.bam
bampe_rm_orphan.py B4_9_H3K4me3.mLb.clN.name.sorted.bam B4_9_H3K4me3.mLb.clN.bam --only_fr_pairs
cat <<-END_VERSIONS > versions.yml
"NFCORE_CHIPSEQ:CHIPSEQ:FILTER_BAM_BAMTOOLS:BAM_REMOVE_ORPHANS":
samtools: $(echo $(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*$//')
END_VERSIONS
Command exit status:
1
Command output:
(empty)
Command error:
[E::idx_find_and_load] Could not retrieve index file for 'B4_9_H3K4me3.mLb.clN.name.sorted.bam'
Traceback (most recent call last):
File "/home/brooksma/.nextflow/23.10.0/assets/nf-core/chipseq/bin/bampe_rm_orphan.py", line 167, in
bampe_rm_orphan(BAMIn=args.BAM_INPUT_FILE, BAMOut=args.BAM_OUTPUT_FILE, onlyFRPairs=args.ONLY_FR_PAIRS)
File "/home/brooksma/.nextflow/23.10.0/assets/nf-core/chipseq/bin/bampe_rm_orphan.py", line 82, in bampe_rm_orphan
currRead = next(iter)
File "pysam/libcalignmentfile.pyx", line 2209, in pysam.libcalignmentfile.IteratorRowAll.__next__
StopIteration
However, the B4_9_H3K4me3.mLb.clN.name.sorted.bam file in the above error is empty. All the bam files are empty. Tracing back further in the pipeline, I found the trimmed fastq files from the output of NFCORE_CHIPSEQCHIPSEQFASTQC_TRIMGALORE:TRIMGALORE are all empty. The fastqc output from NFCORE_CHIPSEQCHIPSEQFASTQC_TRIMGALORE:FASTQC is fine. Here is the trimming report:
SUMMARISING RUN PARAMETERS
==========================
Input filename: B4_9_H3K4me3_T1_1.fastq.gz
Trimming mode: paired-end
Trim Galore version: 0.6.7
Cutadapt version: 3.4
Python version: could not detect
Number of cores used for trimming: 4
Quality Phred score cutoff: 20
Quality encoding type selected: ASCII+33
Using Illumina adapter for trimming (count: 76557). Second best hit was Nextera (count: 7)
Adapter sequence: 'AGATCGGAAGAGC' (Illumina TruSeq, Sanger iPCR; auto-detected)
Maximum trimming error rate: 0.1 (default)
Minimum required adapter overlap (stringency): 1 bp
Minimum required sequence length for both reads before a sequence pair gets removed: 20 bp
Running FastQC on the data once trimming has completed
Output file will be GZIP compressed
This is cutadapt 3.4 with Python 3.9.6
Command line parameters: -j 4 -e 0.1 -q 20 -O 1 -a AGATCGGAAGAGC B4_9_H3K4me3_T1_1.fastq.gz
Processing reads on 4 cores in single-end mode ...
Finished in 134.57 s (6 µs/read; 9.29 M reads/minute).
=== Summary ===
Total reads processed: 20,825,534
Reads with adapters: 8,978,111 (43.1%)
Reads written (passing filters): 20,825,534 (100.0%)
Total basepairs processed: 2,103,378,934 bp
Quality-trimmed: 3,217,395 bp (0.2%)
Total written (filtered): 2,033,313,363 bp (96.7%)
Yet, the B4_9_H3K4me3_T1_1_val_1.fq.gz file is empty. Any help would be greatly appreciated!Luis Nivelo
04/07/2025, 2:14 AMLuis Nivelo
04/08/2025, 8:15 PMLuis Nivelo
04/08/2025, 8:15 PMNFCORE_CHIPSEQ:CHIPSEQ:DEEPTOOLS_COMPUTEMATRIX (Pol_J_T_REP1) terminated with an error exit status (1)
Command executed:
computeMatrix \
scale-regions --regionBodyLength 1000 --beforeRegionStartLength 3000 --afterRegionStartLength 3000 --missingDataAsZero --skipZeros --smartLabels \
--regionsFileName genes.bed \
--scoreFileName Pol_J_T_REP1.mLb.clN.bigWig \
--outFileName Pol_J_T_REP1.mLb.clN.computeMatrix.mat.gz \
--outFileNameMatrix Pol_J_T_REP1.mLb.clN.computeMatrix.vals.mat.tab \
--numberOfProcessors 32
cat <-END_VERSIONS versions.yml
"NFCORE_CHIPSEQCHIPSEQDEEPTOOLS_COMPUTEMATRIX":
deeptools: $(computeMatrix --version | sed -e "s/computeMatrix //g")
END_VERSIONS
Command exit status:
1
Command output:
(empty) Command error:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/ubuntu/mount_1/work/conda/env-a3c287b5939a5abb-a99740b96a460a4d021aea67a9fa0fe9/lib/python3.12/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/mount_1/work/conda/env-a3c287b5939a5abb-a99740b96a460a4d021aea67a9fa0fe9/lib/python3.12/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
^^^^^^^^^^^^^^^^
File "/home/ubuntu/mount_1/work/conda/env-a3c287b5939a5abb-a99740b96a460a4d021aea67a9fa0fe9/lib/python3.12/site-packages/deeptools/heatmapper.py", line 174, in compute_s>
return heatmapper.compute_sub_matrix_worker(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/mount_1/work/conda/env-a3c287b5939a5abb-a99740b96a460a4d021aea67a9fa0fe9/lib/python3.12/site-packages/deeptools/heatmapper.py", line 379, in compute_s>
sub_matrix[:] = np.NAN
^^^^^^
File "/home/ubuntu/mount_1/work/conda/env-a3c287b5939a5abb-a99740b96a460a4d021aea67a9fa0fe9/lib/python3.12/site-packages/numpy/__init__.py", line 414, in getattr
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'NAN'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/mount_1/work/conda/env-a3c287b5939a5abb-a99740b96a460a4d021aea67a9fa0fe9/bin/computeMatrix", line 10, in module
sys.exit(main())
^^^^^^
File "/home/ubuntu/mount_1/work/conda/env-a3c287b5939a5abb-a99740b96a460a4d021aea67a9fa0fe9/lib/python3.12/site-packages/deeptools/computeMatrix.py", line 398, in main
hm.computeMatrix(scores_file_list, args.regionsFileName, parameters, blackListFileName=args.blackListFileName, verbose=args.verbose, allArgs=args)
File "/home/ubuntu/mount_1/work/conda/env-a3c287b5939a5abb-a99740b96a460a4d021aea67a9fa0fe9/lib/python3.12/site-packages/deeptools/heatmapper.py", line 252, in computeMa>
res, labels = mapReduce.mapReduce([score_file_list, parameters],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/mount_1/work/conda/env-a3c287b5939a5abb-a99740b96a460a4d021aea67a9fa0fe9/lib/python3.12/site-packages/deeptools/mapReduce.py", line 142, in mapReduce
res = pool.map_async(func, TASKS).get(9999999)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/mount_1/work/conda/env-a3c287b5939a5abb-a99740b96a460a4d021aea67a9fa0fe9/lib/python3.12/multiprocessing/pool.py", line 774, in get
raise self._value
AttributeError: module 'numpy' has no attribute 'NAN'
Work dir:
/home/ubuntu/mount_1/work/a7/48ad9ca118f1de19a81a73c728037cLuis Nivelo
04/08/2025, 8:18 PM