StevenWingett / FastQ-Screen

Detecting contamination in NGS data and multi-species analysis
https://stevenwingett.github.io/FastQ-Screen/
GNU General Public License v3.0
67 stars 16 forks source link

FastQ-Screen does not recognize BWA index file with ".64" extension #75

Open LauraEgolf opened 1 month ago

LauraEgolf commented 1 month ago

Hello,

If I understand correctly, FastQ-Screen checks for the existence of a BWA index by looking for the extension ".amb", ex. here and here:

  } elsif ( $aligner eq 'bwa' ) {    #BWA
      unless ( -e "$db_path.amb" ) {
          warn "Skipping DATABASE '$db_name' since no BWA index was found at '$db_path'\n";
$database_skipped_flag = 1;
          next;
      }

However, sometimes 64-bit BWA indices have the extension ".64.amb" (created when bwa index is run with the -6 option enabled):

Usage:   bwa index [options] <in.fasta>

Options: -a STR    BWT construction algorithm: bwtsw, is or rb2 [auto]
         -p STR    prefix of the index [same as fasta name]
         -b INT    block size for the bwtsw algorithm (effective with -a bwtsw) [10000000]
         -6        index files named as <in.fasta>.64.* instead of <in.fasta>.* 

We have found that FastQ-Screen doesn't recognize the indices provided in the Broad Institute resource bundle, ex. Homo_sapiens_assembly38.fasta.64.amb.

Not sure if others have noted this problem as well - but maybe the index check could be revised to accommodate the .64 extension?

Thank you! Laura

StevenWingett commented 3 weeks ago

Hi @LauraEgolf

Thanks for your message. I've pushed a new version to the development branch that should allow these 64-bit BWA index files.

Please let me know if it works for you and I'll incorporate it into the next release.

Thanks, Steven