<p>The issue was that we downsampled with useGalaxy's SeqTK tool prior to running  UMI-tools and cutadapt (the 2nd and 3rd process, respectively, of Quantitative Sequencing Pool Analysis).</p>
<p>I tried downsampling with the R1 data, available after cutadapt (located in the &quot;trimmed&quot; folder), and everything ran fine. I believe the issues were caused by the barcode sequences being removed by the SeqTK tool prior to running UMI-tools.</p>
<p>You can (somewhat) customize the QSPA script by #'ing out parts of the script that you don't want to run. In this case, I #'d out Star Aligner, UMI-tools (deduplication), and Feature Counts so that the script would stop after cutadapt. After I downsampled with SeqTK, I ran the script using only the parts that I had previously #'d out.</p>

CC BY-SA 4.0
2021-12-01T19:24:50.243Z
2021-12-01T19:24:50.243Z
Allen Schweickart
<p>I am using Lexogen's Quantitative Sequencing Pool Analysis tool (here: <a href="https://github.com/Lexogen-Tools/quantseqpool_analysis" rel="nofollow noreferrer">https://github.com/Lexogen-Tools/quantseqpool_analysis</a>) to analyze R1 and R2 files.</p>
<p>I have been able to successfully run this tool. However, I need to downsample and then normalize these results so I need to do this all again.</p>
<p>To downsample, I put the R1s (the ones generated after idemultiplexing) through the SeqTK_sample tool on UseGalaxy. Afterwards, I ran the QSPA tool with the new R1s and old R2s. I skipped the idemultiplexing part by # out the code. This is generating errors (screenshots are attached). I don't think these errors are from me # out the code but rather from the new R1s with the old R2s. I didn't receive any errors the first time I ran this tool.</p>
<p>I will be normalizing my data with DESeq2 using the summary_unique.tsv file.</p>
<p>If anyone has any tips/suggestions it would be much appreciated. I am sure there is a better way to do this. If you require anything from me just ask!</p>
<p>Cheers,</p>
<p><a href="https://i.sstatic.net/L7UtS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/L7UtS.png" alt="enter image description here" /></a></p>
<p><a href="https://i.sstatic.net/Cqyex.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Cqyex.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2021-11-19T18:16:07.933Z
I don't know anything about this software in particular, but the traceback in the first screenshot makes it look like a compressed file is truncated.  QuantSeqPool calls [cutadapt](https://github.com/marcelm/cutadapt/) which in a roundabout way uses [isal-l](https://github.com/intel/isa-l) which uses `isal.igzip` which finally gives the "Compressed file ended" error.  I'd back up a step and look into what file is being given to cutadapt and why it's truncated.
Jesse
CC BY-SA 4.0
2021-11-19T18:51:10.797Z
Thanks for the advice, Jesse!

I compressed these files and loaded them onto the server. I then unzipped them using jar xf as conventional unzip methods weren't working. Do you think this could be an issue?
Allen Schweickart
CC BY-SA 4.0
2021-11-26T18:00:08.277Z
Sorry for the delay. I wonder if something went wrong during that process (truncated zip file?) and that might explain why "conventional" tools weren't working for you to unzip.  I'd suggest using a checksum program on both your local copy and the server copy (`md5sum`, `sha256sum`, whatever's available) and re-uploading any files that don't match.
Jesse
CC BY-SA 4.0
2021-12-01T15:39:51.087Z
I ended up figuring things out. I will post the solution for others to see.
Allen Schweickart
<sequence-analysis>
How should I downsample and normalize R1s and R2s and incorporate this into Lexogen's QSPA tool
# How should I downsample and normalize R1s and R2s and incorporate this into Lexogen's QSPA tool

(Asked by: username_0 on 2021-11-19)

I am using Lexogen's Quantitative Sequencing Pool Analysis tool (here: <https://github.com/Lexogen-Tools/quantseqpool_analysis>) to analyze R1 and R2 files.

I have been able to successfully run this tool. However, I need to downsample and then normalize these results so I need to do this all again.

To downsample, I put the R1s (the ones generated after idemultiplexing) through the SeqTK\_sample tool on UseGalaxy. Afterwards, I ran the QSPA tool with the new R1s and old R2s. I skipped the idemultiplexing part by # out the code. This is generating errors (screenshots are attached). I don't think these errors are from me # out the code but rather from the new R1s with the old R2s. I didn't receive any errors the first time I ran this tool.

I will be normalizing my data with DESeq2 using the summary\_unique.tsv file.

If anyone has any tips/suggestions it would be much appreciated. I am sure there is a better way to do this. If you require anything from me just ask!

Cheers,

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

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

**Tags:** sequence-analysis
> **Comments:**
> **username_1**: I don't know anything about this software in particular, but the traceback in the first screenshot makes it look like a compressed file is truncated.  QuantSeqPool calls [cutadapt](https://github.com/marcelm/cutadapt/) which in a roundabout way uses [isal-l](https://github.com/intel/isa-l) which uses `isal.igzip` which finally gives the "Compressed file ended" error.  I'd back up a step and look into what file is being given to cutadapt and why it's truncated.  
> **username_0**: Thanks for the advice, Jesse!  I compressed these files and loaded them onto the server. I then unzipped them using jar xf as conventional unzip methods weren't working. Do you think this could be an issue?  
> **username_1**: Sorry for the delay. I wonder if something went wrong during that process (truncated zip file?) and that might explain why "conventional" tools weren't working for you to unzip.  I'd suggest using a checksum program on both your local copy and the server copy (`md5sum`, `sha256sum`, whatever's available) and re-uploading any files that don't match.  
> **username_0**: I ended up figuring things out. I will post the solution for others to see.  

---

## 1 answers

### Answer by username_0 on 2021-12-01. Score: 0 | Accepted answer

The issue was that we downsampled with useGalaxy's SeqTK tool prior to running UMI-tools and cutadapt (the 2nd and 3rd process, respectively, of Quantitative Sequencing Pool Analysis).

I tried downsampling with the R1 data, available after cutadapt (located in the "trimmed" folder), and everything ran fine. I believe the issues were caused by the barcode sequences being removed by the SeqTK tool prior to running UMI-tools.

You can (somewhat) customize the QSPA script by #'ing out parts of the script that you don't want to run. In this case, I #'d out Star Aligner, UMI-tools (deduplication), and Feature Counts so that the script would stop after cutadapt. After I downsampled with SeqTK, I ran the script using only the parts that I had previously #'d out.


---

