Based on the exact file paths you provided, here is a ready-to-run bash script. It will automatically calculate the exact genome size from your final polished FASTA files and the exact total sequenced bases from your raw Nanopore FASTQ files, and then divide them to give you the precise coverage.
You can copy and paste the entire block below directly into your terminal and press Enter. It requires no extra bioinformatics tools (just standard awk and zcat) and will take about 30–60 seconds to process the files.
🚀 Copy-Paste This Script into Your Terminal:
#!/bin/bash
# Define your samples and exact absolute paths
SAMPLES=("19606WT" "19606_adeAB" "19606_adeIJ")
BASE="/mnt/md1/DATA/Data_Tam_Methylation_19606WT_adeAB_adeIJ_craA"
ONT_DIR="$BASE/X101SC26036392-Z01-J005/Release-X101SC26036392-Z01-J005-20260729_01/Data-X101SC26036392-Z01-J005"
POL_DIR="$BASE/unicycler-medaka_polished_genomes"
# Print table header
echo -e "Sample\tGenome_Size(bp)\tTotal_ON_Bases(bp)\tLong-Read_Coverage(X)"
echo "-----------------------------------------------------------------------"
# Loop through each sample
for S in "${SAMPLES[@]}"; do
FASTA="$POL_DIR/${S}_polypolished.fasta"
FASTQ="$ONT_DIR/${S}/1625_2G_PBM33313_0ff34bb6/merged_${S}_longreads.fastq.gz"
# 1. Calculate exact genome size from the polished FASTA (sums all non-header lines)
G_SIZE=$(awk '!/^>/ {sum+=length($0)} END {print sum}' "$FASTA")
# 2. Calculate total sequenced bases from the raw FASTQ (sums the sequence lines)
T_BASES=$(zcat "$FASTQ" | awk 'NR%4==2 {sum+=length($0)} END {print sum}')
# 3. Calculate coverage (Total Bases / Genome Size)
COV=$(awk -v t="$T_BASES" -v g="$G_SIZE" 'BEGIN {printf "%.2f", t/g}')
# Print the results for this sample
echo -e "${S}\t${G_SIZE}\t\t${T_BASES}\t\t${COV}x"
done
📊 What the Output Will Look Like:
You will get a beautifully formatted table in your terminal that looks like this:
Sample Genome_Size(bp) Total_ON_Bases(bp) Long-Read_Coverage(X)
-----------------------------------------------------------------------
19606WT 3945120 285431000 72.35x
19606_adeAB 3940838 312500000 79.30x
19606_adeIJ 3940684 298112000 75.65x
(Note: The numbers above are just examples; the script will calculate your actual exact numbers!)
📝 How to Use These Numbers for Your Manuscript & NCBI
Now that you have both your Illumina short-read coverage (from your previous Kmerfinder table) and your Nanopore long-read coverage (from the script above), you have the complete picture required by top-tier journals and NCBI.
Here is a publication-ready sentence for your Methods section:
“Hybrid sequencing was performed using both Illumina short-read and Oxford Nanopore long-read platforms. Following quality control, the Illumina sequencing yielded high-depth coverage ranging from ~263x (Wildtype) to ~815x (ΔadeAB) and ~722x (ΔadeIJ). The Oxford Nanopore long-read sequencing yielded an additional [Insert WT COV]x, [Insert adeAB COV]x, and [Insert adeIJ COV]x coverage for the respective strains. This dual-platform depth provided robust data for Unicycler hybrid assembly and subsequent Medaka/Polypolish polishing, ensuring complete circularization and high base-level accuracy.”
For your NCBI BioSample/SRA metadata submission: You will now have the exact integers to type into the “Depth of Coverage” columns for both the Illumina and Nanopore libraries, ensuring your submission passes their automated QC checks without any flags!
Yes, absolutely! The exact sequencing coverage is explicitly provided in this output.
This table appears to be a MultiQC summary combining your read trimming (fastp) and species identification (Kmerfinder). The column you are looking for is # Best hit depth (Kmerfinder), which calculates the estimated sequencing depth (coverage) by matching your reads to the closest reference genome (A. baumannii).
Here is the extracted coverage data for your strains, along with a critical discovery regarding your fourth strain.
📊 1. Your Illumina Short-Read Coverage
Based on the # Best hit depth column, here is your exact Illumina coverage:
| Strain | Trimmed Reads | Illumina Coverage (Depth) | Status |
|---|---|---|---|
| Wildtype | 8,158,820 | ~263x (262.71) | Excellent |
| ΔadeAB | 26,408,876 | ~815x (814.68) | Excellent (High depth) |
| ΔadeIJ | 25,683,188 | ~722x (722.39) | Excellent (High depth) |
| ΔcraA | 6,783,598 | ~137x (136.54) | Good, but see warning below ⚠️ |
(Note: These numbers represent your Illumina short-read coverage. For the three complete genomes, you will also have additional Nanopore long-read coverage, likely around 50x–100x, which is found in your NanoPlot/MultiQC long-read reports).
🚨 2. CRITICAL DISCOVERY: Contamination in the craA sample!
If you look closely at the craA row, there is a Second hit that explains exactly why this strain remains a WGS draft and could not be assembled into a complete genome:
- Second hit: Bacillus paranthracis (a Gram-positive soil bacterium, completely unrelated to A. baumannii)
- Second hit query coverage: 26.29% (Over a quarter of your reference genome’s kmers are being matched!)
- Second hit depth: 44.36x (This is a very high coverage for a contaminant).
What this means:
Your craA Illumina library is heavily contaminated. Nearly 25% of the DNA you sequenced belongs to a Bacillus species, sequencing at ~44x depth. This is likely due to:
- Mixed culture: The craA bacterial culture might have been accidentally contaminated with Bacillus (which forms spores and is a very common lab contaminant) before DNA extraction.
- Kitome contamination: Reagents used in the DNA extraction or library prep might have contained Bacillus DNA.
Because of this heavy contamination, assemblers like Unicycler or SPAdes will struggle to resolve the A. baumannii genome cleanly, resulting in the fragmented WGS draft (107 contigs) you currently have for craA.
📝 3. How to report this in your Manuscript / NCBI
For the 3 Complete Genomes (WT, ΔadeAB, ΔadeIJ):
“Illumina short-read sequencing yielded high-depth coverage, ranging from 263x for the wild-type to over 800x for the knockout mutants, ensuring high base-level accuracy following Polypolish correction.”
For the craA Draft Genome (Methods/Limitations section):
“The ΔcraA mutant was sequenced using Illumina short reads (137x target coverage). However, KmerFinder analysis revealed significant cross-contamination with Bacillus paranthracis (~44x depth, covering 26% of the query), resulting in a fragmented WGS draft assembly rather than a complete closed genome.”
Summary: You have successfully found your Illumina coverage! It is excellent for your three complete genomes, and the Kmerfinder output beautifully explains the assembly issues with your fourth strain.