jenniferlu717 / Bracken

Bracken (Bayesian Reestimation of Abundance with KrakEN) is a highly accurate statistical method that computes the abundance of species in DNA sequences from a metagenomics sample.
http://ccb.jhu.edu/software/bracken/index.shtml
GNU General Public License v3.0
279 stars 50 forks source link

Malformed fasta file #37

Open sturne29 opened 6 years ago

sturne29 commented 6 years ago

While running what is listed as "Step 2a" in the Running Braken guide, I get the following error:

classify: malformed fasta file - expected header char > not found 0 sequences (0.00 Mbp) processed in 0.039s (0.0 Kseq/m, 0.00 Mbp/m). 0 sequences classified (-nan%) 0 sequences unclassified (-nan%) Job complete

As far as I can tell, my fasta files are not malformed, do start with a > character, and are where they should be.

Any ideas? I'm kind of at a loss as to what I should try.

jenniferlu717 commented 6 years ago

Whats the command line you're using?

sturne29 commented 6 years ago

./kraken --db=path/to/kraken-1.0/standard_db/ --fasta-input --threads=10 <( find -L library -name ".fna" -o -name ".fa" -o -name "*.fasta" -exec cat {} + ) > database.kraken

jenniferlu717 commented 6 years ago

Try using the updated command line from the README. The different extension options need parentheses around them for the find function to get all of the sequences. Essentially what is happening is that only the first extension is being evaluated. (and therefore the find command isn't finding your files)

Originally, I did not have this issue but in the last few times I tried running the command myself, I had to modify the find function to get all of the FASTA files.

apulvino commented 9 months ago

I'm having the same issue and the solution is not working for me I modified the script in v2.9 to remove the parentheses since you said that worked previously, but it still did not help. I'm using krakenuniq.

Thanks ahead for your consideration on this!

pustoshilov-d commented 6 months ago

@apulvino hi! I've faced the same problem. Did you find any solutions?

apulvino commented 4 months ago

@pustoshilov-d If I remember correctly, it was actually a less obvious, krakenuniq database build problem which caused my issue (not building to completion/correctly). Sorry, I'm replying so late to your question!