charite/jannovar

Rest Server Error: Bad Message 414 reason: URI Too Long

janeliutw opened this issue · 0 comments

Describe the bug
There's a couple of variants with a long alt or ref allele that was not able to be annotated by Jannovar due to the long request uri.
Error

Bad Message 414
reason: URI Too Long

log

WARN URI is too large >8192

To Reproduce
Steps to reproduce the behavior:

  1. Run the rest server java -jar jannovar-cli-0.40-SNAPSHOT.jar -d data/hg19_refseq.ser -d data/hg19_ensembl.ser
  2. Then, query with
/annotate-var/refseq/hg19/chr1/111926150/GGCACTCCAGGGGACTAGAAGCCCAGGTAAAAGGCCCAAGGCCCACTTTGTTCCCGTGAGTTCCCTGTAAGACTTTCCCCTCCACCTTCCAGTAAAGGCTGTTTCAGAGCATGGAAGGCCTGGCCTTCCCAGGAATAACTCTGACCAGGCCCTCTTGCTTTCTTGAGTCCTCTCCTTAAATACATCTCAGCTTTTGGATTTTGGTTGTATTGATATGGTCATAAAGAAGGAGGCTTATTCTAGAACAGAGTCTCTAGCCTTGGAAAGTGAAAATTACAGAGAAAAGACATGGGGCACACACTTGTGGAAGCATACTCTCCCACACACTCATATCCACATTTGTGTGCACACGTCCATGTACTCACCATAGCATGTGCACGCATGTATGCATGCACGTGTACAGATGTGCACACACACACACAACCTGAGAAATCAAGATTTAGTCTGGGAATAGATTCTTGCATGCAAGGAGAAGCAAACAACAGATATGAGTACAAAGCGGGCAGGTGTGGGGAGAGGAGGCTACTCAGAGTGAAATCCAAAGATGTATTCCTATGGGAGAAAGAAACCAAAAGGAATGGAAAAATGTGTTGACTCTAATATTTCAGAGCAGTCAAGTGATAGTGGCCAGAAAGCTGAAATTTGCCCCTAGGACATACTGTGGATTCACAGCACCTCCTGACAACCATTCACCCCATACTCAACCAGTCTGAGTAGAGATGGTGTTACTCCCTCCCCTTCCCCTTCCTTGCATTGAAGGTTCATGACAGAAATGCCATGCTGTGTCCCCACCCATCTTTCCGGCCAAAGCCTCAGGTCCCATCCAACCCTTCCTCCTCTCTGTTGTGAACTCCTTGCACTCAGGCACCTGTGGTGAGTCTGCCTGGGTGTGCAGAAAACCTCTTGGCTTCTGGTACTCACGTCACCATTCTGAGCCTGCTGGGGTCCTGTTGCCTGCAGGAAGGAGGCATGTACTGCTGAGGAACTGCCAGCAGGAAGGTCTCGGTATCCACAATGGCCTGGCAACCCTCAGAGCACAAGCCAGTGGCCTGGTTACCGATGGCAAATCTGAGGGGGACACCAGGACAAAGGGAATCAAGTGCCTCTACTGAAAACATGAGCCATGTCATCCCTTGTCCTCCAACCCAGCAGCTCTGATGTTCTTCTTCTTCCAGGCAGCCAAGCCACTCCTATTACACATCTGCCCATGAAATGCTTCTGTCCATTTGTCATTATTGGAGTCGTATCCTCAGTCTTGATTTGGTGCTCACTCCAGCTCTGACTGAAAGCTCTAGGAAGACAGAGCCTGTGTCTTATCTTCTTTCATCTACCTATATGGGGTCCAGCACATAGTGCCAAACACAGTCAGGGCTTGTAATCAGTAAATAGCTGCATTTTGAGCACCTACTATGTGGAAGACACTCTTTCAGGATTTATGGTGATACAAGGAGTGGGTAATTAGTGCTTACTGCTTTAAGGAGCTTATTCTAATAGAGATGGAACAACACAATTAATCAAGCCATGACTAACACTGTAAGGCAGTAGCTGATAAACCCCGTAATGTGGTACATAGACTCTTACATGATGCAGTCTCTGATTCCTTGTCTTGCTTTTTTCTACTGCTCTACCCTTCCTCTTCATCCCATATAGATGTGTTGAGATCTGTCTATGAGCCAGGTATCATGCAAGGCACTCGGAGATACAATGGTAAACAAGACATACACCACAGTCTAGTGGAGAGCCCAGACATTTAACAAAAACACACAAATGATGTCTCATTGCAGCCCTGATAGGTGCACATTACAATGTGCCAGAGAAAAGGGGACTTGATCTTTCTTGGGAAGCCAGAACAAGGATTTTTCTGAGGAAGTGATAAAGGATGAGTAGAATTGGGCTATATGAAAAGCCACCTCCATTCCATGCACAAATAATCTGCCAAGCTCTTACCTCTTTCTGCTCTTGTAGGTTGGGCTGTTTCTCCAGTGCCTTACCCAGTGACTAGGACATGTTAATTGTGACAGCAGCACAGGTAAGCATTATAGGATCAAAAGAGAAAGAAATCACTGTGCTCTGGGCCCCTGGGAGGATTTTTAGGAGAAGATACTAATTAATCTGGGCTTTGAGGAATGCCTACAAGTCAAGTAAGCACTCCAGGTGGCATGATTAAAAGAACAAAAGCAAGAAAATCATGGCCAGGTGCAAGGACTTGTTGAAGTCTGTGCTTAATATCTGGAAGCACTGAGAAGCTATATTGATAGGTGGAGCCGAGATTCTGTATGGTCTTAAATACAGATCAAAGGAGTTTTGTCTTTAACTGGCATGTGATAGAGAATTCTCAGGTGTAAAAATAACTGATTTGAGCACAAGCTTAACTGATCCCAACGCGGATCAAATAAGCTTGTGCTCAAATTTTGGCTTTATAAAATGTGACTTTGGACAAGTTACTTAGCCCTCTGAGCCTTGACTTCTTTATCGATAGAATGAAACGTATTGCTGACCTCCTTATAGTGCTCTTGTGGAAATTATATGCAATAATATATTTAAAGTACTTAGGCCGGGCACGGTGGCTCACACCTGTAATCCCAGTACTTTGGGAGGCCAGGGTGGGTGGATCATTTGAGGTCAGGAGTTTGAGACCAGCCTGGCCAACATGGTGAAAGCCTGTCTCTACTAAAAGTACAAAAAATTAGCTGGGTGTAGGGGTGGGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGAAGGGGAATCGTTTGAACCCTGGAGGCAGAGGTTGCAATGAGCCGAAATCACATTACTGCACTCCAGCCTGGGCAACAGAGTGAGACCCTGTCTCAAATAAATAAATAAATCAAATACTTAGCATAGCACCTGGCACATATCAAACATCAATGACAGCTATTACTTTCACTAATGATAGAAGTAGTAAAGATTATGCTGATGGAAATCATCAAGCTTCCAAGAATAGGAACAGATTCACAGTGCCTAGGAATGGCCAACCTGCCAGCATGCTGAGACTCAGTACCCAGTTCAAAAAGTTCAGACCAGAGCTAGACACCAGAGTCTACTGAGCTCCAGGACCACCTCAGCCTGGAGGCTGGTGATTCTATTTAAGAAACCTGTGTGATGTGGAGGAACAGGAAATGTTGTTAAGCTGGAGGAACACCCTGCGAGTGTCCACAATCCACAGGAATTGCCCTCTCTACTTACTCCTCGATGGCAATCTGCCAGTACAGTTACGGGCTGACAGGGGTCCAGATGATCTGACCAGAATAAAGTTGGGGTCCACACCTCCAAGGATGAGCTCTCCACAATACTGGCGGGTTGGCTGGCTAGGAAGAGATGTACAAGAACGTGAGTGCCCACACACAGTCGGTGAGGCAGTTCTCTCTCCTCTCTCCTTCCTGCACTCCCTCAGACACAGGGGTGCTGCAGACGAGGGGACGCTGTCCTCTGAGTTGCTCTCAGACTCAGCCTGCTGAGGCACAGGAGGAGACTTCTCAGAGTAACACCAAACTACTAGACACGATGCCCATAAAGAAGACGGAAGTGGAAACCAGGCACCCAAAAACAAACTAGAAAAGCATCCCAGAGAAACCCTCCCTGGGAGGAAGTGAGAACAATAGGAAACCGTTTTAGGGACAACTAGAACGGGGCCTGAGAGAGCCCGCGAGGCGCTCTGAGAGGCATGCTCCCATCATGGTCAGGTCATTAACTAGACAATACTGGAAGGACTTTGGCCTTTTGTGCTTCTTATGCTGGCCAGTCGTAGAAGAAAGACATGTGAACTTTAGGTACTTTGAGGATCATGTGTTTGGGAAAGAAGGAACAAGGGATAAAGTTTGGCACAAAAGTACAGTGCCAAGTGGAGCAAGAAAAGTACTGGATTTGTGATCAAGATATTTGAGTTTGAGTCTTGGCTTCACACTTACTGTGAGTGACCTTGATCAATTCTGACAAGCTGTTTGAGCCTCCATTTGCTCCCTGGCAAGATGGGGCTAATATGAGGATTTTTGAGATGTCATTTGAAGTAATTGCTAGGAGAACACTTTATAAAGCCAGACATAGTATTATGATTATTCCTCCATTATAGTTCTCTTTACTAGTAATGCTCATGTGGCTTGTTCTTTAGTGCTAATACAGCAGTCTCCAGATTTCCTAAATAAACACTGAGGGACTGTTACTCAATTTTATGAAAGGTCATCTTGTGGCTTACAGCTAATATAATTTAAAATTCTTTTTTTTTTTTTTTTTGAGATGGAGTCTCACTCTGTCGCCCAGCCTGGAGTGCAGTGGCGTGATCTCGGCTCACTGCAAGCTCCGCCTCCCAGGTTCACGCCATTCTCCTGCCTCACCCTCCCGAGTATCAGGGACTACAGGTGCCCACTACCAAGACCGGCTAATTTTTTTGTATTTTTAGTAGAGATGGGGTTTCACCATGTTAGCCAGGGTGGTCTCAATCTCCTGACTTCGTGATCCGCCTGCCTCGGCCTCCCAAAGTGCTGGGATTACAGGTGTGAGCCACCACGCCTGGCCTAATTTAAAATTGTTAAAGTGTATTTAAAATAAGATTTTTCCCAAATTTTCTGAAATACATGAATTTTGTATAGCAAGTTATACTCATTGTGTCAGAACACCTTATAACCTGGACCCCATCTGATCTTGGGTTGCCTAGAATCCCCAGGGACCCTCATTTTCTGAGCCCTTCACAGGACGAAGGTTCTCACCAGGTGAAGTAGAAGCTGAAGACGGGCTGAGTAAGCTGGCTCTGCTGCAGCATCCCCTGCATTACTGTAGGGGAATTCCCCTCTGCCATGTTTGGGTAGGCCATTCCCAGGATCCCGTCAAAGTCTGAATAGTAAAAGGGGTCGCTGGGCTCATTCTCACTCAGGCCAAACTCCTGGTTATTGACAACGATGTTATGAACCTATGGCAAGCAGACAGTATGGCTTGACAATTCAGGTGCACAAATTGCATGGCTTCCCAGACTAATGTGCACAGGGTATGGAATCCAGAAACCCTCCTGGGGAGAGAACATCAGCTTCTTTCATGCAGAACCCAACCACAAGGGTGGGAGTGGAGGGTGAAAGAGCAACCTTTCTCATCAGGTGTGTCTCGGAAAAAAGAGTGTGGATGTTGGAGAAGTGGAAGAAGTTTTTTTCTGGAGTTATAGTTTCCACTTCCATGGACAGTGAAAGAATTGAATGGTTTCATACTGAACAATCTATGTGCAAGAATGATTAGAGGAATTGTAGGTGTTTGAACTAAAGAAATAAGAAAATAGTAAAAAGGCTTGTCTTCAAATATGCGAAGTGCAACTGGGTGGAAGAGGCAATAGACTTATCTGTGTGTTTCCAGAGGGCAGAGTTAGGACCACACAGCAAAGCTGCAAGAAGACACAACAACTTTAGCACAACATAAAGGCTTCCTGCAGTCAGGACTGCTGTGGAAGCGATTTACGTCCTGGGATGAAGGCTGAATTAGTCTTTGTGTTCCTTCCAACACTCAGCTTCTGGGAAGCTTGGACCTAATTAGTAAGCATGGGTTTCTCTAATAGTGTAAGACTCTAGAAAATGGGAGCCAAACCACAGACCCTCAGAGGCTATGAAAACATTACTTACAGTCACAGTGTCATAGCCCAGGAACACACTCAGGCTGCCACTCCCATAGGATAGTCCATAGGTTTGTCCATCGTTTCTGAAGGTGGAGGACAGGCTGGGATTGAACCTGTTGTGATTGGCTATAGAAAGACAGAATGGAATATTCATTTCATTTGCAGTTTTCCAAAACACGTGAAGGCTACTTATCCTTGATGGATTGGGCTCATCAGACCAAGGCTGGGATAGGGCATCACCCTAGATCTTTTCTTGTAGACAAACTGTGCTAGTCCTAGAAAAGTCTATGACACACTTTGCCCAAATTCCTTCCAGCTGACCATTCCCTGAGAGAAAGATTGCCTCAGACTTACCAGAAACACTGGGCCACAGAAGGGCGCTCAGGGGAAGGAAAGGAAGCCTTAGTCTGTTTCTGCTGTCTGTCTCCAAAAAAGTCAGCACTTCTGAAAAGTGGTGCTGAAGTGACAGACTGAGAGCAATTTCTCAATGTTCCAAACAGAAGGAGGATACGTGATGGACAAAGAACTCTGGACTTAGAATGATTCACCTGCACTCAAATCCCAGCTCCACTCCTCTATCTGCTCCCCTCATGGTGTGGAGGGTGGTAGTGACATACTCACAGCAGACTTGGCTCTGGCAGTAGATGGAGGGCAGCTACAGATTGGAGGAACCCGTATCAAAGAGGACTAGGAAATTTTGGGGTGGTGTCCCAGTGCTGATCTCCCCAAAGTAGAAAGACTGCAAAAGAAAGGTTTATCACCTTCATTAAGTAACCAAGCCTTGTCTTAAGAACGGACAAGCAGTTAACCCACAGGAAGCCACCCTCTGCCCAAATCATTTTCTTGGGGGAATGAGAGGCTTATCCCACAAGTTTTCCTTCCCATCTGGAGTTAGTTCCTTTCAAGATTCTACTTTTTGTCCCTAATTGCAAGCCTTTGGCCAGCTAAGACTTAGTATGGCAAGACAATATCCTCTTCCAAAGTGTTTTCTACTTTTACAATAAGCTGATATCTTCACAGATTTATCATGCTATACTGGAGTACCCAGAATTGGGGAAACAATCACTTTTTCTTTTTTCCTGGTGTCCAGACACACACACACACACACACACACACACACACCACCACCACCACCACCACCATCACACTCTTCTCCCCTTCTCTTTCAATGTTAGATACTTCTACCACCATTTTCCTCCCTTCTGGTCACACACTAGCAGAGGGTGCTAGGCAGCTGGAAAAGAGACAGCATGGAGAGAAAGAAGAGCTCTTCACTGGAAGGTAGTTTAAGCTCTAAGTTAACATGGGCCAGTCATGTCACTTACCTACCTCTAGTTTCTTCACCTATAAAATGTGGGTGTTGAAATAGAAGATCCCTAACGTGGCTTCCAGCTCAGACATGCAACATAACATCTCACTAAGGACAGTCCACAGGACAGCAGAATGTCAAGATGCCCTGATGAGACTTGGTGGGCTTGAGAATATTCAGACATTTGCTCCGGGGACTTTGCATCTTTCCAAAGAGGGAGAGATGCAGTATCTGAGCCACTGGAGCTTTTGCCTGACATCCTCACATGTATTTTCCTTCTTTCCCCTGCAGCTCATTGCCAGGACTTCCTTTGGATCTCTCAGTTGACTTGAACATTCCCACCATGAATCTCTTAATCATGTAAATGAGGCTTTAGCAGGATGGGCCAGCAACGAGAGGAAAGGAGGAAAGAAAAGGAATTACTATACTCTTAGATGGTACCAACTCATAACTTGTTCTGATTCTTTCCATAGAAAGGGTGAGACTTTGGTTTAGTAACTAGTCAAAAATTACAGCTAATGAGCAGTATAAGTGAGTATCTAAGAATGGTGGTTATACAAGGGTTATGGACATTCCCCGCCCCATCACTCACATCCAGGTAGTTGGTGAAGGGCTCATAAGCAACAGCATCATTATTGAAATAATACTTGGCAATTGGATCAGCCTTTGGGTGGTCCCTCAGAAACGTCTCCAGTACACCCTGCTCCTCCATTCTCTGGCGGATAGACTTGCCTTTCCTCAGAATGATCCTGCAGAGAATAGGGTAAACAAACAAAAATAGAAACGGAATGAGTCTTGGCCCCATGAAAGCAATCTCTTCAATGACCTGACCTGCAGTGTTTAAATCTCTCCAGTACTCTACTCAAGAAAAGCCCTCTATAAGCAATGCTCTCAGATTTTAGCACATTCTAACCACTGCTGTCACTCCAGAATTCCTGGTGTGGAATAGACCATATCATATTTTTGGGGTATTGTGTTTATATATTGTTTCCAGAGAATAAATATCTTATTTCTTTCCAATCTCTTCTATAAGTTTGGGGTAAGGATTGTGCATCCTTCCTTCTTAGCCAACACCCACACCCATAACCCCACCCCCCAAATACTCACACACCATCCATCCATTTCAAGTCTTAGCCCCCAGTGGGTGTTCCTTTCACAGTAAAAGAGTCAACCTGATTGGTGTTCCAGGAGACCTACAGAGGAAGGCCTTTGCCCTTTCCTAGCTTGTCAT/G
  1. . See error

Additional context
Jannovar uses Spark for Rest server, which runs on an embedded Jetty web server. Jetty has a Request-URI limit, which by default is 8192.

References:

Proposed Solution

Create a new POST endpoint that accept the same data in the request body.
Endpoint: /annotate-var/
Request body example:

{
"source": "refseq",
"assembly" : "hg19",
"chr": "chr1",
"pos": "111926150",
"ref" : "GGCACTCCAGGGGACTA",
"alt" : "G"
}