hsinnan75 / StrainPro

MIT License
7 stars 3 forks source link

StrainPro-build: buffer overflow detected #1

Closed nick-youngblut closed 4 years ago

nick-youngblut commented 4 years ago

I'm using StrainPro-build v0.9.0 on Ubuntu 18.04.3. Here's a reproducible example:

git clone https://github.com/hsinnan75/StrainPro.git
cd StrainPro/
make
./download_taxonomy.sh
./download_genomic_library.sh archaea
./bin/StrainPro-build -r database/archaea/library.fna -o database/archaea/ref_idx

The output from StrainPro-build is:

Load taxonomy information.
Get all sequences...
Cluster 542 sequences...
*** buffer overflow detected ***: ./bin/StrainPro-build terminated
Aborted (core dumped)

The server that I'm using has plenty of resources, so the issue isn't a lack of memory or something like that.

hsinnan75 commented 4 years ago

Thanks for the information. I'll fix this problem as soon as possible.

nick-youngblut commented 4 years ago

Thanks for the quick response! Actually, StrainPro-build seems to work if I use a different location for the output directory. For example: ./bin/StrainPro-build -r database/archaea/library.fna -o test_output_dir

It seems that the output directory cannot be in the same location as the input fasta file

hsinnan75 commented 4 years ago

I used the same commands and the error did not occur. However, I noticed that the buffer size for index output was too small. I increased the buffer size and updated the package. Please download the latest version and try again, and let me know if you have any suggestions. Thank you very much!

nick-youngblut commented 4 years ago

Increasing the buffer size seems to have fixed the issue. Thanks!

Btw, the README states that the reference sequences should be labeled as taxid|<taxID>|<seqID>. For kraken2, I have all of my reference sequences labeled as kraken:taxid|<taxID>|<seqID>. Will StrainPro still work for kraken:taxid or does it have to be just taxid?

hsinnan75 commented 4 years ago

Unfortunately, StrainPro does not work for kraken:taxid. However, I can modify the source codes to make it does. I'll let you know when it is done.

hsinnan75 commented 4 years ago

@nick-youngblut I've updated the source codes of StrainPro. It now recognizes the patter "taxid|" for looking for taxonomic information. Thus, you may use kraken reference sequences directly.

nick-youngblut commented 4 years ago

Thanks again for the quick update! I'll give it a try ASAP