SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   Script to count parsimony informative sites (http://seqanswers.com/forums/showthread.php?t=46204)

polarfire 08-28-2014 09:34 AM

Script to count parsimony informative sites
 
I have hundreds of alignments, and I am curious if there is a script or tool out there that can simply count the number of parsimony informative sites in any given alignment?

I know you can get this information by loading it into a phylogenetics program (e.g. PAUP or MrBayes), but if anyone knows of a script that can do this so it can be automated and done quickly I'd appreciate it!

themerlin 08-28-2014 12:38 PM

No promises that it works correctly, but here's something that I had sitting around:

https://gist.github.com/jasonsahl/9306cd014b63cae12154

You need BioPython to run and it assumes no gaps. In addition to reporting the number of PI SNPs, it also prints a new multi-fasta with only those sites included. Feel free to edit it as you see fit.

J

polarfire 08-28-2014 01:24 PM

Thanks
 
Thanks for that script!

I also found out you can do it with the function pis() in the R library phyloch. That function also allows for gaps.


All times are GMT -8. The time now is 10:18 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.