Bioinformatics Converter
Convert between various bioinformatics formats instantly
Paste Data
Upload File
Conversion output will appear here...
Was this tool helpful?
Our Phylip to Stockholm Converter is a specialized web tool designed to reformat multiple sequence alignment files for advanced bioinformatics analysis. It seamlessly converts alignments from the simple, sequential Phylip format into the metadata-rich Stockholm format. This conversion structures your data correctly, making it compatible with powerful downstream applications like the HMMER suite for profile hidden Markov model (HMM) analysis and for submission to protein family databases like Pfam.

How to use
- Upload Your File: Click “Upload File” or drag and drop your Phylip file directly into the designated area. You can also paste the file’s content using the “Paste Data” option.
- Choose Your Formats: The tool is pre-configured for this specific task. Ensure that
phylip(Relaxed Phylip format) is selected as the input andstockholm(Stockholm format) as the output. - Start the Conversion: Press the “Convert File” button to begin the process. The tool will process your file instantly.
- Download Your File: Once the conversion is complete, a download link for your new Stockholm file will appear. Click it to save the file to your device.
Tip: If you encounter an error during conversion, check the Troubleshooting Guide below—common causes and fixes are listed.
Input, Output, and Key Changes
Understanding the transformation from Phylip to Stockholm is key to preparing your alignments for profile HMMs and database integration. Here’s a breakdown of the formats and the changes that occur.
Sample Input (Phylip Format)
The Phylip format is a simple, plain-text format for multiple sequence alignments, widely used by phylogenetic analysis programs. It consists of a header line indicating the number of sequences and the alignment length, followed by the sequences themselves. Its simplicity makes it easy to create but limits its ability to store rich metadata.
Example of a Phylip file:
6 42
Turkey AAGCTNGGGC ATTTCAGGGT GAGCCCGGGC AATACAGGGT AT
Salmo_salar AAGCCTTGGC AGTGCAGGGT GAGCCGTGGC CGGGCACGGT AT
H_sapiens ACCGGTTGGC CGTTCAGGGT ACAGGTTGGC CGTTCAGGGT AA
M_musculus TCGGTTGGC CGTTCAGGGT ACAGGTTGGC CGTTCAGGGT AA
B_taurus TCGGTTGGC CGTTCAGGGT ACAGGTTGGC CGTTCAGGGT AA
G_gallus AAGCTNGGGC ATTTCAGGGT GAGCCCGGGC AATACAGGGT AT
Sample Output (Stockholm Format)
The Stockholm format is a more advanced alignment format designed to store not only the alignment but also extensive metadata. It is the standard format for databases like Pfam and is required by the HMMER software suite. It uses markup lines starting with ‘#’ for metadata and a double slash ‘//’ to mark the end of the alignment.
Example of the same alignment after conversion:
# STOCKHOLM 1.0
Turkey AAGCTNGGGCATTTCAGGGTGAGCCCGGGCAATACAGGGTAT
Salmo_salar AAGCCTTGGCAGTGCAGGGTGAGCCGTGGCGGGGCCACGGTAT
H_sapiens ACCGGTTGGCCGTTCAGGGTACAGGTTGGCCGTTCAGGGTAA
M_musculus TCGGTTGGCCGTTCAGGGTACAGGTTGGCCGTTCAGGGTAA
B_taurus TCGGTTGGCCGTTCAGGGTACAGGTTGGCCGTTCAGGGTAA
G_gallus AAGCTNGGGCATTTCAGGGTGAGCCCGGGCAATACAGGGTAT
//
Key Changes in the Conversion Process
The conversion from Phylip to Stockholm involves critical structural modifications to prepare the alignment for advanced analysis:
- Addition of a Format Header: The line
# STOCKHOLM 1.0is added to the beginning of the file. This header is mandatory and identifies the file as being in the Stockholm format for compatible software. - Removal of the Phylip Header: The first line of the Phylip file (e.g.,
6 42), which specifies the number and length of sequences, is removed as this information is not used in the Stockholm format. - Addition of a Record Terminator: A double slash
//is added at the very end of the file. This terminator signifies the end of the alignment record, which is crucial for files containing multiple Stockholm alignments. - Creation of a Metadata-Ready Structure: The conversion organizes the alignment into a structure that can support metadata annotations (e.g.,
#=GC SS_consfor consensus secondary structure), even if none are present in the original file. This makes the file ready for annotation and use in tools like HMMER.
Compatible Software
The generated Stockholm files are ready to be used with the following leading bioinformatics software:
- HMMER (for profile HMM building and searching)
- Jalview (for alignment visualization and editing)
- Belvu (for alignment viewing)
- Skylign (for creating sequence logos)
- Pfam (the format used by the protein family database)
Troubleshooting Guide
Encountering an error can be frustrating, but most issues are easy to fix. Here are the most common problems you might face and how to resolve them.
General Tool Errors
Error: “File size exceeds the limit”
- Why it happens: Your uploaded file is larger than the maximum allowed size. Our server has this limit to ensure quick processing for all users.
- How to fix: For very large alignments, consider splitting them into smaller files. For processing larger files or to inquire about unlimited usage, please contact us for custom solutions.
Error: “Processing timed out”
- Why it happens: The conversion is taking too long, which can happen with extremely large alignment files.
- How to fix: Try to simplify your input file if possible. If the issue persists because your alignment is inherently large, please contact us to discuss options for handling larger computations.
Error: “CAPTCHA validation failed”
- Why it happens: Our system uses a CAPTCHA to prevent automated bots. This error occurs if the CAPTCHA was not solved correctly or timed out.
- How to fix: Simply reload the page and solve the new CAPTCHA. If you continue to have trouble after reloading, please get in touch with our support team.
Conversion-Specific Errors
These errors typically relate to the format and integrity of your input Phylip file.
Error: “Invalid Phylip header” or “Could not parse alignment dimensions”
- Why it happens: The first line of your Phylip file is missing, malformed, or contains non-numeric characters. The parser expects this line to contain exactly two numbers: the number of sequences and the length of the alignment (e.g.,
6 42). - How to fix: Open your file in a plain text editor and ensure the first line correctly and exclusively contains the sequence count and alignment length, separated by a space.
Error: “Alignment length mismatch”
- Why it happens: One or more sequences in your alignment have a different length than the others. All sequences in a multiple sequence alignment must be the same length. This can be caused by manual editing errors or misplaced line breaks.
- How to fix: Carefully inspect your Phylip file. Use a text editor with a character count feature to ensure every sequence string has the exact same length. Remove any gaps or add gap characters (
-) as needed to equalize lengths.
Error: “Could not parse sequence name or data”
- Why it happens: This often occurs in “relaxed” Phylip format if there is no clear separation between the sequence name and the sequence data. The parser expects the sequence name (typically 10 characters, padded with spaces) to be followed immediately by the sequence string.
- How to fix: Check the formatting of each sequence entry. Ensure that sequence names do not contain unusual characters and that there is a consistent separation (usually spaces) between the name and the start of the sequence data on each line. Truncating long names to 10 characters can often resolve parsing issues.
If your problem isn’t listed here, we want to know about it! Please help us improve the tool by reporting the issue.
Support Our Work
We are committed to keeping our scientific tools free and accessible for everyone. If this tool has been helpful in your work, please consider supporting our mission with a donation. Your support directly helps us cover server costs and fund the development of new, powerful tools for the scientific community.
FAQ
References & Suggested Reading
- Mistry, J., Chuguransky, S., Williams, L., Qureshi, M., Salazar, G. A., Sonnhammer, E. L., … & Bateman, A. (2021). Pfam: The protein families database in 2021. Nucleic Acids Research, 49(D1), D412–D419. https://doi.org/10.1093/nar/gkaa913
- Cock, P. J., Antao, T., Chang, J. T., Chapman, B. A., Cox, C. J., Dalke, A., … & de Hoon, M. J. (2009). Biopython: freely available Python tools for computational molecular biology and bioinformatics. Bioinformatics, 25(11), 1422–1423. https://doi.org/10.1093/bioinformatics/btp163
- Thompson, J. D., Higgins, D. G., & Gibson, T. J. (1994). CLUSTAL W: improving the sensitivity of progressive multiple sequence alignment through sequence weighting, position-specific gap penalties and weight matrix choice. Nucleic Acids Research, 22(22), 4673–4680. https://doi.org/10.1093/nar/22.22.4673
- Waterhouse, A. M., Procter, J. B., Martin, D. M. A., Clamp, M., & Barton, G. J. (2009). Jalview Version 2—a multiple sequence alignment editor and analysis workbench. Bioinformatics, 25(9), 1189–1191. https://doi.org/10.1093/bioinformatics/btp033