Skip to content

Commit 36353a6

Browse files
authored
Merge pull request #94 from poseidon-framework/trident_v3_changes
Trident v3 changes
2 parents 36e57f0 + 1118f21 commit 36353a6

5 files changed

Lines changed: 1224 additions & 16 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ _site/
22
.jekyll-cache/
33
.Rhistory
44
node_modules/
5+
.DS_Store

pdf_conversion/pdf_conversion_list.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ trident_guide_archive/trident_guide_1.4.1.0_to_1.5.0.1.md trident_guide_archive/
1414
trident_guide_archive/trident_guide_1.5.4.0.md trident_guide_archive/trident_guide_1.5.4.0.pdf
1515
trident_guide_archive/trident_guide_1.5.7.0_to_1.5.7.3.md trident_guide_archive/trident_guide_1.5.7.0_to_1.5.7.3.pdf
1616
trident_guide_archive/trident_guide_1.6.2.1.md trident_guide_archive/trident_guide_1.6.2.1.pdf
17+
trident_guide_archive/trident_guide_1.6.7.1_to_1.6.7.3.md trident_guide_archive/trident_guide_1.6.7.1_to_1.6.7.3.pdf
1718
xerxes_guide_archive/xerxes_guide_0.2.0.0.md xerxes_guide_archive/xerxes_guide_0.2.0.0.pdf
1819
xerxes_guide_archive/xerxes_guide_1.0.0.2.md xerxes_guide_archive/xerxes_guide_1.0.0.2.pdf
1920
janno_details.md janno_details.pdf

