PEMS Software
Phylogenetic Estimation of Metagenomic sequence using batch-learning
Self-Organizing Map (BLSOM)

Users’ Guide1. Outline
The software PEMS is intended for the phylogenetic estimation of user-input gene sequences inmulti-FASTA format using SOM (Self Organizing Map), a method for data mining analysis.
The SOM-based clustering of a large amount of gene data requires high-capacity and high-speed
computer systems. By using the results of SOM-based clustering by large-scale systems, such as theEarth Simulator, this software performs the phylogenetic estimation of user-input gene sequences on aPC.

2. Specifications■ Recommended PC configuration
CPU:Intel Core 2 Duo 2.8 GHz or better

Memory: 2 GB or more
HDD:

Free space of 4 GB or more (excluding swap space)Video:

Resolution of 1280 x 1024 pixels or more, 16-bit or higher color■ OSMicrosoft Windows 7 or more
Microsoft .NET Framework 4.0 or better runtime environment[Note]
This software prevents the response time of the user interface from slowing down by handling the highcomputational load through multithreading. With a single-core CPU, the software’s screen redrawingand button response significantly slow down.

For the software, a dual-core or better CPU isrequired.

2

3. Installation■ STEP 1: Installing PEMS
The software comprises an analysis application and SOM dataset.

Decompress PEMS.zip (compressed file) using appropriate decompression software.

In the decompressed folder, double-click setup.exe to start the installation process.
(Depending on the system configuration, the extension .exe may be hidden (only setup is visible).)3

Click [次へ] ([Next]).

To change the installation folder, specify a desired folder and then click [次へ] ([Next]). The installation
confirmation dialog appears.

Click [次へ] ([Next]) to start the installation.

4

When the installation is complete, click [閉じる] ([Close]) to finish the installation.

5

■ STEP 2: Installing SOM data
Decompress SOM.zip (compressed file) using appropriate decompression software.
Move the decompressed folder named SOM to the same directory as the directory where PEMS
execution program PEMS.exe is installed in STEP 1.

Depending on the type of decompression software, a subfolder named SOM may be created in the SOMfolder. Check that the SOM folder (subfolder) contains the following files and folders.

■ STEP 3: Uninstalling the software
To uninstall the software, go to [Control Panel] -> [Add/Remove Programs]. Then, select PEMS
and click [Remove].
Note that the SOM dataset is not deleted. If the dataset is unnecessary, manually delete the SOM
folder containing it.

6

4. How to use the software■ STEP 1: Starting the PEMS application
Double-click the PEMS shortcut icon on the desktop to launch the PEMS application.

Alternatively, choose [Start] -> [All Programs] -> [PEMS] -> [PEMS] to launch the PEMSapplication.

7

■ STEP 2: Specifying a multi-FASTA file
Click [Multi Fasta] to select an existing multi-FASTA file in the folder. Then, click [開く] ([Open])(for the multi-FASTA file format, see Supplemental information).

When the file load is successfully completed, the number of genes contained in the multi-FASTA file isindicated in the Gene Count box, as shown below. [Threshold] and [Start] are enabled.

8■ STEP 3: Performing automatic estimation
Click [Start] and specify the folder and file name for storing analysis results. Then, click [保存]([Save]).
The extension .txt is automatically appended to the file name; the file is saved with the same nameregardless of whether or not the file extension .txt is manually added.

To create a new folder for storing analysis result data in this save dialog, click the folder icon circled in
red above to create a folder with an appropriate name.
Before clicking [Start] to start computation for automatic estimation, you can click [Threshold] tochange the threshold from its default (40) to any other value. For the meaning of this parameter, seethe section “Overview of analysis.” Set a suitable value for the purpose of analysis.
Clicking [Start] starts computation for automatic estimation.

When the entire computation iscomplete, related information is displayed in the STATUS area as shown below.

Click [Category View] to display the results of automatic estimation in the Category View window.

9In this window, the name of each user-specified gene is at the top of the tree, and the results ofphylogenetic estimation for the gene are displayed in the form of a top-down subtree.
Each subtree includes an estimated category name and the aggregate frequency of the category
estimated by SOM (in percent).
The results displayed in the tree are saved in a text file. Click [Result] to view the contents of the file
on a text editor.
It is important to assess estimation results from various perspectives by referring to analysis result
data files in the folder, as well as information displayed in the tree.

10■ STEP 4: Performing estimation for individual segments
In the tree, click an entry to be analyzed in more detail. Clicking a branch displays the name of theSOM map used for the estimation in the upper right box.
At the kingdom or phylum level, the same SOM map applies to different gene branches forphylogenetic estimation. At the genus level, different SOM maps are often used for different genes.

With a branch selected, click [Load] to load the dataset for the SOM map displayed in the upper rightbox and perform computation for phylogenetic classification. Upon computation completion, [Search]is enabled.
Clicking [Search] displays the window below.

11

Click [SOM Map] in this window to display the classification map based on SOM cells that was used
for the phylogenetic estimation in a two-dimensional color grid.

