Skip to main content
. 2023 Feb 1;14(2):387. doi: 10.3390/genes14020387
Algorithm 1 Pseudo-code of bootstrap–bagplot algorithm for outlier detection for two study groups.
  • 1:

    Initialize lists to report the samples that are randomly drawn from the original dataset D in the bootstrap runs and the outliers that are detected in each case:

        Samples=[]

        Outliers=[]

  • 2:

    fori=1,2,,Ido

  • 3:

        Create a bootstrap dataset Bi by resampling the original dataset D with replacement.

  • 4:

        Report the sample IDs present in Bi, i.e., SamplesBi with

            Samples=append(Samples,SamplesBi).

  • 5:

        Conduct a principal component analysis for Bi including samples from both study groups.

  • 6:

        Split Bi into the two study group subsets Bi1 and Bi2.

  • 7:

        for k=1,2 do

  • 8:

            Detect outliers of k-th study group subset Bik using bagplot:

                OutliersBik=bagplot(Bik,factor=2)

  • 9:

            Report the samples being detected as outliers with

                Outliers=append(Outliers,OutliersBik)

  • 10:

        end for

  • 11:

        Aggregate Samples list to frequency table.

  • 12:

        Aggregate Outliers list to frequency table.

  • 13:

        Compute relative outlier frequencies and conduct binomial test with α=0.05.

  • 14:

    end for