Hi there. I'm getting this error and struggling to...
# ampliseq
e
Hi there. I'm getting this error and struggling to troubleshoot. Any tips appreciated!
Copy code
ERROR ~ Unexpected end of ZLIB input stream

 -- Check script '/home/e.strand/.nextflow/assets/nf-core/ampliseq/workflows/ampliseq.nf' at line: 310 or see '.nextflow.log' file for more details
ERROR ~ Pipeline failed. Please refer to troubleshooting docs: <https://nf-co.re/docs/usage/troubleshooting>
Script I'm using is in the comments along with conda, nextflow versions
Copy code
#!/bin/bash
#SBATCH --error=output/"%x_error.%j" #if your job fails, the error report will be put in this file
#SBATCH --output=output/"%x_output.%j" #once your job is completed, any final job report comments will be put in this file
#SBATCH --partition=short
#SBATCH --nodes=1
#SBATCH --time=20:00:00
#SBATCH --job-name=ampliseq
#SBATCH --mem=70GB
#SBATCH --ntasks=12
#SBATCH --cpus-per-task=2

### USER TO-DO ### 
## 1. Set paths for project 
## 2. Adjust SBATCH options above (time, mem, ntasks, etc.) as desired  
## 3. Fill in F primer information based on primer type (no reverse compliment needed)
## 4. Adjust parameters as needed (below is Fisheries team default for COI)

# Load nextflow conda environment
source /projects/gmgi/miniconda3/bin/activate nextflow_env

# SET SCRATCH PATH 
export SCRATCH=/scratch/e.strand

export NXF_SINGULARITY_CACHEDIR=$SCRATCH/singularity_cache
export NXF_WORK=$SCRATCH/nextflow_work
export TMPDIR=$SCRATCH/tmp
mkdir -p $NXF_SINGULARITY_CACHEDIR $NXF_WORK $TMPDIR

# SET PROJECT PATHS
metadata="/projects/gmgi/Fisheries/contract_work/INSPIRE/INS2/COI" 
output_dir="/projects/gmgi/Fisheries/contract_work/INSPIRE/INS2/COI/ampliseq_output"

# SET PATHS (EDIT VERSION # ON MZG IF NEEDED)
assignTaxonomy="/projects/gmgi/databases/COI/MetaZooGene/DADA2_MZG_v2025-m10-01_Global_modeA.fasta"
taxlevels="Kingdom,Phylum,Subphylum,Superclass,Class,Subclass,Infraclass,Superorder,Order,Family,Genus,Species"

nextflow run nf-core/ampliseq \
   -c /projects/gmgi/Fisheries/scripts/COI_ampliseq.config \
   -profile singularity \
   --input ${metadata}/samplesheet_OG.csv \
   --FW_primer "GGWACWGGWTGAACWGTWTAYCCYCC" \
   --RV_primer "TAIACYTCIGGRTGICCRAARAAYCA" \
   --outdir ${output_dir} \
   --trunclenf 220 \
   --trunclenr 220 \
   --trunc_qmin 25 \
   --max_ee 2 \
   --min_len_asv 300 \
   --max_len_asv 330 \
   --dada_ref_tax_custom ${assignTaxonomy} \
   --dada_assign_taxlevels ${taxlevels} \
   --skip_dada_addspecies \
   --sample_inference pseudo \
   --ignore_failed_trimming
Copy code
nextflow                  25.10.2              h2a3209d_0    bioconda
zlib                      1.3.1                hb9d3cd8_2    conda-forge
d
Check that all your gzipped files (reads) actually are gzipped (
gzip -t file.gz
). (And: Do you need to run Nextflow inside an sbatch script? It's usually easier to run interactively, either on the login node (if that's allowed) or by allocating a compute node (a few cores and, say 8 GiB RAM).)
e
Yes turns out one of my files is not gz! Not sure what happened there. Thanks for the tip. No, it doesn't have to be in an sbatch script but it makes cross team communication and training a bit easier to have it + the output/error logs. But I will keep that in mind for future use!