trident.md

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ On GitHub you will also find [older release versions](https://github.com/poseido
3030

3131
With `trident --help` and `trident <subcommand> --help` you can get information about each subcommand and parameter directly on the command line. The guide below explains the subcommands in more detail. It is available in .pdf format for the current and previous versions here:
3232

33-
- [🗎 Guide for trident v1.6.7.1 to v1.6.7.3](https://github.com/poseidon-framework/poseidon-framework.github.io/blob/master/trident.pdf) (shown below)
33+
- [🗎 Guide for trident v1.7.0.0](https://github.com/poseidon-framework/poseidon-framework.github.io/blob/master/trident.pdf) (shown below)
34+
- [🗎 Guide for trident v1.6.7.1 to v1.6.7.3](https://github.com/poseidon-framework/poseidon-framework.github.io/blob/master/trident_guid_1.6.7.1_to_1.6.7.3.pdf)
3435
- [🗎 Guide for trident v1.6.2.1](https://github.com/poseidon-framework/poseidon-framework.github.io/blob/master/trident_guide_archive/trident_guide_1.6.2.1.pdf)
3536
- [🗎 Guide for trident v1.5.7.0 to v1.5.7.3](https://github.com/poseidon-framework/poseidon-framework.github.io/blob/master/trident_guide_archive/trident_guide_1.5.7.0_to_1.5.7.3.pdf)
3637
- [🗎 Guide for trident v1.5.4.0](https://github.com/poseidon-framework/poseidon-framework.github.io/blob/master/trident_guide_archive/trident_guide_1.5.4.0.pdf)
@@ -47,7 +48,7 @@ With `trident --help` and `trident <subcommand> --help` you can get information
4748
- [🗎 Guide for trident v0.29.0](https://github.com/poseidon-framework/poseidon-framework.github.io/blob/master/trident_guide_archive/trident_guide_0.29.0.pdf)
4849
- [🗎 Guide for trident v0.28.0](https://github.com/poseidon-framework/poseidon-framework.github.io/blob/master/trident_guide_archive/trident_guide_0.28.0.pdf)
4950

50-
# Guide for trident v1.6.7.1 to v1.6.7.3
51+
# Guide for trident v1.7.0.0
5152

5253
## Installation
5354

@@ -58,7 +59,7 @@ See the Poseidon website (<https://www.poseidon-adna.org/#/trident>) or the GitH
5859
Trident is a command line software tool structured in multiple subcommands. If you installed it properly you can call it on the command line by typing `trident`. This will show an overview of the general options and all subcommands, which are explained in detail below.
5960

6061
```default
61-
Usage: trident [--version] [--logMode MODE | --debug] [--errLength INT]
62+
Usage: trident [--version] [--logMode MODE | --debug] [--errLength INT]
6263
[--inPlinkPopName MODE] (COMMAND | COMMAND)
6364
6465
trident is a management and analysis tool for Poseidon packages. Report issues
@@ -815,22 +816,27 @@ With `-z|--zip` the genotype data output can be wrapped in gzipped archives with
815816
<summary><i class="fas fa-search"></i> <i class="fas fa-terminal"></i> <b>Command line details</b></summary>
816817

817818
```default
818-
Usage: trident jannocoalesce ((-s|--sourceFile FILE) | (-d|--baseDir DIR))
819-
(-t|--targetFile FILE) [-o|--outFile FILE]
820-
[--includeColumns ARG | --excludeColumns ARG]
821-
[-f|--force] [--sourceKey ARG] [--targetKey ARG]
819+
Usage: trident jannocoalesce ([--pvSource VERSION] (-s|--sourceFile FILE) |
820+
(-d|--baseDir DIR)) [--pvTarget VERSION]
821+
(-t|--targetFile FILE) (-o|--outFile FILE)
822+
[--includeColumns ARG | --excludeColumns ARG]
823+
[-f|--force] [--sourceKey ARG] [--targetKey ARG]
822824
[--stripIdRegex ARG]
823825
824826
Coalesce information from one or multiple janno files to another one
825827
826828
Available options:
827829
-h,--help Show this help text
830+
--pvSource VERSION Poseidon version (e.g. 2.7.1). (default: 3.0.0)
828831
-s,--sourceFile FILE The source .janno file.
829832
-d,--baseDir DIR A base directory to search for Poseidon packages.
833+
--pvTarget VERSION Poseidon version (e.g. 2.7.1). (default: 3.0.0)
830834
-t,--targetFile FILE The target .janno file to fill.
831-
-o,--outFile FILE An optional file to write the results to. If not
832-
specified, change the target file in place.
833-
(default: Nothing)
835+
-o,--outFile FILE File path to write the result to. Can be identical to
836+
--targetFile to overwrite the target file in place.
837+
Note that trident only writes .janno files in the
838+
latest Poseidon version it supports, so in this case
839+
v3.0.0.
834840
--includeColumns ARG A comma-separated list of .janno column names to
835841
coalesce. If not specified, all columns that can be
836842
found in the source and target will get filled.
@@ -858,7 +864,8 @@ A most basic run may just include two arguments:
858864
```bash
859865
trident jannocoalesce \
860866
--sourceFile path/to/source.janno \
861-
--targetFile path/to/target.janno
867+
--targetFile path/to/target.janno \
868+
--outFile path/to/coalesced.janno
862869
```
863870

864871
`jannocoalesce` generally works by reading a source `.janno` file with `-s|--sourceFile` (or all `.janno` files in a `-d|--baseDir`) and a target `.janno` file with `-t|--targetFile`.
@@ -867,6 +874,14 @@ It then merges these files by a key column, which can be selected with `--source
867874

868875
`jannocoalesce` generally attempts to fill **all** empty cells in the target `.janno` file with information from the source. `--includeColumns` and `--excludeColumns` allow to select specific columns for which this should be done. In some cases it may be desirable to not just fill empty fields in the target, but overwrite the information already there with the `-f|--force` option. If the target file should be preserved, then the output can be directed to a new output `.janno` file with `-o|--outFile`.
869876

877+
Note that all three files, the source, the target, and the outfile, are mandatory. The roles are:
878+
879+
- `targetFile` -> This is the file which is taken as the starting point for the new janno file.
880+
- `sourceFile` -> This is the file from which to read additional columns that might be missing in the target.
881+
- `outFile` -> This is the file that will contain the coalesced result.
882+
883+
In addition to these three files, you can choose a Poseidon Version for both the source (`--pvSource`) and the target (`--pvTarget`), which is useful for backwards compatibility, in case you have Janno files in older Poseidon versions. **_But_**: Note that the output file will _always_ be written in the newest Poseidon version. Note that you _can_ choose the outFile to be the targetFile, which will then overwrite the target file. This can be useful if you know what you are doing. Otherwise it is of course safer to choose a new filename for the output.
884+
870885
## Rectify command
871886

872887
`rectify` automatically harmonizes POSEIDON.yml files of one or multiple packages. This is not an automatic update from one Poseidon version to the next, but rather a clean-up wizard after manual modifications. It also includes additional, automatic package editing features.
@@ -1094,14 +1109,17 @@ Again you can use the `--raw` option to output the survey table in a tab-delimit
10941109
<summary><i class="fas fa-search"></i> <i class="fas fa-terminal"></i> <b>Command line details</b></summary>
10951110

10961111
```default
1097-
Usage: trident validate ((-d|--baseDir DIR) [--ignoreGeno] [--fullGeno]
1098-
[--ignoreDuplicates] [-c|--ignoreChecksums]
1112+
Usage: trident validate ((-d|--baseDir DIR) [--ignoreGeno] [--fullGeno]
1113+
[--ignoreDuplicates] [-c|--ignoreChecksums]
10991114
[--ignorePoseidonVersion] |
11001115
--pyml FILE | (-p|--genoOne FILE) | --genoFile FILE
11011116
--snpFile FILE --indFile FILE |
1102-
--bedFile FILE --bimFile FILE --famFile FILE |
1103-
--vcfFile FILE | --janno FILE | --ssf FILE |
1104-
--bib FILE) [--noExitCode] [--onlyLatest]
1117+
--bedFile FILE --bimFile FILE --famFile FILE |
1118+
--vcfFile FILE | [--pvJanno VERSION] --janno FILE |
1119+
[--pvSSF VERSION] --ssf FILE |
1120+
--bib FILE) [-j|--mandatoryJannoColumn COLNAME]
1121+
[-s|--mandatorySSFColumn COLNAME] [--noExitCode]
1122+
[--onlyLatest]
11051123
11061124
Check Poseidon packages or package components for structural correctness
11071125
@@ -1142,9 +1160,19 @@ Available options:
11421160
--famFile FILE Plink individual file. Accepted file endings are .fam
11431161
--vcfFile FILE VCF (Variant Call Format) file, optionall gzipped.
11441162
Accepted file endings are .vcf, .vcf.gz
1163+
--pvJanno VERSION Poseidon version (e.g. 2.7.1). (default: 3.0.0)
11451164
--janno FILE Path to a .janno file.
1165+
--pvSSF VERSION Poseidon version (e.g. 2.7.1). (default: 3.0.0)
11461166
--ssf FILE Path to a .ssf file.
11471167
--bib FILE Path to a .bib file.
1168+
-j,--mandatoryJannoColumn COLNAME
1169+
Usually optional .janno file column that should be
1170+
treated as mandatory, such as e.g. Individual_ID. Can
1171+
be given multiple times.
1172+
-s,--mandatorySSFColumn COLNAME
1173+
Usually optional .ssf file column that should be
1174+
treated as mandatory, such as e.g. poseidon_IDs. Can
1175+
be given multiple times.
11481176
--noExitCode Do not produce an explicit exit code.
11491177
--onlyLatest Consider only the latest versions of packages, or the
11501178
groups and individuals within the latest versions of

trident_guide_archive/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)