KoesGroup / Snakemake_ChIPseq_PE

Pipeline for the analysis of PE ChIP-seq data
Creative Commons Attribution Share Alike 4.0 International
14 stars 4 forks source link

order in the rules #8

Closed JihedC closed 6 years ago

JihedC commented 6 years ago

When running the snakefile with multiple core, it seems that the indexing of the bam file is done later than the rules using it. 'results/mapped/ChIP1_L1.sorted.rmdup.bam' does not appear to have an index. You MUST index the file first!


'results/mapped/ChIP1_L1.sorted.rmdup.bam' does not appear to have an index. You MUST index the file first!
    Error in rule bamcompare:
        jobid: 3
        output: results/bamcompare/log2_ChIP1_ChIP2_L1.bamcompare.bw

RuleException:
CalledProcessError in line 249 of /Users/Jihed/Desktop/DMC1_ChIPseq/Snakefile:
Command ' set -euo pipefail;  bamCompare -b1 results/mapped/ChIP1_L1.sorted.rmdup.bam -b2 results/mapped/ChIP2_L1.sorted.rmdup.bam -o results/bamcompare/log2_ChIP1_ChIP2_L1.bamcompare.bw ' returned non-zero exit status 1
  File "/Users/Jihed/Desktop/DMC1_ChIPseq/Snakefile", line 249, in __rule_bamcompare
  File "/anaconda3/envs/bigwig/lib/python3.5/concurrent/futures/thread.py", line 55, in run```

The rule producing the bam index file is `rule bam_index`, take sorted bam files as input. The output is required by the `rule_all`, so the file are produced at some point and it appears in the DAG. However I can not find the files `*.bai` in the output folder. 
mgalland commented 6 years ago

On which branch? On the bed branch?

JihedC commented 6 years ago

Yeah sorry I forgot to tell, it's the bed branch

JihedC commented 6 years ago

I have fixed the issues about the missing bam index files. As Marc suggested I have included a command to generate them in the rule rmdup.

Can I close this issue?

mgalland commented 6 years ago

Do you mean that issues #7 and #8 have been both fixed?

JihedC commented 6 years ago

Yes I think so. But I have made a mistake :(, instead of creating a new branch to solve the issue with the environments and the --use-conda, I have solved it in the same branch commit ed43613.

On my computer it runs when I use snakemake --use-conda, the error on the missing bam index file for the rules using it is not there anymore.

JihedC commented 6 years ago

Fixed in #7