Skip to content

bwa index not found with -r #112

@bglindner

Description

@bglindner

Hi Ben,

I've been competitively mapping reads to a collection of ~7,000 draft genomes using bwa-mem2. Recently, I've tried switching to coverm to complete both mapping (still with bwa-mem) and depth calculation (seqdepth calculation is much faster than the ad hoc python scripts I was using previously) for these genomes.

My longterm aim is to run multiple metagenomes through coverm but since my genome set is so large, I want to avoid building a new index each time I start the process over with a new metagenome. So I wanted to offer coverm genome my bwa index via -r for each run. Based on reading the help documentation, I'm attempting to call coverm genome in this way:

coverm genome -1 ${fwd} -2 ${rev} -p bwa-mem -r ${index} -d ${g_dir} \
--min-read-percent-identity 95 --min-read-aligned-percent 75 --output-format sparse \
--trim-max 90 --trim-min 10 -m trimmed_mean -o ${output} -t 24

Where the variables follow:
fwd/rev: forward and reverse gzipped FASTQ,
index: path to a bwa-mem index, including the stem
g_dir: path to directory containing genomes (suffix matches default .fna)
output: what I want the output .tsv saved as

When I run this, coverm is not able to recognize my BWA index (passed with my index variable above) despite a lot of fiddling on my end. I see the following error before coverm exits:

thread 'main' panicked at 'The reference specified '/storage/coda1/p-ktk3/0/shared/rich_project_bio-konstantinidis/shared3/mst/01_pipeline/xx_references/xx_fulldbs/MST_db' does not appear to exist', src/mapping_parameters.rs:159:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Any thoughts or feedback would be greatly appreciated.

Cheers,

Blake

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions