Skip to content

Commit e2c07a9

Browse files
committed
more updates of trident-related documentation
1 parent 361eab1 commit e2c07a9

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

pdf_conversion/pdf_conversion_list.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ trident_guide_archive/trident_guide_1.1.7.0.md trident_guide_archive/trident_gui
1010
trident_guide_archive/trident_guide_1.2.0.0_to_1.2.1.0.md trident_guide_archive/trident_guide_1.2.0.0_to_1.2.1.0.pdf
1111
trident_guide_archive/trident_guide_1.3.0.4.md trident_guide_archive/trident_guide_1.3.0.4.pdf
1212
trident_guide_archive/trident_guide_1.4.0.2_to_1.4.0.3.md trident_guide_archive/trident_guide_1.4.0.2_to_1.4.0.3.pdf
13+
trident_guide_archive/trident_guide_1.4.1.0_to_1.5.0.1.md trident_guide_archive/trident_guide_1.4.1.0_to_1.5.0.1.pdf
1314
xerxes_guide_archive/xerxes_guide_0.2.0.0.md xerxes_guide_archive/xerxes_guide_0.2.0.0.pdf
1415
xerxes_guide_archive/xerxes_guide_1.0.0.2.md xerxes_guide_archive/xerxes_guide_1.0.0.2.pdf
1516
janno_details.md janno_details.pdf

trident.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ If a query results in multiple individuals with the same name, forge will throw
541541

542542
By default the order of samples in a Poseidon package created with `forge` depends on the order in which the relevant source packages are discovered by `trident` (e.g. when it crawls for packages in the `-d` base directories) and then the sample order within these packages.
543543

544-
The option `--ordered` gives more control over the output order. It causes `trident` to output the resulting package with samples ordered according to the selection in `-f` or `--forgeFile`. This works through an alternative, slower sample selection algorithm that loops through the list of entities and checks for each entity which samples it adds or removes respectively from the final selection.
544+
The option `--ordered` gives more control over the output order. It causes `trident` to output the resulting package with samples ordered according to the selection in `-f` or `--forgeFile`. This works through an alternative, slower sample selection algorithm that loops through the list of entities and checks for each entity which samples it adds or removes respectively to and from the final selection.
545545

546546
For simple, positive selection, packages, groups and samples are added as expected. Negative selection removes samples from the list again. If an entity is selected twice via positive selection, then its first occurrence is considered for the ordering.
547547

@@ -552,7 +552,8 @@ One particular application of `--ordered` is the reordering of samples in an exi
552552
1. Generate a `--forgeFile` with the desired order of the samples in `MyPac`. This can be done manually or with any suitable tool. Here is an example, where we employ `qjanno` to generate a `forge` selection so that the samples are ordered alphabetically by their `Poseidon_ID`:
553553

554554
```bash
555-
qjanno "SELECT '<'||Poseidon_ID||'>' FROM d(MyPac) ORDER BY Poseidon_ID" --raw --noOutHeader > myOrder.txt
555+
qjanno "SELECT '<'||Poseidon_ID||'>' FROM d(MyPac) ORDER BY Poseidon_ID" \
556+
--raw --noOutHeader > myOrder.txt
556557
```
557558

558559
2. Use `trident forge` with `--ordered` and `--preservePyml` (see below) to create the package with the specified order:
@@ -564,7 +565,8 @@ trident forge -d MyPac --forgeFile myOrder.txt -o MyPac2 --ordered --preservePym
564565
3. Apply `trident rectify` to increment the package version number and document the reordering:
565566

566567
```bash
567-
trident rectify -d MyPac2 --packageVersion Minor --logText "reordered the samples alphabetically by Poseidon_ID"
568+
trident rectify -d MyPac2 --packageVersion Minor \
569+
--logText "reordered the samples alphabetically by Poseidon_ID"
568570
```
569571

570572
`MyPac2` then acts as a stand-in replacement for `MyPac` that only differs in the order of samples (and maybe the order of variables/fields in the `POSEIDON.yml`, `.janno`, `.ssf` or `.bib` files).

web_api.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,31 +85,40 @@ With `/zip_file/<package_name>`, one can download a package as a zip-file.
8585

8686
The endpoints can be accessed directly, or with additional arguments. These have to be listed after `?`, and must be separated by `&`. See the documentation of individual arguments below.
8787

88+
**`archive=...`:**
89+
8890
The most imporant argument is `archive=...`, which serves to select the package archive a given query should be applied to. See the overview [here](archive_overview) for the currently available options `community-archive`, `minotaur-archive` and `aadr-archive`. The archive names are identical to the respecitve GitHub repository names. If `archive=...` is not provided, then the query will target the default `community-archive`.
8991

9092
?> Request a list of packages in the `aadr-archive`:<br>
9193
https://server.poseidon-adna.org/packages?archive=aadr-archive<br>
9294
Download a package from this archive:<br>
9395
https://server.poseidon-adna.org/zip_file/AADR_v54_1_p1_1240K_EuropeAncient?archive=aadr-archive
9496

97+
**`client_version=...`:**
98+
9599
`client_version=...` is an argument for `/packages`, `/groups`, and `/individuals` to check client-server compatibility (primarily for the trident subcommand `list`). It defaults to the trident version of the server, so usually the latest release version of trident. If the client has a version that is not supported by the server the connection attempt is rejected.
96100

97101
?> Request a list of packages with an old client version:<br>
98102
https://server.poseidon-adna.org/packages?archive=aadr-archive&client_version=1.2.0.0<br>
99103
(note how the two arguments were appended here with `&`)
100104

105+
**`package_version=...`:**
106+
101107
`/zip_file/<package_name>` allows to specify a version of the requested package by appending `?package_version=...`. It defaults to the latest available version of a given package.
102108

103109
?> Download a specific version of a package:<br>
104110
https://server.poseidon-adna.org/zip_file/AADR_v54_1_p1_1240K_EuropeAncient?archive=aadr-archive&package_version=0.1.2
105111

112+
**`additionalJannoColumns=...`:**
113+
106114
For `/individuals` the API provides an additional argument: `additionalJannoColumns=...`. It allows to add information from arbitrary .janno file columns into the `additionalJannoColumns` JSON-list. Note that the precise names of the Column titles in the Janno specification must be used. A list can be found [here](https://github.com/poseidon-framework/poseidon-schema/blob/master/janno_columns.tsv).
107115

108116
?> Request the individuals list for the default archive, but with information on the origin country of the samples:<br>
109117
https://server.poseidon-adna.org/individuals?additionalJannoColumns=Country<br>
110118
This also works for multiple variables at once, which can be given in a comma-separated list:<br>
111119
https://server.poseidon-adna.org/individuals?additionalJannoColumns=Latitude,Longitude
112120

121+
To request all available columns at once the special key word `ALL` can be used: `?additionalJannoColumns=ALL`.
113122

114123
## The server implementation
115124

0 commit comments

Comments
 (0)