# Qiime vsearch join-pairs error

**URL:** <https://forum.qiime2.org/t/qiime-vsearch-join-pairs-error/3127>\
**Category:** User Support\
**Tags:** joining, vsearch, paired-end\
**Created:** [February 21, 2018, 6:15pm UTC](https://forum.qiime2.org/t/qiime-vsearch-join-pairs-error/3127 "2018-02-21T18:15:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeongsu\_Kim](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jeongsu_kim/32/4271_2.png) [@Jeongsu\_Kim](https://forum.qiime2.org/u/Jeongsu_Kim)\
**Post date:** [February 21, 2018, 6:15pm UTC](https://forum.qiime2.org/t/qiime-vsearch-join-pairs-error/3127/1 "2018-02-21T18:15:04Z")

</div>

Hi I'm new to qiime2 and having trouble with qiime vsearch join-pairs.  
This is the commad and the error I got.

> qiime vsearch join-pairs --i-demultiplexed-seqs paired-end-demux.qza --o-joined-sequences demux-joined.qza

> Plugin error from vsearch:  
> Command '['vsearch', '--fastq\_mergepairs', '/var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/qiime2-archive-a13po6pp/53743d83-7f36-40e8-9029-450453314b27/data/A11\_10\_L001\_R1\_001.fastq.gz', '--reverse', '/var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/qiime2-archive-a13po6pp/53743d83-7f36-40e8-9029-450453314b27/data/A11\_11\_L001\_R2\_001.fastq.gz', '--fastqout', '/var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/q2-SingleLanePerSampleSingleEndFastqDirFmt-okkwlcbq/A11\_2\_L001\_R1\_001.fastq', '--fastq\_ascii', '33', '--fastq\_minlen', '1', '--fastq\_minovlen', '10', '--fastq\_maxdiffs', '10', '--fastq\_qmin', '0', '--fastq\_qminout', '0', '--fastq\_qmax', '41', '--fastq\_qmaxout', '41']' returned non-zero exit status 1

Thank you for your help in advance!

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [February 21, 2018, 8:21pm UTC](https://forum.qiime2.org/t/qiime-vsearch-join-pairs-error/3127/3 "2018-02-21T20:21:21Z")

</div>

Hi @Jeongsu_Kim!

Could you re-run with `--verbose` or attach the debug log-file which is printed at the end of the error?

Also, what version of QIIME 2 are you running?

Thanks!

---

<div class="post-metadata">

**Author:** ![Jeongsu\_Kim](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jeongsu_kim/32/4271_2.png) [@Jeongsu\_Kim](https://forum.qiime2.org/u/Jeongsu_Kim)\
**Post date:** [February 23, 2018, 4:33pm UTC](https://forum.qiime2.org/t/qiime-vsearch-join-pairs-error/3127/5 "2018-02-23T16:33:43Z")

</div>

> [@Jeongsu\_Kim](#):
>
> qiime vsearch join-pairs --i-demultiplexed-seqs paired-end-demux.qza --o-joined-sequences demux-joined.qza

I tried --verbose but I got an error again..  
I am attaching the error message below.

qiime vsearch join-pairs --verbose --i-demultiplexed-seqs paired-end-demux.qza --o-joined-sequences demux-joined.qza  
Running external command line application. This may print messages to stdout and/or stderr.  
The command being run is below. This command cannot be manually re-run as it will depend on temporary files that no longer exist.

Command: vsearch --fastq\_mergepairs /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/qiime2-archive-5e1m62dz/53743d83-7f36-40e8-9029-450453314b27/data/A1\_0\_L001\_R1\_001.fastq.gz --reverse /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/qiime2-archive-5e1m62dz/53743d83-7f36-40e8-9029-450453314b27/data/A1\_1\_L001\_R2\_001.fastq.gz --fastqout /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/q2-SingleLanePerSampleSingleEndFastqDirFmt-i1o16g9g/A1\_0\_L001\_R1\_001.fastq --fastq\_ascii 33 --fastq\_minlen 1 --fastq\_minovlen 10 --fastq\_maxdiffs 10 --fastq\_qmin 0 --fastq\_qminout 0 --fastq\_qmax 41 --fastq\_qmaxout 41

vsearch v2.7.0\_macos\_x86\_64, 8.0GB RAM, 4 cores

> **[GitHub - torognes/vsearch: Versatile open-source tool for microbiome analysis](https://github.com/torognes/vsearch)**
>
> Versatile open-source tool for microbiome analysis

Merging reads 100%  
199077 Pairs  
190464 Merged (95.7%)  
8613 Not merged (4.3%)

Pairs that failed merging due to various reasons:  
792 too few kmers found on same diagonal  
4 potential tandem repeat  
1727 too many differences  
6080 alignment score too low, or score drop to high  
10 staggered read pairs

Statistics of all reads:  
250.82 Mean read length

Statistics of merged reads:  
454.51 Mean fragment length  
13.02 Standard deviation of fragment length  
0.62 Mean expected error in forward sequences  
0.70 Mean expected error in reverse sequences  
0.87 Mean expected error in merged sequences  
0.44 Mean observed errors in merged region of forward sequences  
0.53 Mean observed errors in merged region of reverse sequences  
0.97 Mean observed errors in merged region  
Running external command line application. This may print messages to stdout and/or stderr.  
The command being run is below. This command cannot be manually re-run as it will depend on temporary files that no longer exist.

Command: gzip /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/q2-SingleLanePerSampleSingleEndFastqDirFmt-i1o16g9g/A1\_0\_L001\_R1\_001.fastq

Running external command line application. This may print messages to stdout and/or stderr.  
The command being run is below. This command cannot be manually re-run as it will depend on temporary files that no longer exist.

Command: vsearch --fastq\_mergepairs /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/qiime2-archive-5e1m62dz/53743d83-7f36-40e8-9029-450453314b27/data/A10\_8\_L001\_R1\_001.fastq.gz --reverse /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/qiime2-archive-5e1m62dz/53743d83-7f36-40e8-9029-450453314b27/data/A10\_9\_L001\_R2\_001.fastq.gz --fastqout /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/q2-SingleLanePerSampleSingleEndFastqDirFmt-i1o16g9g/A10\_1\_L001\_R1\_001.fastq --fastq\_ascii 33 --fastq\_minlen 1 --fastq\_minovlen 10 --fastq\_maxdiffs 10 --fastq\_qmin 0 --fastq\_qminout 0 --fastq\_qmax 41 --fastq\_qmaxout 41

vsearch v2.7.0\_macos\_x86\_64, 8.0GB RAM, 4 cores

> **[GitHub - torognes/vsearch: Versatile open-source tool for microbiome analysis](https://github.com/torognes/vsearch)**
>
> Versatile open-source tool for microbiome analysis

Merging reads 100%  
80574 Pairs  
77990 Merged (96.8%)  
2584 Not merged (3.2%)

Pairs that failed merging due to various reasons:  
165 too few kmers found on same diagonal  
640 too many differences  
1778 alignment score too low, or score drop to high  
1 staggered read pairs

Statistics of all reads:  
250.92 Mean read length

Statistics of merged reads:  
451.85 Mean fragment length  
12.60 Standard deviation of fragment length  
0.59 Mean expected error in forward sequences  
0.74 Mean expected error in reverse sequences  
0.85 Mean expected error in merged sequences  
0.37 Mean observed errors in merged region of forward sequences  
0.46 Mean observed errors in merged region of reverse sequences  
0.83 Mean observed errors in merged region  
Running external command line application. This may print messages to stdout and/or stderr.  
The command being run is below. This command cannot be manually re-run as it will depend on temporary files that no longer exist.

Command: gzip /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/q2-SingleLanePerSampleSingleEndFastqDirFmt-i1o16g9g/A10\_1\_L001\_R1\_001.fastq

Running external command line application. This may print messages to stdout and/or stderr.  
The command being run is below. This command cannot be manually re-run as it will depend on temporary files that no longer exist.

Command: vsearch --fastq\_mergepairs /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/qiime2-archive-5e1m62dz/53743d83-7f36-40e8-9029-450453314b27/data/A11\_10\_L001\_R1\_001.fastq.gz --reverse /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/qiime2-archive-5e1m62dz/53743d83-7f36-40e8-9029-450453314b27/data/A11\_11\_L001\_R2\_001.fastq.gz --fastqout /var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/q2-SingleLanePerSampleSingleEndFastqDirFmt-i1o16g9g/A11\_2\_L001\_R1\_001.fastq --fastq\_ascii 33 --fastq\_minlen 1 --fastq\_minovlen 10 --fastq\_maxdiffs 10 --fastq\_qmin 0 --fastq\_qminout 0 --fastq\_qmax 41 --fastq\_qmaxout 41

vsearch v2.7.0\_macos\_x86\_64, 8.0GB RAM, 4 cores

> **[GitHub - torognes/vsearch: Versatile open-source tool for microbiome analysis](https://github.com/torognes/vsearch)**
>
> Versatile open-source tool for microbiome analysis

Merging reads 99%

Fatal error: Invalid line 139048 in FASTQ file: Sequence and quality lines must be equally long  
Plugin error from vsearch:

Command '['vsearch', '--fastq\_mergepairs', '/var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/qiime2-archive-5e1m62dz/53743d83-7f36-40e8-9029-450453314b27/data/A11\_10\_L001\_R1\_001.fastq.gz', '--reverse', '/var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/qiime2-archive-5e1m62dz/53743d83-7f36-40e8-9029-450453314b27/data/A11\_11\_L001\_R2\_001.fastq.gz', '--fastqout', '/var/folders/vh/l4ckn9311hx8yrvvbfpnh6zh0000gn/T/q2-SingleLanePerSampleSingleEndFastqDirFmt-i1o16g9g/A11\_2\_L001\_R1\_001.fastq', '--fastq\_ascii', '33', '--fastq\_minlen', '1', '--fastq\_minovlen', '10', '--fastq\_maxdiffs', '10', '--fastq\_qmin', '0', '--fastq\_qminout', '0', '--fastq\_qmax', '41', '--fastq\_qmaxout', '41']' returned non-zero exit status 1

---

<div class="post-metadata">

**Author:** ![Jeongsu\_Kim](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jeongsu_kim/32/4271_2.png) [@Jeongsu\_Kim](https://forum.qiime2.org/u/Jeongsu_Kim)\
**Post date:** [February 23, 2018, 4:34pm UTC](https://forum.qiime2.org/t/qiime-vsearch-join-pairs-error/3127/6 "2018-02-23T16:34:01Z")

</div>

Oh! I'm running version qiime2-2018.2

---

<div class="post-metadata">

**Author:** ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)\
**Post date:** [February 23, 2018, 6:11pm UTC](https://forum.qiime2.org/t/qiime-vsearch-join-pairs-error/3127/8 "2018-02-23T18:11:15Z")

</div>

Hi @Jeongsu_Kim, thanks for the details!

Here is the important part of the error message:

> [@Jeongsu\_Kim](#):
>
> Fatal error: Invalid line 139048 in FASTQ file: Sequence and quality lines must be equally long

This means that in either `A11_10_L001_R1_001.fastq.gz` (forward reads) or `A11_11_L001_R2_001.fastq.gz` (reverse reads), there is a FASTQ record starting on line 139048 that is invalid. It appears that the record doesn't have the same number of quality scores as the corresponding sequence's length, which is a requirement of the FASTQ format.

These corrupted FASTQ files would have been imported into `paired-end-demux.qza`. Can you decompress (i.e. `gunzip`) those two files listed above and check that the number of quality scores are exactly the same as the length of the corresponding sequence? Running `qiime tools validate paired-end-demux.qza` may also help with debugging this.

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [March 27, 2018, 12:11am UTC](https://forum.qiime2.org/t/qiime-vsearch-join-pairs-error/3127/10 "2018-03-27T00:11:28Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
