Bracken icon indicating copy to clipboard operation
Bracken copied to clipboard

bracken-build: ...cat: write error: Broken pipe

Open dinhe878 opened this issue 3 years ago • 2 comments

Hi,

I tried several times with the command bracken-build -d . in my krakenDB folder and it always ended up with the error message:

Selected Options: kmer length = 35 read length = 100 database = . threads = 20 Checking for Valid Options... Creating database.kraken [if not found] >> kraken2 --db . --threads 20 <( find -L ./library ( -name *.fna -o -name *.fa -o -name *.fasta ) -exec cat {} + ) > ./database.kraken Loading database information... done. Processed 181624 sequences (3959379151 bp) ...cat: write error: Broken pipe

According the the manual page, it seems to be the step 1a somehow hanged for a long time and eventually got killed. I have used the brackeen-build previously on a standard kraken2 DB and it was fine. So I suspected that it has something to do with this custom-build kraken DB which was built using kraken2-build with kraken-predefined refseq archaea, bacteria, viral, human, fungi, plant, protozoa, and additional 48 insect genomes. The only difference in the /library content that I can find between the standard kraken DB and the custom kraken DB was that there are more than one .fna files in the additional /library/added folder, whereas the standard archaea, bacteria, viral, human, fungi, plant, protozoa all only have one library.fna file.

I am not sure what was the problem causing this error. Need help! Thanks!

dinhe878 avatar Jul 08 '21 11:07 dinhe878

So I ended up just search all my fna files against my custom krakenDB separately and concatenate them, like

kraken2 --threads=40 --db=. ./library/viral/*.fna > database.kraken kraken2 --threads=40 --db=. ./library/added/*.fna >> database.kraken

And it turned out that the error might come from the plant sequences, as

kraken2 --threads=40 --db=. ./library/plant/*.fna >> database.kraken Loading database information... done. Processed 165820 sequences (1865041149 bp) ...Killed

I don't really mind losing plant taxonomy classification in this case, just went ahead proceed the rest of the build and it worked. But the error remains mysterious...

dinhe878 avatar Jul 08 '21 21:07 dinhe878

@dinhe878 apologies for not responding earlier, I've been preoccupied with other projects.

I'll look further into this issue but thank you for letting me know

jenniferlu717 avatar Jul 21 '21 19:07 jenniferlu717