# Paired input to kneaddata resulting in unpaired files

**URL:** <https://forum.biobakery.org/t/paired-input-to-kneaddata-resulting-in-unpaired-files/6281>\
**Category:** KneadData\
**Created:** [December 4, 2023, 5:24pm UTC](https://forum.biobakery.org/t/paired-input-to-kneaddata-resulting-in-unpaired-files/6281 "2023-12-04T17:24:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kreigema](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@kreigema](https://forum.biobakery.org/u/kreigema)\
**Post date:** [December 4, 2023, 5:24pm UTC](https://forum.biobakery.org/t/paired-input-to-kneaddata-resulting-in-unpaired-files/6281/1 "2023-12-04T17:24:30Z")

</div>

When running kneaddata, my paired input is ending up as entirely unpaired. I have tried adding “/1” and “/2” as a suffix to the read headers, but the kneaddata\_paired.fastq output files are blank while kneaddata\_unpaired.fastq contain all the reads.

It appears that trimmomatic is doing just fine with tracking R1/R2 pairs, but sometime after that step the pairs get lost.

My files are named Sample1.R1.fastq.gz and Sample1.R2.fastq.gz

An example of my R1 and R2 file headers:

```auto
@A00261:821:H75NNDSX7:2:1101:2862:10001:N:0:ATAGCGAAGA+CGCACATTGT/1
@A00261:821:H75NNDSX7:2:1101:2862:10002:N:0:ATAGCGAAGA+CGCACATTGT/2

```

Here is my kneaddata command:

```auto
kneaddata --input1 Sample1.R1.fastq.gz --input2 Sample1.R2.fastq.gz -db /pathtodb/kneaddata_db --output Sample1_kneaddata_output

```

Here is a count of reads in all the output files created:

| | R1 | R2 |
| --- | --- | --- |
| Input Reads | 85,362,781 | 85,362,781 |
| Sample1\_bowtie2\_paired\_contam.fastq | - | - |
| Sample1\_bowtie2\_unmatched.fastq | 23,682 | 6,117 |
| Sample1\_kneaddata\_paired.fastq | - | - |
| Sample1\_kneaddata.repeats.removed.fastq | 80,698,325 | 80,698,490 |
| Sample1\_kneaddata.repeats.removed.unmatched.fastq | 1,909,623 | 1,291,362 |
| Sample1\_kneaddata.trimmed.fastq | 81,153,744 | 81,153,744 |
| Sample1\_kneaddata.trimmed.single.fastq | 1,921,519 | 1,299,530 |
| Sample1\_kneaddata\_unmatched.fastq | 82,584,266 | 81,983,735 |

And version info:

```auto
kneaddata v0.12.0

```

Any help would be greatly appreciated! It’s ok if this is just a bug with kneaddata because I just plan on concatenating the R1/R2 reads to use in Humann analysis, but I do want to make sure that something isn’t going wrong with my analysis before I move onto the next step.

---

<div class="post-metadata">

**Author:** ![vani](https://avatars.discourse-cdn.com/v4/letter/v/c89c15/32.png) [@vani](https://forum.biobakery.org/u/vani)\
**Post date:** [June 29, 2024, 3:20am UTC](https://forum.biobakery.org/t/paired-input-to-kneaddata-resulting-in-unpaired-files/6281/2 "2024-06-29T03:20:39Z")

</div>

I am also getting the same output. zero reads in sample\_kneaddata\_paired\_1.fastq and sample\_kneaddata\_paired\_2.fastq. Even though i have not given the arguement --reorder, while running it says Reordering read identifiers … in the terminal and the logfile still says reorder=False. I assume reordering is causing problems.

Please help in this regard
