# Merging Metadata for Meta-Analysis

**URL:** https://forum.qiime2.org/t/merging-metadata-for-meta-analysis/5752
**Category:** Ideas and Suggestions
**Tags:** pending-development
**Created:** [August 24, 2018, 7:43pm UTC](https://forum.qiime2.org/t/merging-metadata-for-meta-analysis/5752 "2018-08-24T19:43:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Stephanieorch](https://forum.qiime2.org/user_avatar/forum.qiime2.org/stephanieorch/32/4269_2.png) [@Stephanieorch](https://forum.qiime2.org/u/Stephanieorch)
#### Post date: [August 24, 2018, 7:43pm UTC](https://forum.qiime2.org/t/merging-metadata-for-meta-analysis/5752/1 "2018-08-24T19:43:52Z")

</div>

It would be nice if there was a command that would be able to merge 2 metadata files from different studies. It could check for the columns that aren't present in both and fill the samples that didn't collect this information with a null value, such as "not collected". Then, if column headers match, just add the values from the samples from the other study. It would make running meta-analyses in Qiime2 much easier for users.

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [August 27, 2018, 1:31pm UTC](https://forum.qiime2.org/t/merging-metadata-for-meta-analysis/5752/2 "2018-08-27T13:31:25Z")

</div>

Hi @Stephanieorch,  
Neat idea! We have an [open feature request](https://github.com/qiime2/q2-metadata/issues/11) describing this issue, and discussing the current limitations (namely, :qiime2: does not have a metadata output type).

In the mean time, [qiime1 has a method to do this](http://qiime.org/scripts/merge_mapping_files.html).

I hope that helps!

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [August 27, 2018, 2:55pm UTC](https://forum.qiime2.org/t/merging-metadata-for-meta-analysis/5752/3 "2018-08-27T14:55:17Z")

</div>

Also, `metadata tabulate` will merge metadata and allow you to download the merged TSV from the viz, but it only supports the `INNER JOIN` operation at the moment --- useful for samples from the same study, but not helpful when combining studies.

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [November 29, 2019, 12:56pm UTC](https://forum.qiime2.org/t/merging-metadata-for-meta-analysis/5752/5 "2019-11-29T12:56:36Z")

</div>


