<pre><code>bioawk -cfastx 'length($seq) &gt; 1 {print "@"$name $comment"\n"$seq"\n+\n"$qual}' in.fq.qz | gzip &gt; out.fq.qz
</code></pre>

<p>Note the addition of <code>$comment</code>, which is what follows the name on the first line of each entry.</p>

CC BY-SA 4.0
2018-09-06T04:04:16.057Z
Space was missing and I had to change it to `{print "@"$name " " $comment"\n"$seq"\n+\n"$qual}`
user977828
CC BY-SA 4.0
2018-09-05T07:19:50.107Z
2018-09-05T07:19:50.107Z
Devon Ryan
<p>I used </p>

<pre><code>bioawk -cfastx 'length($seq) &gt; 1 {print "@"$name"\n"$seq"\n+\n"$qual}' in.fq.qz | gzip &gt; out.fq.qz
</code></pre>

<p>in order to keep a particular read length, but this command shortened the header  from</p>

<pre><code>@A00199:161:HF3JLDMXX:1:1101:5882:1063 2:N:0:CTGTAGCC+GAACAGGC
</code></pre>

<p>to  </p>

<pre><code>@A00199:161:HF3JLDMXX:1:1101:5882:1063
</code></pre>

<p>How is it possible to fix the <code>bioawk</code> command to remain the full command?</p>

<bioawk>
bioawk removed part of FASTQ header
# bioawk removed part of FASTQ header

(Asked by: username_0 on 2018-09-05)

I used 
bioawk -cfastx 'length($seq) > 1 {print "@"$name"\n"$seq"\n+\n"$qual}' in.fq.qz | gzip > out.fq.qz

in order to keep a particular read length, but this command shortened the header  from
@A00199:161:HF3JLDMXX:1:1101:5882:1063 2:N:0:CTGTAGCC+GAACAGGC

to  
@A00199:161:HF3JLDMXX:1:1101:5882:1063

How is it possible to fix the bioawk command to remain the full command?

**Tags:** bioawk

---

## 1 answers

### Answer by username_1 on 2018-09-05. Score: 5 | Accepted answer

bioawk -cfastx 'length($seq) > 1 {print "@"$name $comment"\n"$seq"\n+\n"$qual}' in.fq.qz | gzip > out.fq.qz

Note the addition of $comment, which is what follows the name on the first line of each entry.

> **Comments:**
> **username_0**: Space was missing and I had to change it to `{print "@"$name " " $comment"\n"$seq"\n+\n"$qual}`  

---

