Third Party Server¶
Configuration¶
The Third Party Server must provide at least 2 scripts :
one to get a public RSA Key for a Session
one to launch a series of Association Tests
GetPublicRSAKey¶
Example For Simple Unix based System:
#!/bin/bash
if [ $# -lt 1 ]
then
echo -e "usage :\t$0 SessionID";
exit 1;
fi
installDir=/path/to/PrivAS/WorkingDirectory
jar=/path/to/PrivAS.TPS.VERSION.jar
java -jar $jar --keygen $installDir/sessions $1
LaunchAssociationTest¶
Example For Simple Unix based System:
#!/bin/bash
if [ $# -lt 1 ]
then
echo -e "usage :\t$0 SessionID";
exit 1;
fi
session=$1
installDir=/path/to/PrivAS/WorkingDirectory
jar=/path/to/PrivAS.TPS.VERSION.jar
core=24
seed="random" #random seed for Production
#seed="123456789" #fixed seed for Debugging
d=`date +"%Y-%m-%d"`;
log=$installDir/log/$d.log
mkdir -p $installDir/sessions/$session;
status=$installDir/sessions/$session/tps.status;
epoch=`date +%s`000;
echo -e "$epoch\tPENDING\tJob submitted from $HOSTNAME" >> $status;
java -jar $jar "$session" "$installDir" "$core" "$seed" &>> $log
PrivAS TPS’s Command Lines¶
Main Command¶
Launch the Third-Party Server (should be called by the provided script, to manage scheduler issues)¶
java -jar PrivAS.TPS.jar Session_ID Work_Directory Integer Long
Session_ID |
the session ID used to generate the key pair |
Work_Directory |
The path to the directory where the keys will be stored |
Integer |
Number of cores (actually threads) to use |
Long |
Initial seed for the random number generator (or “random” for random seed) |
Tools¶
Generate a keypair for the Third-Party Server¶
java -jar PrivAS.TPS.jar --keygen Work_Directory Session_ID
Work_Directory |
The path to the directory where the keys will be stored |
Session_ID |
the session ID used to generate the key pair |
Compute a WSS Association Test (locally)¶
java -jar PrivAS.TPS.jar --wss genotype_files.tsv phenotypes.bool Integer Long results.tsv
genotype_files.tsv |
A TSV file that lists the genotypes files to used as input (Column1: Gene Name, Column2: /path/to/the/file.genotypes) |
phenotypes.bool |
A TSV file that stores the phenotypes of the samples (0/false = unaffected, 1/true = affected |
Integer |
Number of cores (actually threads) to use |
Long |
Initial seed for the random number generator (or “random” for random seed) |
results.tsv |
TSV file that will store the result table |
Compute a WSS Ranksum¶
java -jar PrivAS.TPS.jar --ranksum geneName input.genotypes phenotypes.bool
geneName |
The Name of the gene |
input.genotypes |
the path to the genotypes file to use as input |
phenotypes.bool |
A TSV file that stores the phenotypes of the samples (0/false = unaffected, 1/true = affected |