The window can be resized by dragging its lower right corner.
If the SOM cell size is too large to display the entire map even by resizing the window, change the value
in the Width box to decrease the number of pixels per cell.
When the number of pixels per cell is increased for detailed observation, use the scroll bars at the rightand bottom of the map to move to a desired area.

Click [List] in the SOM window to display a list of categorynames and their corresponding colors.
Click [Blink] with All selected in the Mode area todisplay all segments contained in all user-input genes inreverse colors on the SOM map.
Click [Blink] with Gene selected in the Mode area todisplay all segments contained in a gene specified by theGene No. box in the Search window in reverse colors
on the SOM map.
Click [Blink] with 1 selected in the Mode area to display
only a segment specified by the Segment box in theSearch window that is contained in a gene specified bythe Gene No. box in the same window. This segment isindicated with cross marks in the reverse color on theSOM map.

12In all modes, relevant cells are displayed in reverse colors while pressing and holding the mousebutton. Releasing the mouse button returns them to their original colors.

Click [Save] to access the color selection dialog for specifying the color of user-input genes. Selectan appropriate color and click [OK].

When the file save dialog appears, enter an appropriate file name and then click [Save]. In this way, theSOM map image and the list image are saved at the same time.
By clicking on a cell on the SOM map, the address and color of the clicked SOM cell as well as thecategory name of the gene segment assigned to the SOM cell are displayed in the upper right area.
SOM cells with no gene segment assigned are displayed in white.
SOM cells with gene segments in different categories assigned are displayed in black.
SOM cells with gene segments in a single category assigned are displayed in the color corresponding tothe category.
Set the number of a desired gene to the Gene No. box in the Search window. Set the number of adesired segment in the specified gene to the Segment box.
The distance between the pattern frequency vector of the specified gene segment and each weightvector in the SOM is computed to search for SOM cells with high similarity. The Ranking Range box
specifies the number of similarity ranks from the top to be included in SOM cell search.

After the completion of parameter setting, click [Search] to perform the search process.

13

The Result area displays search results.
Changing the value in the Ranking box changes the displayed information to that of SOM cells atdifferent similarity ranks.
The Cell Information field displays the results of clustering stored in the subject SOM cell.
The Neighbors Information field displays the sum of frequencies of each category stored in thesubject SOM cell and its neighboring SOM cells in ascending order.

14

Changing the value in the Neighbors Range box can change the range of neighboring SOM cells.
If this value is 1, the sum of frequencies of each category stored in nine SOM cells in total (the subject
SOM cell and its neighboring cells) is displayed.

15

During search operation, [Sequence], etc. in the Result area is disabled.
Click [Sequence] to display the sequence of the selected gene segment in a separate window. The
first line indicates the gene annotation, the second line the segment start and end points, and the thirdand subsequent lines the sequence.

16

STEP 5: Exiting the application
To exit the PEMS application, click the Close button (red cross) at the top right corner of the mainwindow.

When attempting to close the main window during computation, the dialog below appears. Click [OK]and wait for the computation process to end.

To change the background color of the window, open the PEMS.ini file in the installation folder
and edit the RGB value on the sixth line in hexadecimal (e.g. FE907E).

17

5. Overview of analysis
The process of phylogenetic estimation by the software is outlined below.
1. The sequence of each user-specified gene is divided into segments with a given length, and thepattern frequency vector of each segment is computed.
2. A SOM cell with a weight vector that is the most similar to the pattern frequency vector of eachsegment is identified.
3. The frequencies of categories in this SOM cell and its neighboring SOM cells are computed.
4. The estimated category frequencies are sorted in descending order.
5. If SOM data is available under an estimated category, the process proceeds to the lower level, andthe steps above are performed.
Nucleotide patterns used for computation in Step 1 above are described in the Pattern.txt file in
the folder where the SOM dataset is located. This file is related to the result of SOM data analysis
and must not be edited/revised.
The segmentation length for SOM clustering is automatically specified. If the entire length of auser-specified gene for analysis is shorter than the specified segment length but is larger than thedefault threshold value, the analysis is carried out through frequency vector normalization. This
threshold value can be changed by editing the value on the fifth line in the PEMS.ini file in theinstallation folder.
Genes longer than the specified segment length are divided into segments with a given length forfrequency analysis. Odd segments at the end of divided gene sequences are also analyzed throughfrequency vector normalization if their length is larger than the threshold value.
When any nucleotide pattern other than specified patterns is present in a gene segment, it isexcluded from counting; only the frequency vectors of specified patterns are normalized.
In Steps 2 to 4 above, phylogenetic estimation is performed for each segment in each gene, and theresults are saved into files corresponding to SOM data used for the estimation.
For example, when a save file is named myResult.txt, the result of phylogenetic estimation basedon the SOM analysis file for out_kingdom at the kingdom level is saved into themyResult_kingdom.txt file; the result of phylogenetic estimation based on the SOM analysis filefor Actinobacteria at the genus level is saved into the myResult_Actinobacteria.txt file.
An example of contents written to the files is given below.
#gi|78042616|ref|NC_007503.1| Carboxydothermus hydrogenoformans Z-2901, complete genome[1155001-1160000]

