all, I do not know if this easy, but at the moment I can not really figure it out, hence this post.
How can I transform a list to be used for heatmap of the Log2FC values per Metabolite, still associating the values to Name per Folder?
Note that Folder field apart from all, will have 2 more of different names, the Name column has similar entries and so do the metabolites.
There must be something like melt but I can not figure this.
Here is an example of a part of the list.
Note that Metabolite, Name are not unique elements inside the data.frame or acrross the list
The list has 7 of those data frames.
Metabolite Log2FC p.adj t.val Name Folder
81 mevalonate -1.712715 3.532766e-10 14213209.8 minus_Lac-minus_Lac_Ab All
813 mevalonate -1.647945 6.960620e-10 -13926681.0 minus_UT-minus_Lac_Ab All
62 hypotaurine 1.544288 1.522596e-02 305035.0 plus_Lac-minus_Lac_Ab All
814 mevalonate -2.082741 6.584622e-12 -15624886.5 plus_Lac-minus_Lac_Ab All
524 glycerol_3-phosphate -2.530780 5.435970e-04 6104389.5 plus_Lac-plus_Lac_Ab All
8110 mevalonate -1.866464 3.633006e-10 12777477.0 plus_Lac-plus_Lac_Ab All
52 glycerol_3-phosphate 2.524050 8.742028e-04 6098416.6 plus_Lac_Ab-minus_Lac All
811 mevalonate 1.496438 3.485046e-08 11365800.3 plus_Lac_Ab-minus_Lac All
522 glycerol_3-phosphate 2.380956 1.230993e-03 5964600.9 plus_Lac_Ab-minus_UT All
818 mevalonate 1.431668 7.235536e-08 11079271.5 plus_Lac_Ab-minus_UT All
621 hypotaurine 1.712892 1.711302e-03 362580.5 plus_UT-minus_Lac_Ab All
815 mevalonate -1.865592 3.496969e-11 -14840606.6 plus_UT-minus_Lac_Ab All
526 glycerol_3-phosphate -2.467658 6.338064e-04 -6047260.0 plus_UT-plus_Lac_Ab All
8112 mevalonate -1.649315 2.869918e-09 -11993197.0 plus_UT-plus_Lac_Ab All
816 mevalonate -1.581595 6.495749e-10 -13619519.9 Sicca_Lac-minus_Lac_Ab All
527 glycerol_3-phosphate -1.978937 2.578183e-03 -5509185.3 Sicca_Lac-plus_Lac_Ab All
8113 mevalonate -1.365319 7.141499e-08 -10772110.3 Sicca_Lac-plus_Lac_Ab All
8116 mevalonate -1.505976 6.187072e-10 12575065.6 Sicca_Lac-Sicca_Lac_Ab All
521 glycerol_3-phosphate 2.239778 2.018781e-02 4778234.1 Sicca_Lac_Ab-minus_Lac All
812 mevalonate 1.637095 3.444792e-10 13168755.5 Sicca_Lac_Ab-minus_Lac All
523 glycerol_3-phosphate 2.096685 2.680088e-02 4644418.3 Sicca_Lac_Ab-minus_UT All
819 mevalonate 1.572325 7.166284e-10 12882226.7 Sicca_Lac_Ab-minus_UT All
525 glycerol_3-phosphate 2.246509 1.473790e-02 4784207.0 Sicca_Lac_Ab-plus_Lac All
8111 mevalonate 2.007121 4.743206e-12 14580432.2 Sicca_Lac_Ab-plus_Lac All
529 glycerol_3-phosphate 2.183387 1.676495e-02 4727077.4 Sicca_Lac_Ab-plus_UT All
8115 mevalonate 1.789972 2.634526e-11 13796152.3 Sicca_Lac_Ab-plus_UT All
817 mevalonate -1.280383 3.070459e-08 -12032885.7 Sicca_UT-minus_Lac_Ab All
528 glycerol_3-phosphate -2.433671 6.901330e-04 -6015448.0 Sicca_UT-plus_Lac_Ab All
8114 mevalonate -1.064106 4.305677e-06 -9185476.2 Sicca_UT-plus_Lac_Ab All
5210 glycerol_3-phosphate -2.149399 1.800144e-02 -4695265.4 Sicca_UT-Sicca_Lac_Ab All
8117 mevalonate -1.204763 4.049354e-08 -10988431.4 Sicca_UT-Sicca_Lac_Ab All