Thursday, May 15, 2014

How to Build Your Own Phylo Trees with Mega6

Mega6 is a popular freeware program for creating phylogenetic trees and sequence alignments, analyzing gene sequence data, performing various calculations (such as Tajima's D), computing pairwise distances between sequences, and doing lots of other types of genetic analysis. This program is widely used and is based partly on the work of Masatoshi Nei, the famed Penn State molecular geneticist and author of the seminal book Mutation-Driven Evolution (which I highly recommend). You need this program if you're into molecular genetics.

In my last post, I showed a phylogenetic tree that I created in Mega6 for thymidine kinases of phages and hosts. You can make trees of this sort yourself in a matter of minutes using Mega6. Let me take you through a quick example.

Here's how to recreate the tree involving thymidine kinase. Further below, I've listed the FASTA sequences you'll need. Obviously, you can obtain your own sequences from or other sources, if you want to make your own phylo trees based on other sequences.

All you have to do is Copy and Paste FASTA sequences into the Alignment Explorer window of Mega6, then generate a Maximum Likelihood tree (or a Parsimony Tree, or whatever kind of tree your prefer).

Here's the exact procedure:
  1. Fire up Mega6.
  2. Click the Align button in the main taskbar. (See screenshot below.)
  3. Choose Edit/Build Alignment from the menu that pops up. A new window will open. (Note: A dialog may ask you if you are creating a new data set; answer Yes. A dialog may also appear asking whether the alignment you're creating will involve DNA, or Proteins. If you're using the amino-acid sequences shown further below, click Proteins.)
  4. In Mega6, click the Align button on the left side of the taskbar. Select Edit/Build Alignment.
  5. Paste FASTA sequences into the Alignment Explorer window. 
  6. Select All (Control-A).
  7. Choose Align by ClustalW from the Alignment menu. An alignment options dialog will appear. Accept all defaults by clicking OK.
  8. After the alignment operation finishes (it takes 5 seconds), go to the menu and choose Data > Export Alignment > Mega Format. Save the *.meg file to disk.
  9. Now go back to the main Mega6 window and click the Phylogeny button in the taskbar. A menu will drop down.
  10. Select the first item: Construct/Test Maximum Likelihood Tree. A dialog will appear asking if you want to use the currently active data set. Click No. This will bring up a file-navigation dialog. Use that dialog to find the *.meg file you created in Step 7. Select that file and click Open.
  11. A tree options dialog will appear. If you just want to see a tree quickly, accept the defaults and click OK. The tree will take less than 10 seconds to generate. If you want to do a test of phylogeny (this part isn't obvious!), click the item to the right of "Test of Phylogeny" (see the graphic below) and choose "Bootstrap method," then set the number of bootstraps using the dropdown menu (see screenshot below).
  12. Click the Compute button to build the tree.
If you want to do bootstrap validation of tree nodes, you have to click the yellow area to the right of Test of Phylogeny. (See red arrow above.) Choose Bootstrap Method. Then set Number of Bootstraps to 500.

Note that if you choose to do a bootstrap test of phylogeny, the tree may take 5 minutes or more (possibly much more) to build, depending on how many nodes it contains. Bootstrapping is a compute-intensive operation. The idea behind bootstrap testing is that node assignments in phylo trees are often uncertain, and one way to check the robustness of a given assignment is to systematically introduce noise into the data to see how readily a node can be made to jump branches. A node that can easily be tricked into jumping to a different spot in the tree is untrustworthy. The bootstrap test attempts to quantify the degree of reliability of the node assignments. Usually, you want to do at least several hundred tests (500 is considered adequate). If a given node jumps branches in half the tests, the tree will carry "50" (meaning 50% confidence) at the top of the branch, meaning there's a only 50% certainty that that particular node assignment is correct as to branch location. A tree where all the branches have numbers greater than 50 can usually be considered reliable. 

Mega6 will output Maximum Likelihood trees, parsimony trees, and other types of trees, and the program will do an amazing variety of calculations and statistical tests. Most times, you can save analyses in Excel format, which of course is a godsend in case you need to do additional analysis that can't be done in Mega6. The documentation contains many helpful tutorials; be sure to give it a look.

If I had a wish-list for Mega6, it would be quite short. Mainly I'd like to be able to see quick graphic summaries of things like the ratio of synonymous to non-synonymous mutations in two DNA sequences. (The data for this is available via the HyPhy command under the Selection taskbar button, but only as raw spreadsheet data; you have to sum the columns yourself in Excel to get certain kinds of summaries, and if you want a graph, you have to create it yourself. This is hardly a major drawback. Still, it would be nice to see more summary data, quickly, in graphical form.) When you align two or more genes in the Alignment Editor, it shows asterisks above the identical nucleotides, but doesn't show percent identity anywhere, nor percent "positives" for amino acid data. The Alignment Editor also doesn't respond properly (worse: it responds inappropriately) to mouse-wheel actions, jumping to the end of a file horizontally when you wanted to wheel-scroll vertically.

Also mildly annoying: the tree renderings are bitmaps; I would much prefer to see SVG (Scalable Vector Graphics) format, which in addition to being infinite-resolution (vector format) also allows easy editing of line widths, colors, fonts, labels, etc. in a simple text editor. As it is now, to edit line widths or colors in phylo-trees, you have to drag out Photoshop.

But overall, I have few significant complaints (and much praise) for Mega6. It's an immensely powerful program, it's fast, it's quite intuitive, and the best part is, it's free. (For a more detailed commentary on the program's design philosophy and capabilities, see this excellent 2011 paper by Tamura, Nei, et al. It was written at the time of Mega5, but applies equally to Mega6.)

Below are the FASTA sequences used in making the phylo tree for yesterday's post. You can Cut and Paste these sequences directly into Mega6's Alignment Explorer:

>sp|P13300|KITH_BPT4 Enterobacteria phage T4 
>tr|S5MKX8|S5MKX8_9CAUD Yersinia phage PST 
>tr|I7KRQ7|I7KRQ7_9CAUD Yersinia phage phiD1
>tr|F2VXC8|F2VXC8_9CAUD Shigella phage Shfl2 
>tr|I7J3X5|I7J3X5_9CAUD Yersinia phage phiR1-RT 
>sp|Q98HR4|KITH_RHILO Rhizobium loti (strain MAFF303099) 
>tr|F0LSI7|F0LSI7_VIBFN Vibrio furnissii (strain DSM 14383 / NCTC 11218)
>sp|Q5E4F2|KITH_VIBF1 Vibrio fischeri (strain ATCC 700601 / ES114) 
>tr|V2ABB3|V2ABB3_SALET Salmonella enterica subsp. enterica serovar Gaminara str. ATCC BAA-711
>tr|I6H5M2|I6H5M2_SHIFL Shigella flexneri 1235-66
>sp|P23331|KITH_ECOLI Escherichia coli (strain K12)
>sp|Q66AM8|KITH_YERPS Yersinia pseudotuberculosis serotype I (strain IP32953
>tr|B4EXS0|B4EXS0_PROMH Proteus mirabilis (strain HI4320)
>tr|G0GHM0|G0GHM0_KLEPN Klebsiella pneumoniae KCTC 2242
>tr|F7YDB7|F7YDB7_MESOW Mesorhizobium opportunistum (strain LMG 24607 / HAMBI 3007 / WSM2075)
>tr|H0H7T7|H0H7T7_RHIRD Agrobacterium tumefaciens 5A


  1. ben ıssr ve rapd sonuçlarımdan oluşan 1-0 verilerimi nasıl formata çevirebilirim? Lütfen yardımcı olun....

  2. Thank you so much. Your works are fantastic and very useful for all of us. We are waiting for your next post. Thank you.
    Seo Service Provider In India

  3. You should enter your mobile number for verification purposes. The messenger application market is flooded with many picture sharing apps.

  4. I think this is a real great article post.Really looking forward to read more. Visit at
    Crazy Video Hub

  5. Fantastic article to go through,I would appreciate the writer's mind and the skills he has presented this great article to get its look in better style.

  6. It is a great job, I like your posts and wish you all the best. and I hope you continue this job well.
    NutraT line

  7. Hello, I am thomus jons thank you for this informative post. That is a great job. Wish you more success.Thank you so much and for you all the best. Takes Down

  8. Java Assignment help
    Therefore, students take Java Assignment help from the online assignment writing services. They are cost-efficient, as well as fast in their service. A student who is new to these assignment writing can get a proper idea on the format which should be followed. However, there is one more thing to ponder

  9. Assignmentservicerating is best reviews site.We at Top Quality Assignment believe that there is no shortcut to success and to attain success, hard work, dedication, and commitment must be present. We are an online platform where students check & write reviews for assignments related websites. reviews

  10. ABC Assignment Help is an incomparable online Accounting assignment help company delivering excellent academic assignments, essays, coursework and reports. Through a team of over 3000 subject experts we ensure individual attention to every student making the assignment help experience completely personalized in nature. With our round the clock services, you can be assured of high grades every time.

  11. Our encryption software protects your details. In other words, until you select to tell someone that you decided to hire for assignment writer UK, no one will come to know. We would love to work with you and provide you with a top quality assignment writing help to fetch you the top grades.

  12. Thanks for sharing the informative post. It’s really useful to get Assignment Help in USA.

    Nice post. You shared all useful information to understand the importance of Assignment Help Online services.
    Thanks for sharing such a wonderful post. My all doubts related to Online Assignment Help services are cleared.
    Beautifully explained post to get the best Assignment Helper services.All mentioned points are informative and easy to understand.

  13. Thanks for posting such a great blog! It contains wonderful and helpful posts. Thanks for sharing….
    All Assignment help reviews
    Assignment help reviews

  14. You’re superb and I think you are the master of your topic. I like the way of your writing and please keep up posting. Visit on my Outlook support web page, if you need any type of Microsoft Outlook Support.
    Microsoft Outlook Support

  15. Our best services are always open for students 24x7 so you don't have to go else. Our best team is ready to offer top services. Students who need to complete all assignment they all at right place at studentsassignmenthelp our team is keeps moving to finish your problem like as we are offering personal statement help service to the students who want to get.

  16. It is not easy to maintain a device to keep it error free. You need some maintaining or repair services to keep working with the HP device. You should visit to get in touch with certified experts to avail quick service. Certified experts are available round the clock to help customers regarding HP device.

  17. A wireless HP printer is similar to a network printer, but to create hp wireless printer setup, instead of using a cable to connect, the printer connects with the help of Wi-Fi. In addition to create the normal network setup, you will have to write down your Wi-Fi password to let the device see and connect with the network. With the network printer, a wireless printer will also require you to install driver software on any computer in which you wish to have access to your HP wireless printer.

  18. Having an assignment due tomorrow and understand you can’t do it yourself? But you’re afraid of delegating your paper to some scam services as well? Why not check edubirdie reviews on

  19. Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people. We provide the Microsoft Office related Technical Issue of Solutions at a minimal price with expert team. Get support click here
    Office 365 Help
    Office 365 Support
    Microsoft 365 Support
    Microsoft Office 365 Support
    Outlook Support
    Outlook Support Number
    Outlook Tech Support
    Outlook Support Phone Number

  20. Normally the students work hard to complete their work, yet they do not succeed in fulfilling their work, so they need Do my assignment which they can get from because of Singapore's writer provide Best Quality Assignment.

  21. Singapore translators present Translate English Malay
    for those people who are not able to write their project into different languages. They need someone who is complete their project before the deadline. We offer very reliable and affordable services and available 24*7 with assured by 100%

  22. Need writing help but don’t know whom you can trust? On EssayTopicsMasters we conduct research on writing companies so that you could select the one which is the most trustworthy and reliable. Take a look at review that we have completed recently.

  23. Facing problems in drafting management assignment.if you have any doubt,you can visit reviews for checking the ratings.

  24. Thanks for sharing such a nice Blog.I like it. We also provide affordable Accounting Assignment Help in uk.

  25. Wonderful list, Awesome! Its pleasure to visit here, This blog is good to share the information which is useful for many of us. I hope that you continue to do your work like this in the future also. Also Click here Best Speed Booster app for your Android Phone

  26. Whether you’re planning to explore all opportunities, consider the job you really wanted in the first place, or just move up the career ladder, we may provide you "edward jones reviews" on to help you make the best choice.

  27. Download and install Vidmate App which is the best HD video downloader software available for Android. Get free latest HD movies, songs, and your favorite TV shows.

  28. You’re superb and I think you are the master of your topic. I like the way of your writing and please keep up also: Tarot Cards Reading

  29. It is an open secret that these are the nurses who run the medical field. Nurses are the ones who are always there for the patients and their need. They attend to the patients’ pleases and keep the doctors busy and provide all the necessary information. Therefore, nursing as a profession nowadays attracts more and more attention of conscientious people who understand all the significance of the occupation and feel compassion for human beings. If you search help with nursing essay writing service, welcome to

  30. Are you looking for best quality Assignment Help
    service? Then you are at the right place as we offer excellent quality writing services which ensure high grades.

  31. Our SEO services work smartly according to Google guidelines and deliver proven, fast, and guaranteed results within a few days. Our SEO professionals read Google updates, tips and trick for SEO technology and main guidelines, so get started with us to appear in the top search results... read more

  32. nice blog thanks for sharing
    We are a leading digital marketing agency in India, specializing in offering top rated digital marketing services for the potential customers at very amazing rates. Our digital marketers are very smart, talented and knowledgeable to build your strong digital presence online.

  33. Are you looking for HP Printer tech assistance to get resolve your printer issues like HP Printer won't print black than you are at the right place just connect with our support team.

  34. American Aesthetic Association is coming up with hair Transplant course .Hair transplant technique is a surgical treatment in which one body part hair follicle (Donor site) is placed on the bald part of the body (Recipient site).So, if your are searching for Hair Transplant course , visit at

  35. Are you giving nmrc exam this year? If yes then we will suggest you to download your nmrc admit card today.
    Keeping your admit card with you is a very necessary step as without it you won't be able to appear for the exam.

  36. The users of roadrunner webmail get astounding benefits of emailing and chatting. However, being a technical product, some technical glitches may occur. In order get rid of such issues you may directly contact our experts. They are well trained technicians and does their best for removing the technical issue.

  37. Drivers are very important for your print machine. It saves you from several errors and gives you the finest work. So, to avoid the errors you need to download and install the printer driver. To download drivers, visit the site It is good to have complete knowledge of your printer’s specification for better understanding of its working. Usually printer comes with drivers, cartilage, and paper handling which makes your work easy. If you have any doubt regarding your printer specification or need to download driver software, visit the website. Or else, you can contact HP Support for detailed information.

  38. Very nice blog!!! This is really good blog information thanks for sharing. We are a reliable third party Garmin Express Update company, offering technical GPS support for various types of technical any types solve errors.

  39. I would like to thank you for the efforts you have made in writing this website. Thank you so much friend :)

    dissertation writers uk -
    phd dissertation writing services -
    dissertation methodology -
    how to write a dissertation proposal -
    dissertation buy

  40. What a fantastic Post! This is so chock full of useful information, Killer content as usual, Nice work Author. I am Also a blogger, write different - different topics. If you wants to read my best article, please check Khatrimaza

  41. You are looking for assignment at cheapest rate so the is cheapest way to complete assignment writing help. Our experts ghostwriter singapore provides 24*7 assignment help support to the Singaporean students.

  42. Thank you for sharing this informative is giving college essay writing service to students.we are already trusted by thousands of students who struggle to write their academic papers and also by those students who simply want Collage essays to save their time and make life easy.

  43. Wondering how to arrange enough money to avail report writing help from us? Its time you stopped believing that it is an expensive affair. On the contrary to our thought, availing report writing help is fun and also budget-friendly. Feeling sceptical about it? Read on to know how we never make a hole in your pocket.

  44. If you have any questions regarding canon mg2922 problem or if you are still experiencing some annoying printer problems then just call us +1 800-684-5649
    canon mg2922

  45. Perhaps a couple out of each odd understudy feels strengthened when they need to make an article. In all honesty, by a wide margin the vast majority of the understudies feel overpowered when they are moved closer to make an article paper. They long for heading all through the way toward shaping an article. They need somebody by their sides with the target that they can feel certain. In this unprecedented condition, has the ideal reaction for those understudies. Understudies no more need to devour their time in intuition 'who can do my article brilliantly'. They can fundamentally come to us and put in a requesting to get best quality structure making help. Ping us at Dissertation

  46. Impressive work by everyone out here.. Thanks for the same. and open this to admair to every person

  47. This is the very first time I called on Outlook Support Phone Number in order to get rid of my outlook issues. The technician who attends my call is very helpful and friendly in nature. He guided me step by step to fix my entire issues. So, I would recommend to everyone that whenever you face outlook issues, then dial this number. Get support click here
    Office 365 Support
    Microsoft Support Phone Number

  48. Listen, share and download the trending
    Abantwana Bama Uber ,

  49. If you occur to find any trouble with your printer, troubleshoot by referring to resolutions of respected error. Not only hp officejet pro 8710 troubleshooting but our technical experts can assist you to fix this failure by providing online remote help.

  50. If you are looking for a affordable truck moving company, just click on the link below and see the services of the best truck moving company in India.

    Hire a Truck
    Freight calculator

  51. We are the leading assistance provider of HP printer, we have a professional team of printer technician so if any case you got an error like HP Printer Won’t Print Black than do not worry, you have to just connect with our team they will help you.

  52. Do you require HP printer setup for your mac operating system? Is your printer driver not suitable for macOS? Then visit the to get the software and driver for better functioning of your printer. You can also call our expert HP support team for services.

  53. Roku( ) devices , as we all are aware of, are one of the most popular streaming devices out there. Below, we will talk about why Roku ( create account ) is as popular as it it, how different is it from the other streaming devices, and how to set up the device. To set up a Roku (roku com link ) device, there are three different steps. We will also take you through them, one after the other.

  54. holds the separate spot for offering amazing entertainment by incorporating the latest technological features. You just need the connection to the internet network only. But, what if you are facing random network issues then it will be the most aggravating situation that you may ever face. Network issues are a very common one, not only on Roku but for all internet dependent devices. You have to know some easy solutions to overcome these kinds of errors.

  55. Online undertaking help authorities of Students Assignment Help give help relationship to understudies of school and school. Our master writers help you in any assignment. Much a commitment of gratefulness is all together for visiting my site and wish you accomplishment. Much thankfulness to you to such a degree!

  56. Noteworthy work by everybody over here.. A debt of gratitude is in order for the equivalent. what's more, open this to admair to each individual

  57. It's not a tough job to install Kodak Verite 55 Plus Driver. If software CD is available with the package, insert it to the computer and start to extract the setup file to the required directory. Besides you have compatible software and driver download web pages too. Speak to our techies for more updates

  58. It’s the instructions that help you to complete the setup easily. Features and specifications are many for the latest models. Execute the hardware setup first and then proceed with the software update. Connect the cables and it’s important to fix it to the exact port. Surprisingly for new models, you will have the auto wireless connect features. It’s time to visit the Canon software update page and start your search to find the matching software. Go back to the installation wizard to complete the steps. Speak to our techies for support

  59. Thank you for this wonderful information looking forward for more, the best electric golf push cart can greatly reduce fatigue or injury as you struggle to carry the bag or push your trolley for 18 holes in the golf course. Get one from Electric Golf Push cart that follows You

  60. A colossal bit of the new youthful doggies obtained from stores are enveloped by counterfeit cellulose helps, at any rate most staggering home-made warm mutts are made out of conventional creature stomach related contraption. Following the filling system is the pre-cooking structure in which the propelling canine affiliations are hurled into steaming water for Quarter of an hour spss help


Add a comment. Registration required because trolls.