maxplanck-ie / snakepipes

Customizable workflows based on snakemake and python for the analysis of NGS data
http://snakepipes.readthedocs.io
381 stars 85 forks source link

Error in rule Bowtie2 #942

Closed sunta3iouxos closed 10 months ago

sunta3iouxos commented 11 months ago

Could you help me overcome the following issue? the command I am running is:

DNA-mapping -i AP04/fastq/ -o /scratch/tmp/DNAseq/AP04 --fastqc --trim --trimmer fastp --trimmerOptions "--trim_poly_g --trim_poly_x -Q -L --correction" --dedup --plotFormat "pdf" --mapq 2 -j 14 --alignerOpts " --end-to-end --very-sensitive-local --no-mixed --no-discordant --dovetail -I 10 -X 1000" --insertSizeMax 1000 mm10_gencodeM19
Error in rule Bowtie2:
    jobid: 178
    output: Bowtie2/A006850324_209972_S8_L000.Bowtie2_summary.txt, Bowtie2/A006850324_209972_S8_L000.sorted.bam
    log: Bowtie2/logs/A006850324_209972_S8_L000.sort.log (check log file(s) for error message)
    conda-env: /projects-raptor/ccg-ngs/production/sw/miniconda3/envs/4094a9892df79329972dc6079b5814b5
    shell:

            TMPDIR=/scratch/tmp/tmp/
            MYTEMP=$(mktemp -d ${TMPDIR:-/tmp}/snakepipes.XXXXXXXXXX);
            bowtie2             -X 1000             -x /data/repository/organisms/GRCm38_ensembl/BowtieIndex/genome -1 FASTQ_fastp/A006850324_209972_S8_L000_R1_001.fastq.gz -2 FASTQ_fastp/A006850324_209972_S8_L000_R2_001.fastq.gz              --end-to-end --very-sensitive-local --no-mixed --no-discordant --dovetail -I 10 -X 1000 --fr             --rg-id A006850324_209972_S8_L000             --rg DS:A006850324_209972_S8_L000 --rg PL:ILLUMINA --rg SM:A006850324_209972_S8_L000             -p 24             2> Bowtie2/A006850324_209972_S8_L000.Bowtie2_summary.txt |             samtools view -Sb - |             samtools sort -m 2G -T $MYTEMP/A006850324_209972_S8_L000 -@ 2 -O bam - > Bowtie2/A006850324_209972_S8_L000.sorted.bam 2> Bowtie2/logs/A006850324_209972_S8_L000.sort.log;
            rm -rf $MYTEMP

        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
    cluster_jobid: Submitted batch job 1444270

Error executing rule Bowtie2 on cluster (jobid: 178, external: Submitted batch job 1444270, jobscript: /scratch/tmp/DNAseq/AP04/.snakemake/tmp.otsudz_m/snakejob.Bowtie2.178.sh). For error details see the cluster log and the log files of the involved rule(s).
Job failed, going on with independent jobs.
roddypr commented 11 months ago

In my (very limited!) experience, if you are using Slurm, the error message in the cluster_logs directory is more helpful. And doing "seff 1444270" to check if you ran out of memory or time

sunta3iouxos commented 11 months ago

@roddypr thsnk you, this is what I get:

seff 1444270
Job ID: 1444270
Cluster: raptor
User/Group: hthiele0/uniuser
State: FAILED (exit code 1)
Nodes: 1
Cores per node: 24
CPU Utilized: 00:00:02
CPU Efficiency: 2.08% of 00:01:36 core-walltime
Job Wall-clock time: 00:00:04
Memory Utilized: 0.00 MB (estimated maximum)
Memory Efficiency: 0.00% of 24.00 GB (1.00 GB/core)
katsikora commented 11 months ago

Hi Sunta3iouxos,

thanks for reporting your issue. Could you have a look in the Bowtie log file: Bowtie2/logs/A006850324_209972_S8_L000.sort.log ?

Best wishes,

Katarzyna

sunta3iouxos commented 11 months ago

Unfortunately it is empty:

(base) [tgeorgom@cheops1:~]$ 07:54:33$ls /scratch/tgeorgom/AP04/Bowtie2/logs/
(base) [tgeorgom@cheops1:~]$ 07:54:38$
katsikora commented 11 months ago

That's a pity. You can try to reproduce the error by rerunning the command manually like this:

cd $output_directory
conda activate /projects-raptor/ccg-ngs/production/sw/miniconda3/envs/4094a9892df79329972dc6079b5814b5
TMPDIR=/scratch/tmp/tmp/
MYTEMP=$(mktemp -d ${TMPDIR:-/tmp}/snakepipes.XXXXXXXXXX);
bowtie2             -X 1000             -x /data/repository/organisms/GRCm38_ensembl/BowtieIndex/genome -1 FASTQ_fastp/A006850324_209972_S8_L000_R1_001.fastq.gz -2 FASTQ_fastp/A006850324_209972_S8_L000_R2_001.fastq.gz              --end-to-end --very-sensitive-local --no-mixed --no-discordant --dovetail -I 10 -X 1000 --fr             --rg-id A006850324_209972_S8_L000             --rg DS:A006850324_209972_S8_L000 --rg PL:ILLUMINA --rg SM:A006850324_209972_S8_L000             -p 24             2> Bowtie2/A006850324_209972_S8_L000.Bowtie2_summary.txt |             samtools view -Sb - |             samtools sort -m 2G -T $MYTEMP/A006850324_209972_S8_L000 -@ 2 -O bam - > Bowtie2/A006850324_209972_S8_L000.sorted.bam

The error message should be printed to the screen then.

Hope this helps,

Katarzyna

sunta3iouxos commented 10 months ago

I am closing this one I figured it out, but do not really remember how I solved it.