krumsieklab / maplet

R statistical toolbox for metabolomics
GNU General Public License v3.0
17 stars 6 forks source link

Merge Two SEs #76

Closed KelseyChetnik closed 3 years ago

KelseyChetnik commented 3 years ago

In GitLab by @kelsey.chetnik on Jun 15, 2020, 13:11

Based on earlier concatMetabolon.R scripts and variations of it - don't know if this still applies?

KelseyChetnik commented 3 years ago

Create a merger function to combine two SEs. Must do the following:

KelseyChetnik commented 3 years ago

Questions:

  1. How handle case in which D1 and D2 have features in common?
  2. How handle identical column names? Identical columns?
  3. Should arguments for feature name columns in rowData be provided? Otherwise combining these might be completely disjointed. (Are we assuming that share columns in common? Keeping them separate?)

Assuming because intended for multiomics integration the first two won't typically be issues.

Answers:

  1. make flag argument - crash_on_duplicate - set it to T by default. If crash_on_duplicate=F, add _1 and _2 to end of each duplicate. For colData - take from D1 (default) or D2 - we will assume if sample IDs must be identical, sample annotations should also be identical.
  2. answered above
  3. merge rowData where possible (ensure that the order is the same!)
KelseyChetnik commented 3 years ago

Implemented in 88d27d22b92265af7b760bb20cf98d6508d21ac7.