luntergroup / octopus

Bayesian haplotype-based mutation calling
MIT License
305 stars 38 forks source link

Absolute input file paths are appended to working directory paths #250

Closed TBradley27 closed 2 years ago

TBradley27 commented 2 years ago

Describe the bug The absolute paths of user-defined input files are appended to the working directory relative path - which generates a malformed path for requested input files

Version

$ octopus --version
octopus version 0.7.4
Target: x86_64 Linux 5.10.25-linuxkit
SIMD extension: AVX2
Compiler: GNU 11.1.0
Boost: 1_76

Command Command line to install octopus:

container: 'docker://dancooke/octopus' 

Command line to run octopus:

shell: 'octopus \
                                               -C cancer \
                               --allow-marked-duplicates \
                               --allow-octopus-duplicates \
                               --forest resources/germline.v0.7.2.forest \
                               --somatic-forest resources/somatic.v0.7.2.forest \
                               --max-somatic-haplotypes 2 \
                               --annotations SB SD AF AD FRF \
                               --filter-expression "QUAL < 10 | MQ < 10 | MP < 10 | AD < 1 | AF < 0.01 | AFB > 0.25 | SB > 0.98 | BQ < 15 | DP < 1 | ADP < 1" \
                               --somatic-filter-expression "QUAL < 2 | GQ < 20 | MQ < 30 | SMQ < 40 | SB > 0.90 | SD > 0.90 | FRF > 0.5 | BQ < 20 | DP < 3 | ADP < 1 | MF > 0.2 | NC > 1 | AD < 1 | AF < 0.0001" \
                               --min-expected-somatic-frequency 0.03 \
                               --min-credible-somatic-frequency 0.01 \
                               --threads \
                               -w . \
                               -I {input.tumour_bams} \
                               --regions-file {input.interval_file} \
                               --output {output.tumour_vcf} \
                               -R {input.reference_genome}'

Additional context Octopus is installed via docker within the snakemake rule

If for example the working directory is /foo/ and --reference is /bar, then octopus will interpret the path to --reference as being /foo/bar

TBradley27 commented 2 years ago

After personal communications with Matthew Eldridge (@eldrid01) I realise that this isn't an issue with octopus. Rather the issue is due to me not realising that snakemake does not handle container and host file system bindings/mappings automatically (for files outside of the working directory), and this must be specified using the --singularity-args argument to snakemake.

I am now closing this issue as it is not relevant to this repository