arpcard / rgi

Resistance Gene Identifier (RGI). Software to predict resistomes from protein or nucleotide data, including metagenomics data, based on homology and SNP models.
Other
314 stars 75 forks source link

[BUG] RGI bwt not working with the KMA aligner #282

Open shya1201 opened 1 month ago

shya1201 commented 1 month ago

I am trying to use RGI bwt with the default settings. The files are produced within 20 minutes and they are empty. When I use the exact same code with the bowtie2 aligner the problem goes away and I have results within hours. I am using RGI version 6.0.3 and CARDs version 3.2.9. I think the problem may have to do with the Error:14 (Bad Address), but I am not sure. Any help would be appreciated!

The code: rgi bwt -1 /home/shya1201/analysis/2024-shya-pig-paradigm/QC/reads/S32FE1G_R1.fastq.gz -2 /home/shya1201/analysis/2024-shya-pig-paradigm/QC/reads/S32FE1G_R2.fastq.gz --output_file /home/shya1201/analysis/2024-shya-pig-paradigm/QC/cardsgenome/test/test_kma --local --debug --clean --include_wildcard

Error Log: INFO 2024-06-03 18:34:41,370 : index already exists for reference: /group/ctbrowngrp/projects/2024-shya-pig-paradigm/QC/cardsgenome/localDB/card_wildcard_reference.fasta usin g aligner: kma INFO 2024-06-03 18:34:41,370 : align reads -ipe /home/shya1201/analysis/2024-shya-pig-paradigm/QC/reads/S32FE1G_R1.fastq.gz /home/shya1201/analysis/2024-shya-pig-paradigm/QC/ reads/S32FE1G_R2.fastq.gz to /group/ctbrowngrp/projects/2024-shya-pig-paradigm/QC/cardsgenome/localDB/card_wildcard_reference.fasta Reading inputfile: /home/shya1201/analysis/2024-shya-pig-paradigm/QC/reads/S32FE1G_R1.fastq.gz /home/shya1201/analysis/2024-shya-pig-paradigm/QC/reads/S32FE1G_R2.fastq.g z Phred scale: 33 Collecting k-mer scores.

Total time used for DB loading: 0.69 s.

Finding k-mer ankers Writing error. Error: 14 (Bad address) INFO 2024-06-03 18:34:52,396 : convert SAM file to BAM file [W::sam_read1] Parse error at line 1335850 [main_samview] truncated file. INFO 2024-06-03 18:34:53,776 : sort BAM file [bam_sort_core] merging from 0 files and 96 in-memory blocks... INFO 2024-06-03 18:34:54,730 : index BAM file INFO 2024-06-03 18:34:55,205 : only extract alignment of specific length INFO 2024-06-03 18:35:09,849 : index filtered BAM file INFO 2024-06-03 18:35:10,366 : pull aligned INFO 2024-06-03 18:35:10,662 : pull qname, rname and sequence INFO 2024-06-03 18:35:13,003 : get coverage INFO 2024-06-03 18:35:13,537 : get coverage for all positions INFO 2024-06-03 18:36:17,993 : get summary INFO 2024-06-03 18:36:17,993 : get_reads_count ... INFO 2024-06-03 18:36:18,260 : get_model_details ... INFO 2024-06-03 18:36:18,650 : get_mutation_details ... INFO 2024-06-03 18:36:18,652 : get_read_coverage ... INFO 2024-06-03 18:36:18,653 : get_consensus_sequence ... INFO 2024-06-03 18:36:18,681 : get_variant_details ... INFO 2024-06-03 18:37:05,929 : get statistics INFO 2024-06-03 18:37:08,914 : clean temporary files INFO 2024-06-03 18:37:08,914 : Cleaning up temporary files...test_kma

INFO 2024-06-03 18:37:09,112 : Total Time: 147.745 seconds INFO 2024-06-03 18:37:09,112 : Done.

I am using chrome on macOS Sonoma 14.5. The biopython version is py-biopython/1.79

shya1201 commented 1 month ago

Downgraded my KMA version to 1.4.9 and am still unable to run rgi bwt. I also tried version 1.3.4. The error that i am now receiving is:

INFO 2024-06-06 13:45:49,384 : index already exists for reference: /group/ctbrowngrp/projects/2024-shya-pig-paradigm/QC/cardsgenome/localDB/card_wildcard_reference.fasta using aligne r: kma INFO 2024-06-06 13:45:49,384 : align reads -ipe /home/shya1201/analysis/2024-shya-pig-paradigm/QC/reads/S32FE1G_R1.fastq.gz /home/shya1201/analysis/2024-shya-pig-paradigm/QC/reads/S3 2FE1G_R2.fastq.gz to /group/ctbrowngrp/projects/2024-shya-pig-paradigm/QC/cardsgenome/localDB/card_wildcard_reference.fasta Collecting k-mer scores. Reading inputfile: /home/shya1201/analysis/2024-shya-pig-paradigm/QC/reads/S32FE1G_R1.fastq.gz /home/shya1201/analysis/2024-shya-pig-paradigm/QC/reads/S32FE1G_R2.fastq.gz Phred scale: 0

Total time used for DB loading: 1.06 s.

Finding k-mer ankers

Query converted

Query ankered

Score collection done

Sort, output and select k-mer alignments. Total time for sorting and outputting KMA alignment 1.95 s.

Doing local assemblies of found templates, and output results Total time used for local assembly: 344.62 s.

Closing files INFO 2024-06-06 13:52:01,939 : convert SAM file to BAM file [W::sam_parse1] mapped query cannot have zero coordinate; treated as unmapped [W::sam_parse1] mapped query cannot have zero coordinate; treated as unmapped [W::sam_parse1] mapped query cannot have zero coordinate; treated as unmapped [W::sam_parse1] mapped query cannot have zero coordinate; treated as unmapped [W::sam_parse1] mapped query cannot have zero coordinate; treated as unmapped [W::sam_parse1] mapped query cannot have zero coordinate; treated as unmapped