Skip to content

Commit 3837991

Browse files
committed
Updated docs with two execution modes
1 parent d8c91a9 commit 3837991

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

docs/usage.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# Usage
22
This section describes how to use *Structure_threader*.
33

4-
These are the arguments the program currently takes:
4+
*Structure_threader* can be executed via two main modes.
5+
6+
- `run`: The main execution mode that performs the parallel execution of the external structuring program, calculates the best K values and generates the plot files
7+
- `plot`: This execution mode will only generate new plot files from the output files of the structuring program.
8+
9+
### `run` mode
10+
11+
Using the `run` mode, the program currently takes the following arguments:
512

613
* I/O arguments:
714
* Input file (-i)
@@ -20,9 +27,7 @@ These are the arguments the program currently takes:
2027
* Replicates (ignored for *fastStructure* and *MavericK*; -R)
2128
* Number of threads to use (-t)
2229
* Q-matrix plotting options:
23-
* Disable plot drawing (--no_plots)
24-
* Just draw the plots, do not run any wrapped programs. Requires a previously finished run (--just_plots)
25-
* Override 'K' values from the given list to be plotted in the combined figure (--override_bestk '2 4 5')
30+
* Disable plot drawing (--no_plots)
2631
* Other options
2732
* Enable logging - useful when problems arise (--log)
2833
* Do not run the BestK tests (--no-tests)
@@ -32,7 +37,7 @@ These are the arguments the program currently takes:
3237
Example run:
3338

3439
```
35-
structure_threader.py -K Ks -R replicates -i infile -o outpath -t num_of_threads -st path_to_structure
40+
structure_threader.py run -K Ks -R replicates -i infile -o outpath -t num_of_threads -st path_to_structure
3641
```
3742

3843
Where -K is the number of "Ks" to run, -R is the number of replicate runs for
@@ -42,6 +47,28 @@ each value of "K", -i is the input file for *STRUCTURE*, -o is the directory whe
4247
The program should be run in the same directory where the files "mainparams" and
4348
"extraparams" for your *STRUCTURE* run are placed. Please see [Installation](install.md) for information on how to achieve this.
4449

50+
### `plot` mode
51+
52+
Using the `plot` mode, the program currently takes the following arguments:
53+
54+
* Main plotting options:
55+
* Prefix of the structuring software output files (-i)
56+
* External program or format of the output files. This can be 'structure', 'fastStructure' or 'maverick'. (-f)
57+
* The K values that you want to plot. Each individual K value that is provided will be plotted individually and in the end, a comparative plot will all K values will also be generated. (-K; Example: -K 2 3 4)
58+
59+
* Directory where the plots will be generated. By default they will be generated in the current working directory (-o)
60+
61+
* Individual/Population identification options:
62+
* Path to popfile (--pop) [See below for more information]
63+
* Path to indfile (--ind) [See below for more information]
64+
65+
Example run:
66+
67+
```
68+
structure_threader.py plot -i fS_run -f fastStructure -K 2 3 4 -o 2_4_plots --ind indfile.txt
69+
```
70+
71+
Here, *Structure_threader* will search the current directory for all FastStructure output files that start with the "fS_run" string, as specified by the "-i" option. The "-f" option specified the fastStructure format of the output files. The "-K" option specified which K values should be plotted (Note: If any of the provided K values do not exist, they are ignored). Using the "-o" option the plots will be generated into the "2_4_plots" directory. Finally, we also provide an "indfile" using the "--ind" option.
4572

4673
## Using a "popfile"
4774
*Structure_threader* can build your structure plots with labels and in a specified order. For that you have to provide a "popfile" (--pop option). This file consists of the following 3 columns: "Population name", "Number of individuals in the population", "Order of the population in the plot file".

0 commit comments

Comments
 (0)