diff --git a/README.md b/README.md index e6bd001..7b7bb7c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ java -jar SeqRuler.jar ## Help ```bash -Usage: SeqRuler [-egGhnprsSV] [-a=] [-c=] +Usage: java -jar SeqRuler.jar [-egGhnprsSV] [-a=] [-c=] [-d=] [-f=] [-i=FILE] [-o=FILE] [-t=] -a, --ambiguity, --ambiguities= @@ -47,7 +47,7 @@ Usage: SeqRuler [-egGhnprsSV] [-a=] [-c=] mapping. Default: false -f, --fraction= Maximum allowable fraction of ambiguities allowed for - 'resolve' mode. If exceeded, use 'average' mode. + 'resolve' mode. If exceeded, uses 'average' mode. -g, --ignore-terminal-gaps Ignore terminal gaps at beginning and end of sequences when calculating distances. [SNP only] Default: true -G, --ignore-all-gaps Ignore all gaps when calculating distances. [SNP only] @@ -58,7 +58,8 @@ Usage: SeqRuler [-egGhnprsSV] [-a=] [-c=] only] Default: true -o, --outFile=FILE output file with distances -p, --pairs read pairs of sequences from stdin, calculate distance - for each pair. format "name1, seq1, name2, seq2\n" + for each pair. format "name1, seq1, name2, seq2\n". + Do not include a header row -r, --run-server run jetty server -s, --stdin read fasta from stdin. Alternative to reading from a file (-i) diff --git a/SeqRuler.jar b/SeqRuler.jar index c490339..40acdd3 100644 Binary files a/SeqRuler.jar and b/SeqRuler.jar differ diff --git a/modules/gui-app/src/main/java/Main.java b/modules/gui-app/src/main/java/Main.java index 3948f55..cea6335 100644 --- a/modules/gui-app/src/main/java/Main.java +++ b/modules/gui-app/src/main/java/Main.java @@ -29,7 +29,7 @@ public class Main implements Runnable{ private boolean use_stdin; @CommandLine.Option(names={"-S", "--stdout"}, description="write distances to stdout. Alternative to writing to a file (-o)", defaultValue = "false") private boolean use_stdout; - @CommandLine.Option(names={"-p", "--pairs"}, description="read pairs of sequences from stdin, calculate distance for each pair. format \"name1, seq1, name2, seq2\\n\"", defaultValue = "false") + @CommandLine.Option(names={"-p", "--pairs"}, description="read pairs of sequences from stdin, calculate distance for each pair. format \"name1, seq1, name2, seq2\\n\". Do not include a header row", defaultValue = "false") private boolean input_as_pairs; @CommandLine.Option(names={"-d", "--distance-method"}, description="distance metric to use. One of [TN93, SNP]. Default: TN93", defaultValue = "TN93") @@ -43,7 +43,7 @@ public class Main implements Runnable{ description="How to handle ambiguous nucleotides. One of [resolve, average, gapmm, skip]", defaultValue = "resolve") private String ambiguityHandling; @CommandLine.Option(names={"-f", "--fraction"}, - description="Maximum allowable fraction of ambiguities allowed for 'resolve' mode. If exceeded, use 'average' mode.", defaultValue = "1.0") + description="Maximum allowable fraction of ambiguities allowed for 'resolve' mode. If exceeded, uses 'average' mode.", defaultValue = "1.0") private float max_ambiguity_fraction; @CommandLine.Option(names={"-c", "--cores"}, description="Number of cores to use for parallel processing. Default: 1", defaultValue = "1") diff --git a/modules/gui-app/src/main/java/TN93/TN93.java b/modules/gui-app/src/main/java/TN93/TN93.java index 6ef9427..7f02bd4 100644 --- a/modules/gui-app/src/main/java/TN93/TN93.java +++ b/modules/gui-app/src/main/java/TN93/TN93.java @@ -179,6 +179,10 @@ public void tn93Fasta() { count=0;//reset counts } } + // process the last batch + if (pairs.size() > 0) { + tn93_pairs(pairs); + } return; } else if (use_stdin) { seqs = read_fasta_stdin();