Today I took FASTQ file with 3.5M reads, which was Read1 from a paired-end Illumina 100bp run - it was about 883Mb in size. As many have shown before me, GZIP compresses to about 1/4 the size, and BZIP2 about 1/5.
- 883252 R1.fastq
- 233296 R1.fastq.gz
- 182056 R1.fastq.bz2
I then split the read file into 3 separate files: (1) The ID line, but with the mandatory '@' removed, (2) the sequence line, but uppercased for consistency, and (3) the quality line unchanged. It ignored the 3rd line of each FASTQ entry, as it is redundant. This knocked 1% off the total size.
- 189588 id.txt
- 341756 seq.txt
- 341756 qual.txt
- 873100 TOTAL
Now, I compressed each of the three streams (ID, Sequence, Quality) independently with GZIP. The idea is that these dictionary-based compression schemes will work better on more homogeneous data streams, than when they are interleaved in one stream. As you can see this does improve things by about 15%, but still not as good as BZIP2 without de-interleaving.
- 20608 id.txt.gz
- 84096 qual.txt.gz
- 102040 seq.txt.gz
- 206644 TOTAL (was 233296 combined)
If we use BZIP2 to compress the interleaved stream, it does only 5% better than when it was a single stream. This is testament to BZIP2's ability to cope with heterogeneous data streams better than GZIP.
- 16560 id.txt.bz2
- 66812 qual.txt.bz2
- 93564 seq.txt.bz2
- 176936 TOTAL (was 182056 combined)
So in summary, we've re-learnt that BZIP2 is better than GZIP, and that they are both doing quite well adapting to the three interleaved data types in a FASTQ file.
The total for the deinterleaved bzip2 method 4.04 bits per nucleotide in the original file. The DNA is 2.14 bits of that, the qualities are 1.53, and the IDs are 0.37. I think sorting the reads lexographically would probably help both gzip (LZ77) and bzip2 (BWT+).
ReplyDelete
ReplyDeleteLegitimate Crypto Recovery Services - Go to ALPHA RECOVERY EXPERTS
Alpha Recovery Experts has built a reputation for providing specialized cybersecurity and ethical hacking services aimed at helping clients address complex digital asset challenges. One of the key factors that sets Alpha Recovery Experts apart is its focus on ethical hacking methodologies. Ethical hacking involves the use of authorized security techniques to identify vulnerabilities, investigate incidents, and support recovery efforts while adhering to legal and professional standards. By combining technical expertise with a structured investigative approach, the company works to assist clients in understanding what happened to their digital assets and what recovery options may be available.
In addition to recovery services, Alpha Recovery Experts emphasizes cybersecurity awareness and risk mitigation. The company recognizes that preventing future incidents is just as important as addressing existing problems. Through security assessments, best-practice recommendations, and educational guidance, clients can gain valuable insights into protecting their cryptocurrency wallets, accounts, and sensitive digital information from evolving cyber threats.
For individuals and organizations seeking support with cryptocurrency-related security concerns, the company positions itself as a resource focused on technical expertise, ethical practices, and client-centered solutions.
WhatsApp; +44(745)742-4681
Email: (Alpharecoveryexpert@consultant.com)
The Best Recovery Experts for Cryptocurrency Assets / Employ Alpha Recovery Experts
ReplyDeleteThis is my testimony to the good work of ALPHA RECOVERY EXPERTS, a professional team of Bitcoin recovery experts who assisted me in recovering my lost Bitcoin wallet, which contained my assets worth $363,000 Ethereum. I clicked on what I thought was a legitimate link in my email, entered my confidential information, and boom—screen locked, and I could no longer access my cryptocurrency account. Panic set in. I was left terrified and heartbroken. This was all of my life savings. In my internet hunt for a solution, I came upon Alpha Recovery Experts' services, which had received high praises for assisting customers in recovering their digital assets. I promptly decided to reach out for assistance. ALPHA RECOVERY EXPERTS came to my aid and helped me regain access to my wallet. I strongly recommend them for any bitcoin recovery needs.
Email: Alpharecoveryexpert@consultant.com
Homepage: Alpharecoveryexperts.com
Whatsapp/Text, +44(745,742)4681