Skip to content

Commit 5877420

Browse files
committed
combine gtdb and user data
1 parent 55b4f27 commit 5877420

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

generate_customdatabase.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,55 @@ Remaining bins are clustered by pairwise ANI (default 95%, aligned fraction ≥
207207
4. **Isolate genome names must match bin filenames.**
208208

209209
5. **The `unclassified_clusterrepresentatives_gtdbtkspecies_ani_connections.tsv` file is a diagnostic resource.** It lists novel-cluster representatives whose ANI to a known GTDB-Tk species representative meets or exceeds that species' ANI radius. This happens when unclassified cluster representatives have lower ANI to the GTDB reference species than the representatives selected from the user's input dataset.
210+
211+
212+
### Building a unified species-level database: integrating MAGmax dereplication results with GTDB reference genomes
213+
214+
The `unifygtdb.sh` script combines magmax customdb output and GTDB reference genomes. This is useful when users wants to create a complete species-level genome reference database including all known species and unknown species covered in the input data.
215+
216+
217+
bash unifygtdb.sh gtdb_taxonomy.tsv gtdbtk_species_representatives.tsv memberships.tsv > unified.tsv
218+
219+
The script takes three inputs in this specific order:
220+
1. **GTDB taxonomy file** — full GTDB genomes with their taxonomy assignments
221+
222+
Example: `gtdb_taxonomy.tsv`
223+
RS_GCF_000016525.1 d__Archaea;p__Methanobacteriota;c__Methanobacteria;o__Methanobacteriales;f__Methanobacteriaceae;g__Methanocatella;s__Methanocatella smithii
224+
GB_GCA_002686525.1 d__Archaea;p__Thermoplasmatota;c__Poseidoniia;o__Poseidoniales;f__Thalassarchaeaceae;g__MGIIb-O2;s__MGIIb-O2 sp002686525
225+
RS_GCF_000970205.1 d__Archaea;p__Halobacteriota;c__Methanosarcinia;o__Methanosarcinales;f__Methanosarcinaceae;g__Methanosarcina;s__Methanosarcina mazei
226+
227+
2. **GTDB-Tk species representatives selected from the user data** — the representatives from `magmax customdb` run that were classified by GTDB-Tk
228+
229+
Example: `gtdbtk_species_representatives.tsv`
230+
#gtdbtk_species_representative species_name
231+
38222_26_bin.5 d__Bacteria;p__Bacillota;c__Bacilli;o__Staphylococcales;f__Staphylococcaceae;g__Staphylococcus;s__Staphylococcus haemolyticus
232+
38222_27_bin.1 d__Archaea;p__Halobacteriota;c__Methanosarcinia;o__Methanosarcinales;f__Methanosarcinaceae;g__Methanosarcina;s__Methanosarcina mazei
233+
38222_27_bin.4 d__Bacteria;p__Bacillota;c__Bacilli;o__Lactobacillales;f__Streptococcaceae;g__Streptococcus;s__
234+
235+
3. **Membership file** — the complete representative list from your `magmax customdb` output
236+
237+
Example:`memberships.tsv`
238+
#representative member_genomes
239+
38222_26_bin.5
240+
38222_27_bin.1 38510_111_bin.22,38510_42_bin.1,39907_150_bin.19,39923_2#63_bin.6,47680_139_bin.10,47681_116_bin.15
241+
38222_27_bin.4 38354_3_bin.7,38354_18_bin.10,38510_115_bin.7,38510_4_bin.3
242+
243+
244+
### Output
245+
246+
A tab-separated file with two columns:
247+
- **Column 1**: MAGmax customdb representative genomes + GTDB representative genomes whose species are not covered in the user input data
248+
- **Column 2**: Matching GTDB reference genome for common species, or `unknown` if no match found
249+
250+
Example: `unified.tsv`
251+
```
252+
#user_representative gtdb_representative
253+
38222_26_bin.5 RS_GCF_006094395.1
254+
38222_27_bin.1 RS_GCF_000970205.1
255+
38222_27_bin.4 unknown
256+
RS_GCF_000016525.1 RS_GCF_000016525.1
257+
GB_GCA_002686525.1 GB_GCA_002686525.1
258+
...
259+
...
260+
remaining GTDB reference genomes
261+
```

0 commit comments

Comments
 (0)