<p>There are several things you can try. For example, Simka (<a href="https://github.com/GATB/simka" rel="nofollow noreferrer">https://github.com/GATB/simka</a>) is tool that compares the profiles of the genomic content of fastq files and generates several types of plots e.g. heatmap.</p>
<p>Another tool that might be useful is <a href="https://multiqc.info/" rel="nofollow noreferrer">multifastqc</a> (<a href="https://multiqc.info/" rel="nofollow noreferrer">https://multiqc.info/</a>), which aggregates results and has multiple options.</p>

CC BY-SA 4.0
2022-10-19T13:11:21.083Z
2022-10-19T13:11:21.083Z
aLbAc
<p>My goal is to compare reads from two different fastq files on a Linux machine.
The following are the comparisons to perform:</p>
<ol>
<li>How many common reads are between the two fastq files?</li>
<li>How many reads are present in one fastq file that are not present in the other? i.e reads that are unique to each file.</li>
<li>Where and how do the sequences differ in both files? Is there a difference in nucleotide base at the end of the sequence(3' end), the start of the sequence(5'end) or is it somewhere in the middle of the sequence? Is there a difference in length of the sequence? If so, what is the length and what is the difference? I would like to get the original sequences plus the difference between them for analysis.</li>
<li>Does the quality score differ? Where and how do the quality of sequences differs?</li>
</ol>
<p>Any guidance regarding how to approach this question is very appreciated.</p>
<p>Edit: I'm working on paired-end reads from the same individual. What I want to do is to compare different trimming tools from their output.</p>

CC BY-SA 4.0
2022-10-17T14:51:49.737Z
Are you expecting the files to be similar? Are these WGS samples? Targeted? Using the same assay? Are they reads from the same individual? Same species but different individuals? Different species? The details will depend on how many differences you expect. Also, this is a whole project, what do you have so far, and what do you need from us?
terdon
CC BY-SA 4.0
2022-10-17T17:38:37.537Z
Are you **absolutely sure** that comparing the files at this level is the right way to go about answering whatever questions you have?  Fastqs have millions and millions of reads, you really want to find the differences on a letter by letter basis?
swbarnes2
CC BY-SA 4.0
2022-10-18T20:35:52.523Z
Please show example input files (with enough lines to make the problem obvious), and example output
gringer
CC BY-SA 4.0
2022-10-19T05:12:46.887Z
https://github.com/OpenGene/fastp
Maximilian Press
CC BY-SA 4.0
2022-10-22T11:13:02.997Z
I doubt anyone has time nor energy to write full code for you to do this but I would start with Bio.SeqIO from BioPython, you could start here: https://www.biostars.org/p/147317/
Avamys
<python><fastq><reads>
Comparison of fastq files reads
# Comparison of fastq files reads

(Asked by: username_0 on 2022-10-17)

My goal is to compare reads from two different fastq files on a Linux machine.
The following are the comparisons to perform:

1. How many common reads are between the two fastq files?
2. How many reads are present in one fastq file that are not present in the other? i.e reads that are unique to each file.
3. Where and how do the sequences differ in both files? Is there a difference in nucleotide base at the end of the sequence(3' end), the start of the sequence(5'end) or is it somewhere in the middle of the sequence? Is there a difference in length of the sequence? If so, what is the length and what is the difference? I would like to get the original sequences plus the difference between them for analysis.
4. Does the quality score differ? Where and how do the quality of sequences differs?

Any guidance regarding how to approach this question is very appreciated.

Edit: I'm working on paired-end reads from the same individual. What I want to do is to compare different trimming tools from their output.

**Tags:** python, fastq, reads
> **Comments:**
> **username_1**: Are you expecting the files to be similar? Are these WGS samples? Targeted? Using the same assay? Are they reads from the same individual? Same species but different individuals? Different species? The details will depend on how many differences you expect. Also, this is a whole project, what do you have so far, and what do you need from us?  
> **username_2**: Are you **absolutely sure** that comparing the files at this level is the right way to go about answering whatever questions you have?  Fastqs have millions and millions of reads, you really want to find the differences on a letter by letter basis?  
> **username_3**: Please show example input files (with enough lines to make the problem obvious), and example output  
> **username_4**: https://github.com/OpenGene/fastp  
> **username_5**: I doubt anyone has time nor energy to write full code for you to do this but I would start with Bio.SeqIO from BioPython, you could start here: https://www.biostars.org/p/147317/  

---

## 1 answers

### Answer by username_6 on 2022-10-19. Score: 1

There are several things you can try. For example, Simka (<https://github.com/GATB/simka>) is tool that compares the profiles of the genomic content of fastq files and generates several types of plots e.g. heatmap.

Another tool that might be useful is [multifastqc](https://multiqc.info/) (<https://multiqc.info/>), which aggregates results and has multiple options.


---