2 16

Prevotella21[1520001-1525000]

22 39

Flavobacteriales

21

Flavobacteriales

6

Pedobacter

4

The line starting with # indicates the gene annotation, and the next and subsequent lines indicate theresult of computation for each segment.
18

In the example above, [1155001-1160000] at the beginning shows the segment start and end points.
The next set of figures, 2 16, shows the X and Y coordinates of the SOM cell with a weight vector that is
the most similar to the pattern frequency vector of the segment (the shortest inter-vector distance).
The frequencies of categories in this SOM cell and its neighboring eight SOM cells are summed andsorted in descending order. The results are indicated next to the SOM cell coordinates.
The result of simply summing up the category frequencies of segments in a gene is saved with a filename with _Category Name_All inserted, like myResult_Actinobacteria_All.txt.
Multiple categories may or may not take first place in the frequency ranking at the same time.
In this document, a single top category is called true top category.
The result of summing up only the frequencies of true top categories of segments in a gene is saved witha file name with _Category Name_All1st inserted, like myResult_Actinobacteria_All1st.txt.
The result of extracting the category with the highest frequency among the summed frequencies of true
top categories at the same level in each gene is saved with a file name myResult_Top.txt. Thesame information as this file is displayed in a tree view by clicking [Display].
The counting result of the number that have been estimated for each category in each
Kingdom/Phylum/Genus is saved with a file name myResult_Hist.txt.
In automatic computation with [Save All], the rate of the frequency of a top category in each segment iscomputed.
For example, suppose that there is the following segment described in myResult_phylum.txt.
#gi|49474831|ref|NC_005956.1| Bartonella henselae str. Houston-1, complete genome[165001-170000] 82 196

Alphaproteobacteria 25

Bacteroidetes 8Chlorobi 2

The rate of the frequency of Alphaproteobacteria, top category, is:(25/(25 + 8 + 2)) * 100 = 71.4 %.
If the rate of the frequency is higher than the value specified in the Threshold box, this segment isused for phylogenetic estimation for Alphaproteobacteria at the next lower level.
Segments in the same gene that have different top categories are classified into different categories forphylogenetic estimation at the lower level.
Unlike the case above, if multiple categories take first place in the frequency ranking upon classificationof segments for phylogenetic estimation at the lower level, each of such segments is classified into
multiple categories for phylogenetic estimation.

19

6. Supplemental information■ Multi-FASTA file format
The annotation of each gene is prefixed with a > character.
The gene annotation line starts with a > character and is written in one row. Except for these rules, thefile is free-format.
A gene annotation line is followed by a line describing the sequence of the gene.
If the sequence extends over multiple rows, there is no restriction on the number of characters per row.
However, computation efficiency can be improved by breaking the line at appropriate points, instead ofwriting the sequence in an extremely long line. The sequence length is not restricted, but its upper limit
depends on the memory size of the PC to be used.
If the specifications above are met, there is no restriction on the number of genes contained in a file.
However, an excessively large file size consumes much processing time and memory. Therefore, it isrecommended to divide genes into multiple files appropriately and to adjust the number of genes
contained in one file.
The file extension should be .fa or .fas.
[Example]>gi|49474831|ref|NC_005956.1| Bartonella henselae str. Houston-1, complete genome
GTGAAGAGAGAAAAAAAATCCTTTCATTTACACATGCTTTCTGATGCAACGGGAGAAACATTAATATCTG
TTGGAAGAGCTGTAGCATCACAATACACGATGAGTCAGGCAACAGAACATATCTATCCGATGATTCGTAACAAAACACAGTTGCAGAGAGCTCTTGATGAGATACAACAAGAGCCTGGGATAGTTCTTTACACAATCATTGACAAAAAAATTAAAATTCTTCTTAGAAAAAGATGTGAAAAAATAGAAATTCCCTGTATT>gi|78042616|ref|NC_007503.1| Carboxydothermus hydrogenoformans Z-2901, complete genome
AACCTGAAAAAAGTGTGAAAAAAATTTTGTGGATTTGTGGATAAAACAAGGTTTTTGCTAATTTTTGCTAATAAAAAAAATTTATAAAGAGATTCGTGAAAGCAAAGATTGTGGATAACGAAAAACTCAAGAAAAATTTCTTGACGGGTCTTATCCCATCTTCTATAATTTAGGTGTATCTATAGGGGATATAGGCTTTTTTAGATAGATTAGGAGGTGTGAAAATGAAAAGAACCTACCAACCAAAAAACCGGCGGCG

20■ Collaboration with the Dendrogram analysis software
When the Dendrogram analysis software (AHCD) has been installed in the default directory
C:\Program Files\NIG\Dendrogram\AHCD.exe,[Dendrogram] appears at the start of PEMS, as shown below.
Click [Dendrogram] to launch the Dendrogram application. The name of the file analyzed withPEMS is passed to the Dendrogram and added to the file dialog.

21