rMLST process (blastn) not working

The index files are not found, because the specified database is

/path_to_blast_db/BACT000*.fas, instead of /path_to_blast_db/BACT000*

I tried forking but don't have permission. Could you please update the code in module rMLST as follows?

process rMLST {
    tag { fasta }
    containerOptions "-B ${params.db_rMLST}"


    input:
    tuple val (sample_id), path (fasta)

    output:
    tuple val (sample_id), path ("rMLST_blast_*.tab"), emit: blast_tabs
    path "blastn_rMLST_version.txt", emit: version

    script:
    """
    #!/bin/bash

    for gene in ${params.db_rMLST}/*.fas
    do
    let counter=counter+1
    gene="${gene%.fas}"  # Remove the .fas extension
    blastn -num_threads ${task.cpus} -db "\$gene" -query ${fasta} -max_target_seqs 100 -max_hsps 1 \
    -outfmt "6 qseqid sseqid stitle qlen slen length pident nident mismatch gaps evalue bitscore" \
    > rMLST_blast_"\$counter".tab
    done

    echo "rMLST \$(blastn -version | head -1)" > blastn_rMLST_vers.txt
    echo ${params.db_rMLST} > db_version_rMLST.txt
    echo ${task.container} > blastn_rMLST_singularity.txt
    cat blastn_rMLST_vers.txt blastn_rMLST_singularity.txt db_version_rMLST.txt | tr "\\n" "\\t" > blastn_rMLST_version.txt
    """
}

where I added the line "gene="${gene%.fas}" # Remove the .fas extension".

Thanks!