changeset 39:369f0b641498 draft

Updated script comments
author boris
date Tue, 25 Jun 2013 00:41:54 -0400
parents c340422b78b1
children dd39849c2ff1
files phylorelatives.py
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/phylorelatives.py	Tue Jun 25 00:41:27 2013 -0400
+++ b/phylorelatives.py	Tue Jun 25 00:41:54 2013 -0400
@@ -1,13 +1,13 @@
 #!/usr/bin/env python
 #
-# Boris Rebolledo-Jaramillo (boris-at-bx.psu.edu)
-#usage: phylorelatives.py [-h] [-i FASTA] [-b INT] [-p] [-r FASTA]
+#Boris Rebolledo-Jaramillo (boris-at-bx.psu.edu)
+#usage: phylorelatives.py [-h] [-i FASTA] [-b INT] [-p] [-r FASTA] [-j]
 #
 #Constructs relatedness of a set of sequences based on the pairwise proportion
-#of different sites. It reports the test sequences relatives, tree plot and
-#tree in Newick format. One or more test sequences are accepted as long as
-#their name includes the strict suffix "_minor" or "_test" (i.e. >seq1_minor).
-#IMPORTANT: Sequences must have the same length!
+#of different sites. It reports the test sequences relatives, NJ tree plot and
+#Newick string. One or more test sequences are accepted as long as their name
+#includes the strict suffix "_minor" or "_test" (i.e. >seq1_minor). IMPORTANT:
+#Sequences must have the same length!
 #
 #optional arguments:
 #  -h, --help            show this help message and exit
@@ -23,6 +23,10 @@
 #  -r FASTA, --root FASTA
 #                        Root trees using FASTA sequence as outgroup. (Default:
 #                        Display unrooted trees)
+#  -j, --major-only      In major-only mode no minor allele sequence is
+#                        required and each sequence is treated as a major
+#                        allele sequence (Default: Require minor allele
+#                        sequences)
 
 import sys
 import argparse
@@ -143,12 +147,12 @@
 
 def main():
     # Parse command line options
-    parser = argparse.ArgumentParser(description='Constructs relatedness of a set of sequences based on the pairwise proportion of different sites. It reports the test sequences relatives, tree plots and trees in Newick format. One or more test sequences are accepted as long as their name includes the strict suffix "_minor" or "_test" (i.e. >seq1_minor). IMPORTANT: Sequences must have the same length!', epilog='Boris Rebolledo-Jaramillo (boris-at-bx.psu.edu)')
+    parser = argparse.ArgumentParser(description='Constructs relatedness of a set of sequences based on the pairwise proportion of different sites. It reports the test sequences relatives, NJ tree plot and Newick string. One or more test sequences are accepted as long as their name includes the strict suffix "_minor" or "_test" (i.e. >seq1_minor). IMPORTANT: Sequences must have the same length!', epilog='Boris Rebolledo-Jaramillo (boris-at-bx.psu.edu)')
     parser.add_argument('-i', '--input', metavar='FASTA', action='append', type=str, help='This option can be specified multiple times. Sequences will be added to "multi-fasta.fa". (e.g. -i major1.fa -i major2.fa -i minor1.fa)')
     parser.add_argument('-b', '--bootstrap', type=int, metavar='INT',default=1000, help='Change number of replicas. 0 to deactivate. (Default: 1000)')
     parser.add_argument('-p', '--pairwise', action='store_true', help='Use pairwise deletion of gaps/missing data. (Default: Complete deletion)')
     parser.add_argument('-r', '--root', type=str, metavar='FASTA', default=False, help='Root trees using FASTA sequence as outgroup. (Default: Display unrooted trees)')
-    parser.add_argument('-j', '--major-only', action='store_true', help='In major-only mode no minor allele sequence is required and only a NJ major alleles tree is generated (Default: Require minor allele sequences)')
+    parser.add_argument('-j', '--major-only', action='store_true', help='In major-only mode no minor allele sequence is required and each sequence is treated as a major allele sequence (Default: Require minor allele sequences)')
     parser.add_argument('--relatives-out', type=str, metavar='FILE', default=None, help=argparse.SUPPRESS)
     parser.add_argument('--newick-out', type=str, metavar='FILE', default=None, help=argparse.SUPPRESS)
     parser.add_argument('--trees-out', type=str, metavar='FILE', default=None, help=argparse.SUPPRESS)