BIMSBbioinfo / pigx_rnaseq

Bulk RNA-seq Data Processing, Quality Control, and Downstream Analysis Pipeline
GNU General Public License v3.0
20 stars 11 forks source link

MissingOutputException for "samtools index" with 0.0.13 #96

Closed smoe closed 3 years ago

smoe commented 3 years ago

Hello,

[Sat Jun  5 17:28:07 2021]
rule index_bam:
    input: /home/moeller/pigx-rnaseq/pigx-rnaseq/tests/output/mapped_reads/hisat2/UHR_Rep3_Aligned.sortedByCoord.out.bam
    output: /home/moeller/pigx-rnaseq/pigx-rnaseq/tests/output/mapped_reads/hisat2/UHR_Rep3_Aligned.sortedByCoord.out.bam.bai
    log: /home/moeller/pigx-rnaseq/pigx-rnaseq/tests/output/logs/samtools_index_UHR_Rep3.log
    jobid: 38
    wildcards: sample=UHR_Rep3

/usr/bin/samtools  index /home/moeller/pigx-rnaseq/pigx-rnaseq/tests/output/mapped_reads/hisat2/HBR_Rep3_Aligned.sortedByCoord.out.bam /home/moeller/pigx-rnaseq/pigx-rnaseq/tests/output/mapped_reads/hisat2/HBR_Rep3_Aligned.sortedByCoord.out.bam.bai >> /home/moeller/pigx-rnaseq/pigx-rnaseq/tests/output/logs/samtools_index_HBR_Rep3.log 2>&1
Waiting at most 5 seconds for missing files.
MissingOutputException in line 369 of /home/moeller/pigx-rnaseq/pigx-rnaseq/snakefile.py:
Job completed successfully, but some output files are missing. Missing files after 5 seconds:
/home/moeller/pigx-rnaseq/pigx-rnaseq/tests/output/salmon_index/sa.bin
This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait.
  File "/usr/lib/python3/dist-packages/snakemake/executors/__init__.py", line 544, in handle_job_success
  File "/usr/lib/python3/dist-packages/snakemake/executors/__init__.py", line 225, in handle_job_success

with

$ /usr/bin/samtools --version
samtools 1.11
Using htslib 1.11-4
Copyright (C) 2020 Genome Research Ltd.

and

$ ./pigx-rnaseq --version
PiGx RNAseq Pipeline.
Version: 0.0.13
smoe commented 3 years ago

I had solved that issue before, just had a look at my previous patches that had not applied to the new version:

Index: pigx-rnaseq/tests/test_salmon/test_salmon_index.sh.in
===================================================================
--- pigx-rnaseq.orig/tests/test_salmon/test_salmon_index.sh.in
+++ pigx-rnaseq/tests/test_salmon/test_salmon_index.sh.in
@@ -26,7 +26,7 @@ head -n 2 ${samplesheet} > ${tmp_samples
 ${builddir}/pigx-rnaseq -s ${tmp_settings} --target salmon_index ${tmp_samplesheet}

 rm ${tmp_settings} ${tmp_samplesheet}
-if ! test -f ${testfolder}/salmon_index/sa.bin
+if ! test -f ${testfolder}/salmon_index/pos.bin
 then
   echo "ERROR: failed the SALMON indexing test"
   exit 1
Index: pigx-rnaseq/snakefile.py
===================================================================
--- pigx-rnaseq.orig/snakefile.py
+++ pigx-rnaseq/snakefile.py
@@ -187,7 +187,7 @@ targets = {
     'salmon_index' : {
         'description': "Create SALMON index file.",
         'files':
-          [os.path.join(OUTPUT_DIR, 'salmon_index', "sa.bin")]
+          [os.path.join(OUTPUT_DIR, 'salmon_index', "pos.bin")]
     },
     'salmon_quant' : {
         'description': "Calculate read counts per transcript using SALMON.",
@@ -370,7 +370,7 @@ rule salmon_index:
   input:
       CDNA_FASTA
   output:
-      salmon_index_file = os.path.join(OUTPUT_DIR, 'salmon_index', "sa.bin")
+      salmon_index_file = os.path.join(OUTPUT_DIR, 'salmon_index', "pos.bin")
   params:
       salmon_index_dir = os.path.join(OUTPUT_DIR, 'salmon_index')
   log: os.path.join(LOG_DIR, "salmon", 'salmon_index.log')

The reason is likely that Debian ships

$ salmon --version
salmon 1.4.0

while guix is on 0.13.1 - released in March 2019 (just checked on https://github.com/COMBINE-lab/salmon/releases).

rekado commented 3 years ago

Oops, I guess I should finally make some time to upgrade salmon in Guix. Thanks for the hint!