# KneadData critical error in bowtie2\_discordant\_pairs

**URL:** <https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625>\
**Category:** KneadData\
**Created:** [September 22, 2021, 7:09pm UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625 "2021-09-22T19:09:01Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![EmilyB](https://avatars.discourse-cdn.com/v4/letter/e/5daacb/32.png) [@EmilyB](https://forum.biobakery.org/u/EmilyB)\
**Post date:** [September 22, 2021, 7:09pm UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/1 "2021-09-22T19:09:01Z")

</div>

I’m running KneadData on a HPC cluster and parallelizing with GNU Parallel. I’m getting an error at the discordant pairs step but the log does not contain any information about what’s causing this. I’ve already fixed the sequence identifiers.

The kneaddata\_bowtie2\_discordant\_pairs step runs by itself and all input files look correct. Is this possibly a RAM issue? I’m running 10 cores with 50 gb RAM per core.

Here is the output from the log:  
`09/22/2021 03:01:28 PM - kneaddata.utilities - CRITICAL: Error executing: kneaddata_bowtie2_discordant_pairs --bowtie2 /storage/work/epb5360/miniconda3/envs/eukdetect/bin/bowtie2 --threads 1 -x /gpfs/group/evk5387/default/emily/refs/hg37dec_v0.1 --mode strict --bowtie2-options "--very-sensitive-local --phred33" -1 /storage/home/epb5360/scratch/kneaded/sun2018/SRR7721904_rename_1_kneaddata.trimmed.1.fastq -2 /storage/home/epb5360/scratch/kneaded/sun2018/SRR7721904_rename_1_kneaddata.trimmed.2.fastq --un-pair /storage/home/epb5360/scratch/kneaded/sun2018/SRR7721904_rename_1_kneaddata_hg37dec_v0.1_bowtie2_paired_clean_%.fastq --al-pair /storage/home/epb5360/scratch/kneaded/sun2018/SRR7721904_rename_1_kneaddata_hg37dec_v0.1_bowtie2_paired_contam_%.fastq -U /storage/home/epb5360/scratch/kneaded/sun2018/SRR7721904_rename_1_kneaddata.trimmed.single.1.fastq,/storage/home/epb5360/scratch/kneaded/sun2018/SRR7721904_rename_1_kneaddata.trimmed.single.2.fastq --un-single /storage/home/epb5360/scratch/kneaded/sun2018/SRR7721904_rename_1_kneaddata_hg37dec_v0.1_bowtie2_unmatched_%_clean.fastq --al-single /storage/home/epb5360/scratch/kneaded/sun2018/SRR7721904_rename_1_kneaddata_hg37dec_v0.1_bowtie2_unmatched_%_contam.fastq -S /dev/null`

---

<div class="post-metadata">

**Author:** ![Joao-Gatica](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/joao-gatica/32/1081_2.png) [@Joao-Gatica](https://forum.biobakery.org/u/Joao-Gatica)\
**Post date:** [November 8, 2021, 11:10am UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/2 "2021-11-08T11:10:19Z")

</div>

Hi  
I obtain the same error

Error message returned from bowtie2 :  
perl: warning: Setting locale failed.  
perl: warning: Please check that your locale settings:  
LANGUAGE = “en\_IL:en”,  
LC\_ALL = (unset),  
LC\_CTYPE = “C.UTF-8”,  
LANG = “en\_IL”  
are supported and installed on your system.  
perl: warning: Falling back to the standard locale (“C”).  
/home/mybiotics/miniconda3/bin/bowtie2-align-s: error while loading shared libraries: libtbb.so.2: cannot open shared object file: No such file or directory  
(ERR): Description of arguments failed!  
Exiting now …  
Unable to run bowtie2:

---

<div class="post-metadata">

**Author:** ![huizhen-yan](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/huizhen-yan/32/1159_2.png) [@huizhen-yan](https://forum.biobakery.org/u/huizhen-yan)\
**Post date:** [December 18, 2021, 7:01am UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/4 "2021-12-18T07:01:21Z")

</div>

Hi,  
EmilyB,  
Have you solved the error executing: kneaddata\_bowtie2\_discordant\_pairs???  
I got the same error, and error.log was attached.  
Look forward to your reply.  
[yan-kneaddata-error.log.txt](https://forum.biobakery.org/uploads/short-url/yp4UJfmEUi2TWKaut3y6p0ZWzuK.txt) (19.8 KB)

---

<div class="post-metadata">

**Author:** ![jorondo1](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/jorondo1/32/1312_2.png) [@jorondo1](https://forum.biobakery.org/u/jorondo1)\
**Post date:** [March 2, 2022, 10:09pm UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/5 "2022-03-02T22:09:41Z")

</div>

Hi everyone  
I ran into the same error, has anyone solved this ?  
I am decontaminating two genomes (human + a plant). The log shows the human decontamination worked, but the error happens afterwards, with the plant genome. I supplied the --very-sensitive-local option to bowtie2 via kneaddata. The end of the log (after the error message similar to @EmilyB 's is :

Error message returned from bowtie2 :  
87015042 reads; of these:  
87015042 (100.00%) were unpaired; of these:  
86283017 (99.16%) aligned 0 times  
415099 (0.48%) aligned exactly 1 time  
316926 (0.36%) aligned \>1 times  
0.84% overall alignment rate  
Traceback (most recent call last):  
File “/project/def-ilafores/common/kneaddata/bin/kneaddata\_bowtie2\_discordant\_pairs”, line 8, in   
sys.exit(main())  
File “/project/def-ilafores/common/kneaddata/lib/python3.7/site-packages/kneaddata/bowtie2\_discordant\_pairs.py”, line 271, in main  
process\_alignments(args.sam,args.al\_pair,args.un\_pair,args.al\_single,args.un\_single,args.mode)  
File “/project/def-ilafores/common/kneaddata/lib/python3.7/site-packages/kneaddata/bowtie2\_discordant\_pairs.py”, line 244, in process\_alignments  
organize\_alignments\_single(sam,open\_files,counts,mode)  
File “/project/def-ilafores/common/kneaddata/lib/python3.7/site-packages/kneaddata/bowtie2\_discordant\_pairs.py”, line 164, in organize\_alignments\_single  
for line in file\_handle:  
OSError: [Errno 5] Input/output error

In case it helps, I built my plant genome index from this assembly : [https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/002/425/GCF\_000002425.4\_Phypa\_V3/GCF\_000002425.4\_Phypa\_V3\_genomic.fna.gz](https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/002/425/GCF_000002425.4_Phypa_V3/GCF_000002425.4_Phypa_V3_genomic.fna.gz)

---

<div class="post-metadata">

**Author:** ![auas](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@auas](https://forum.biobakery.org/u/auas)\
**Post date:** [September 21, 2022, 10:13am UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/6 "2022-09-21T10:13:23Z")

</div>

I got the same error, did you manage to solve it?

Best,  
Shen

---

<div class="post-metadata">

**Author:** ![Yuan\_Zhang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/yuan_zhang/32/2040_2.png) [@Yuan\_Zhang](https://forum.biobakery.org/u/Yuan_Zhang)\
**Post date:** [March 11, 2023, 12:31pm UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/7 "2023-03-11T12:31:11Z")

</div>

Hi，I got the same error, did you manage to solve it?  
I don’t know if the problem is coming from KneadData or bowtie2?  
Look forward to your reply.

---

<div class="post-metadata">

**Author:** ![lauren.j.mciver](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lauren.j.mciver](https://forum.biobakery.org/u/lauren.j.mciver)\
**Post date:** [March 17, 2023, 1:55pm UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/8 "2023-03-17T13:55:21Z")

</div>

Hello, Sorry for the slow response. Is it possible you are running out of disk space?

Thank you,  
Lauren

---

<div class="post-metadata">

**Author:** ![lauren.j.mciver](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lauren.j.mciver](https://forum.biobakery.org/u/lauren.j.mciver)\
**Post date:** [March 17, 2023, 1:57pm UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/9 "2023-03-17T13:57:37Z")

</div>

Hello @Joao-Gatica , Sorry for the slow response. Thank you for posting the detailed error. This error looks like an issue with the perl installation. If you add the shared library “libtbb.so.2” it should resolve the error.

Thank you,  
Lauren

---

<div class="post-metadata">

**Author:** ![lauren.j.mciver](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lauren.j.mciver](https://forum.biobakery.org/u/lauren.j.mciver)\
**Post date:** [March 17, 2023, 1:58pm UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/10 "2023-03-17T13:58:54Z")

</div>

Hi @EmilyB , Sorry for the slow response. That looks like a good amount of memory. Is it possible you are running out of disk space? If not, can you run the kneaddata\_bowtie2\_discordant\_pairs command directly and see if it provides additional error information?

Thank you,  
Lauren

---

<div class="post-metadata">

**Author:** ![rakat01129](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/rakat01129/32/2418_2.png) [@rakat01129](https://forum.biobakery.org/u/rakat01129)\
**Post date:** [September 21, 2023, 7:17pm UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/11 "2023-09-21T19:17:43Z")

</div>

In my case, the path of bowtie2 was set to different directory with kneaddata installed directory. I fixed with the option --bowtie2 $kneaddata\_bowtie2\_dir(bin/). It worked well.

---

<div class="post-metadata">

**Author:** ![qbdong122](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/qbdong122/32/2545_2.png) [@qbdong122](https://forum.biobakery.org/u/qbdong122)\
**Post date:** [November 22, 2023, 7:38am UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/12 "2023-11-22T07:38:35Z")

</div>

I have the same issue. Could you have ever solved this?

---

<div class="post-metadata">

**Author:** ![young](https://avatars.discourse-cdn.com/v4/letter/y/258eb7/32.png) [@young](https://forum.biobakery.org/u/young)\
**Post date:** [March 13, 2024, 2:25am UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/13 "2024-03-13T02:25:41Z")

</div>

I got the same error ,and I ran into another error when I run the bowtie2 again:  
Segmentation fault (core dumped)

---

<div class="post-metadata">

**Author:** ![smh](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@smh](https://forum.biobakery.org/u/smh)\
**Post date:** [April 17, 2024, 3:51pm UTC](https://forum.biobakery.org/t/kneaddata-critical-error-in-bowtie2-discordant-pairs/2625/14 "2024-04-17T15:51:49Z")

</div>

Having the same issue. Does not seem to be a memory or disk space issue. Any updates?
