ipb-halle / MetFamily

Understanding metabolism is fundamental in biomedical and plant research and the identification and quantification of thousands of metabolites by mass spectrometry in modern metabolomics is a prerequisite for elucidating this area. However, the identification of metabolites is a major bottleneck in traditional approaches hampering advances. Here, we present a novel approach for the untargeted discovery of metabolite families offering a bird's eye view of metabolic regulation in comparative metabolomics. We implemented the presented methodology in the easy-to-use web application MetFamily to enable the analysis of comprehensive metabolomics studies for all researchers worldwide. MetFamily is available under http://msbi.ipb-halle.de/MetFamily/.
GNU General Public License v3.0
9 stars 8 forks source link

PCA: selecting only certain groups, samples inconsistent #47

Open sneumann opened 4 years ago

sneumann commented 4 years ago

Hi, we got a report in: Today, I found a bug in Metfamily devel. In the PCA, when I selected only for certain groups, the samples that showed up were not consistent between the panel on the left right and individual samples. I have attached the supporting files in the attachment.

image

=> Indeed on the left the group "Water cultivated" is selected, and the tooltip on the right says "Infected wild". Similar below:

image

sneumann commented 4 years ago

So my hypothesis was that there is an indexing issue with the datastructure keeping the information for the PCA Tooltip after subsetting: in the sample table we have e.g. samples 1..70. Those 70 sample informations are used for the tooltips. If subsetting the first two groups, the tooltips still look correct. If subsetting the 1st and 3rd group, the first look good, but the 3rd group has labels coming from the 2nd group. Proposed solution: we need the same subsetting in the tooltips that we also have for the actual data matrix. Alternatively, the indexing for the tooltips should be by sample name, and not index position. Yours, Steffen

Places to continue checking: https://github.com/ipb-halle/MetFamily/blob/22b0f1fb1e66f108c6fe2ef26cb049d6bd7f968a/MetFamily/app_files/server_guiTabPca.R#L608

## compile information
  dataColumnName <- filterPca$sampleSet[[minimumIndex]]
  #dataColumnName <- dataList$dataColumnsNameFunctionFromGroupNames(groups = filterPca$groups, sampleNamesToExclude = dataList$excludedSamples(dataList$groupSampleDataFrame))[[minimumIndex]]

The commented line might hint what solution could be needed. Yours, Steffen