abishara / athena_meta

read cloud assembler
MIT License
34 stars 8 forks source link

ctgfasta_path option in config must reference a BWA index #40

Closed priscalim00 closed 2 months ago

priscalim00 commented 2 months ago

Hi there,

Thank you for your work in developing this tool. I've followed the instructions on your page but am encountering an error when running the athena-meta command.

Here are the steps I've taken:

  1. I extracted barcodes using the longranger basic pipeline which produced a paired-end interleaved fastq file (reads.fastq)
  2. I ran metaspades on the resultant reads.fastq file
  3. I indexed the spades output contigs.fasta file using the command bwa-mem2 index
  4. I aligned my reads to the contigs using bwa-mem2 mem -C, followed by samtools sort and samtools index to produce reads2contigs.bam
  5. I generated the config.json file and inputted the paths to reads.fastq, contigs.fasta and reads2contigs.bam, then ran the athena-meta command.

The first two steps (CheckReadsStep and SubassembleReadsStep) run with no issues, but then it hits an error and fails:

Traceback (most recent call last):
    File "/users/p/r/prisca/miniconda3/envs/athena/bin/athena-meta", line 10, in <module>
      sys.exit(main())
    File "/users/p/r/prisca/miniconda3/envs/athena/lib/python2.7/site-packages/main.py", line 211, in main
      run(options)
    File "/users/p/r/prisca/miniconda3/envs/athena/lib/python2.7/site-packages/main.py", line 42, in run
      runner.run_stage(stage, stage_name)
    File "/users/p/r/prisca/miniconda3/envs/athena/lib/python2.7/site-packages/athena/pipeline.py", line 22, in run_stage
      for step_chunk in stage.get_steps(self.options):
    File "/users/p/r/prisca/miniconda3/envs/athena/lib/python2.7/site-packages/athena/stages/assemble_olc.py", line 22, in get_steps
      "ctgfasta_path option in config must reference a BWA index"
  AssertionError: ctgfasta_path option in config must reference a BWA index

The error states that ctgfasta_path option must reference a BWA index, which is confusing because the contigs.fasta file has been indexed and the associated index files are in the same directory as contigs.fasta. I've tried re-running the command using just the prefix or directory path name, but both options gave the same error. I'm not sure why my input contigs.fasta is not being recognized as a valid input. Thanks for any tips/advice you can provide!

priscalim00 commented 2 months ago

Hi all,

I was able to resolve this. I incorrectly assumed that bwa-mem2 produced identical outputs to bwa, but just at a faster rate. Turns out, that is untrue and Athena only recognizes bwa indices, not bwa-mem2 indices. Once I re-indexed my contigs.fasta with bwa, everything ran without issues! I will be closing this issue now, thank you! :)