<ol>
<li>It's not an unreasonable approach. rMATs is rather picky about its input, but it seems you've noticed that.</li>
<li>rMATs can't handle trimmed reads. It also can't handle soft-clipped reads. You might as well not trim. You'll get a lower alignment rate, but your only other choice would be to either exclude the trimmed reads or trim everything down to the same length.</li>
<li>You have a mixture of RF and FR alignments and the plotting script can't handle that.</li>
<li>Assuming you mean the read length distribution, it's actually shifted to the left, not the right. You had a single length before and a long left tail after trimming.</li>
</ol>

CC BY-SA 3.0
2017-07-22T02:05:44.703Z
How does one get a mixture of RF and FR, when the library was FR ? doesn't that mean the alignment is doubt full as well?
novicebioinforesearcher
CC BY-SA 3.0
2017-07-22T10:16:39.923Z
@novicebioinforesearcher That's a very good question and not one that I have a good answer for.
Devon Ryan
CC BY-SA 3.0
2017-07-21T22:19:44.113Z
2017-07-21T22:19:44.113Z
Devon Ryan
<p>I have a problem here with my rna seq data:</p>
<h1>Sequencing details:</h1>
<p>rRNA was removed, followed by cDNA preparation and generation of stranded libraries using the TruSeq Stranded Total RNA Sample Prep Kit. Sequencing performed on the HiSeq2500 platform (Illumina) to generate 2 × 125 bp paired-end reads</p>
<h1>Alignment and preprocessing</h1>
<p>reads were aligned using tophat2(std aligner in pipeline at core (<code>--library-type fr-firststrand</code>), unfortunately the original unaligned files were purged and i only have access to this aligned file which i converted to fastq using following steps</p>
<ol>
<li><code>samtools sort -n sample.bam -o sample_sorted.bam</code></li>
<li><code>bedtools bamtofastq -i sample_sorted.bam -fq sample_1.fq -fq2 sample_2.fq</code> (get a lot of mate skipping errors here)</li>
<li>check for these reads for adapters and trim them and again use hisat2 (with <code>--rna-strandness RF</code>)</li>
</ol>
<h1>trimmed reads</h1>
<p>Reads were trimmed by passing parameters <code>--adapters adapters.file --adapter-trim-end RIGHT --length-dist --threads 12 --adapter-min-overlap 7 --max-uncalled 250 --min-read-length 25 --</code> to FLEXBAR version 2.4</p>
<h2>adapters for all samples using multiqc</h2>
<p><a href="https://i.sstatic.net/IsVW7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IsVW7.png" alt="enter image description here" /></a></p>
<h2>fastqc sequence length pre trimming</h2>
<p><a href="https://i.sstatic.net/fPONe.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/fPONe.png" alt="enter image description here" /></a></p>
<h2>fastqc sequence length post trimming</h2>
<p><a href="https://i.sstatic.net/3nY5A.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3nY5A.png" alt="enter image description here" /></a></p>
<h2>rmats error</h2>
<blockquote>
<p>Incorrect readLength. sample.bam has a read length of 114, while readLength param is 125</p>
</blockquote>
<h2>picard error on aligned bam from hisat2)</h2>
<blockquote>
<p>ProcessExecutor   <a href="https://i.sstatic.net/fPONe.png" rel="nofollow noreferrer">2</a> &quot;Not creating insert size PDF as there are duplicated header names: All_Reads&quot;</p>
</blockquote>
<h2>snapshot of picard insertsize metrics file</h2>
<p><a href="https://i.sstatic.net/lgeHk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lgeHk.png" alt="enter image description here" /></a></p>
<h1>Questions</h1>
<ol>
<li>Is my approach flawed at some step?</li>
<li>why do i get different read lengths error for each sample when i process it through rmats when i specify len as 125?</li>
<li>why is no histogram being produced when using picard insertsize metrics?</li>
<li>is normal to see the graph shift to the right after trimming?</li>
</ol>
<h1>insertsize for all samples (data from picard collectinsertsize compiled using multiqc)</h1>
<p><a href="https://i.sstatic.net/l3A9I.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/l3A9I.png" alt="enter image description here" /></a></p>

<rna-seq><rna-splicing><trimming>
insert size pre and post trimming
# insert size pre and post trimming

(Asked by: username_0 on 2017-07-21)

I have a problem here with my rna seq data:

# Sequencing details:

rRNA was removed, followed by cDNA preparation and generation of stranded libraries using the TruSeq Stranded Total RNA Sample Prep Kit. Sequencing performed on the HiSeq2500 platform (Illumina) to generate 2 × 125 bp paired-end reads

# Alignment and preprocessing

reads were aligned using tophat2(std aligner in pipeline at core (`--library-type fr-firststrand`), unfortunately the original unaligned files were purged and i only have access to this aligned file which i converted to fastq using following steps

1. `samtools sort -n sample.bam -o sample_sorted.bam`
2. `bedtools bamtofastq -i sample_sorted.bam -fq sample_1.fq -fq2 sample_2.fq` (get a lot of mate skipping errors here)
3. check for these reads for adapters and trim them and again use hisat2 (with `--rna-strandness RF`)

# trimmed reads

Reads were trimmed by passing parameters `--adapters adapters.file --adapter-trim-end RIGHT --length-dist --threads 12 --adapter-min-overlap 7 --max-uncalled 250 --min-read-length 25 --` to FLEXBAR version 2.4

## adapters for all samples using multiqc

[![enter image description here](https://i.sstatic.net/IsVW7.png)](https://i.sstatic.net/IsVW7.png)

## fastqc sequence length pre trimming

[![enter image description here](https://i.sstatic.net/fPONe.png)](https://i.sstatic.net/fPONe.png)

## fastqc sequence length post trimming

[![enter image description here](https://i.sstatic.net/3nY5A.png)](https://i.sstatic.net/3nY5A.png)

## rmats error

> Incorrect readLength. sample.bam has a read length of 114, while readLength param is 125

## picard error on aligned bam from hisat2)

> ProcessExecutor [2](https://i.sstatic.net/fPONe.png) "Not creating insert size PDF as there are duplicated header names: All\_Reads"

## snapshot of picard insertsize metrics file

[![enter image description here](https://i.sstatic.net/lgeHk.png)](https://i.sstatic.net/lgeHk.png)

# Questions

1. Is my approach flawed at some step?
2. why do i get different read lengths error for each sample when i process it through rmats when i specify len as 125?
3. why is no histogram being produced when using picard insertsize metrics?
4. is normal to see the graph shift to the right after trimming?

# insertsize for all samples (data from picard collectinsertsize compiled using multiqc)

[![enter image description here](https://i.sstatic.net/l3A9I.png)](https://i.sstatic.net/l3A9I.png)

**Tags:** rna-seq, rna-splicing, trimming

---

## 1 answers

### Answer by username_1 on 2017-07-21. Score: 4 | Accepted answer

1. It's not an unreasonable approach. rMATs is rather picky about its input, but it seems you've noticed that.
2. rMATs can't handle trimmed reads. It also can't handle soft-clipped reads. You might as well not trim. You'll get a lower alignment rate, but your only other choice would be to either exclude the trimmed reads or trim everything down to the same length.
3. You have a mixture of RF and FR alignments and the plotting script can't handle that.
4. Assuming you mean the read length distribution, it's actually shifted to the left, not the right. You had a single length before and a long left tail after trimming.

> **Comments:**
> **username_0**: How does one get a mixture of RF and FR, when the library was FR ? doesn't that mean the alignment is doubt full as well?  
> **username_1**: @novicebioinforesearcher That's a very good question and not one that I have a good answer for.  

---

