Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Obtaining Authentication Token (replace URL with the CanRisk website address):

    curl -k 'https://{URL}/auth-token/' \
    -d '{"username": "XYZ", "password": "ABC"}' \
    -H "Content-Type: application/json"

  2. Running a breast cancer risk calculation with pedigree data as a JSON parameter (replace with the authentication token):
    curl -k -XPOST -H "Content-Type: application/json" \
    -H 'Authorization: Token <TOKEN>' -H "Accept: application/json" \
    -d '{"mut_freq": "UK", "cancer_rates":"UK", "user_id": "end_user_id",
    pedigree_data":"BOADICEA import pedigree file format 4.0\nFamID\tName\tTarget\tIndivID\tFathID\tMothID\tSex\tMZtwin\tDead\tAge\tYob\t1stBrCa\t2ndBrCa\tOvCa\tProCa\tPanCa\tAshkn\tBRCA1t\tBRCA1r\tBRCA2t\tBRCA2r\tPALB2t\tPALB2r\tATMt\tATMr\tCHEK2t\tCHEK2r\tER\tPR\tHER2\tCK14\tCK56\nXXX1 \tF1 \t1\t1 \t3 \t2 \tF\t0\t0\t23 \t1993\t21 \t0 \t0 \t0 \t0 \t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\nXXX1 \tF2 \t0\t2 \t0 \t0 \tF\t0\t0\t55 \t1961\t0 \t0 \t0 \t0 \t0 \t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\nXXX1 \tM2 \t0\t3 \t0 \t0 \tM\t0\t0\t53 \t1963\t0 \t0 \t0 \t0 \t0 \t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0"}' https://{URL}/boadicea/

  3. Running a ovarian cancer risk calculation with a pedigree file POSTed as a form:
    curl -k -XPOST -F "mut_freq=UK" -F "cancer_rates=UK" \
    -F "user_id=end_user_id" \
    -F "pedigree_data=@/home/xxx/bwa4_pedigree_data.txt" \
    https://{URL}/ovarian/ -H 'Authorization: Token <TOKEN>' -H "Accept: application/json"

  4. Obtaining a PRS for breast cancer:
    curl -k -XPOST -F "bc_prs_reference_file=BCAC_313_PRS.prs" -F "sample_name=SampleA" \
    -F "vcf_file=@/home/xxx/sample_BCAC_313.vcf" \
    https://boadicea-test.ccge.medschl.cam.ac.uk{URL}/vcf2prs/ \
    -H 'Authorization: Token 428a58eaa1380d6e8f3a5e4473528289599302ac<TOKEN>' -H "Accept: application/json"

...