<p>The <a href="http://www.htslib.org/doc/samtools-view.html" rel="nofollow noreferrer"><code>samtools view</code></a> command you've provided just uses a <a href="http://www.htslib.org/doc/samtools.html#FILTER_EXPRESSIONS" rel="nofollow noreferrer">filter expression</a> to discard records that do not meet the specified expression criteria. In this case, the expression is looking for alignments where the value of the 'rq' (read quality) tag is greater or equal to 0.9. The <a href="https://isoseq.how/isoseq-tags.html" rel="nofollow noreferrer">isoseq tags</a> documentation says that the <em>read quality</em> of the alignment is really the <em>predicted accuracy of the polished isoform</em>. Note that the command produces BAM output, so be sure to redirect stdout or write to a file for example using:</p>
<pre><code>samtools view -b -e '[rq] &gt;= 0.9' -o out.bam flnc.bam
</code></pre>

CC BY-SA 4.0
2023-05-05T21:30:09.480Z
thank you very much!
Aleksandra Greshnova
CC BY-SA 4.0
2023-05-05T01:32:53.523Z
2023-05-05T01:32:53.523Z
Steve
<p>I am working with preprocessed data (IsoSeq PacBio) and I cannot understand one of the steps:</p>
<pre><code>samtools view -b -e [rq] &gt;= 0.9 flnc.bam 
</code></pre>
<p>What exactly was filtered from the bam file?</p>
<p>To obtain flnc they used <a href="https://isoseq.how/getting-started.html" rel="nofollow noreferrer">the standard IsoSeq pipeline</a> (lima -&gt; isoseq3 refine).</p>

<samtools><pacbio>
regex: samtools command to "refine" PacBio IsoSeq data?
# regex: samtools command to "refine" PacBio IsoSeq data?

(Asked by: username_0 on 2023-05-04)

I am working with preprocessed data (IsoSeq PacBio) and I cannot understand one of the steps:
samtools view -b -e [rq] >= 0.9 flnc.bam 

What exactly was filtered from the bam file?
To obtain flnc they used the standard IsoSeq pipeline (lima -> isoseq3 refine).

**Tags:** samtools, pacbio

---

## 1 answers

### Answer by username_1 on 2023-05-05. Score: 2

The samtools view command you've provided just uses a filter expression to discard records that do not meet the specified expression criteria. In this case, the expression is looking for alignments where the value of the 'rq' (read quality) tag is greater or equal to 0.9. The isoseq tags documentation says that the read quality of the alignment is really the predicted accuracy of the polished isoform. Note that the command produces BAM output, so be sure to redirect stdout or write to a file for example using:
samtools view -b -e '[rq] >= 0.9' -o out.bam flnc.bam

> **Comments:**
> **username_0**: thank you very much!  

---

