Merges a user-supplied metadata table with the latest AncientMetagenomeDir master metadata tables, with on-the-fly validation.


This command would be used when you have a local version of an AncientMetagenomeDir table (samples or libraries) of just the new samples or libraries to add, and want to append to the current master table before submitting a pull request.

You typically only do this if preparing a pull request to the AncientMetagenomeDir repository entirely locally.


The following description assumes you have already prepared an AncientMetagenomeDir samples or libraries table whose rows only consist of the header and new samples to be added.

⚠️ The header, and present columns etc. should match exactly that on the corresponding AncientMetagenomeDir table

Given a new samples table samples_for_new_pr.tsv to be added to the single genome samples table ancientsinglegenome-hostassociated, you can run the following command:

AMDirT merge -n ancientsinglegenome-hostassociated -t samples samples_for_new_pr.tsv

Note that during merge merge will also perform schema validation to ensure the contents of the new rows are valid against the AncientMetagenomeDir schema.


The output of the merge command is a new table with the merged rows named after the table you merged the new rows onto, placed by default in the directory you ran the command from (customisable with -o).

In the example above, the file result would be: ancientsinglegenome-hostassociated_samples.tsv.

The contents of this file can then theoretically be used to submit a pull request to the AncientMetagenomeDir repository.