Permalink
Browse files

Merge remote-tracking branch 'origin/flask' into develop

  • Loading branch information...
amberzw committed Sep 6, 2017
2 parents df6919c + bd28b76 commit 80ca911db2bde82e97db8860ea9d5c1aeb4ca02b
Showing with 285,575 additions and 563 deletions.
  1. +6 −2 .travis.yml
  2. +18 −0 README.md
  3. +25 −17 pvacseq/server/app.py
  4. +5 −0 pvacseq/server/config/files.json
  5. +26 −0 pvacseq/server/config/schema.json
  6. +550 −55 pvacseq/server/{swagger → config}/swagger.yaml
  7. +403 −0 pvacseq/server/controllers/database.py
  8. +0 −474 pvacseq/server/controllers/default_controller.py
  9. +168 −0 pvacseq/server/controllers/files.py
  10. +327 −0 pvacseq/server/controllers/processes.py
  11. +448 −0 pvacseq/server/controllers/staging.py
  12. +685 −0 pvacseq/server/controllers/utils.py
  13. +25 −0 pvacseq/server/controllers/watchdir.py
  14. +66 −9 pvacseq/server/test_start.html
  15. +327 −0 pvacseq/server/visualizations.py
  16. +21 −6 setup.py
  17. +56 −0 tests/mock_api.py
  18. +1,003 −0 tests/test_api.py
  19. +3 −0 tests/test_data/api/Test.final.tsv
  20. +60,679 −0 tests/test_data/api/genes.fpkm_tracking
  21. +63 −0 tests/test_data/api/indels.bam_readcount
  22. +560 −0 tests/test_data/api/input.vcf
  23. +198,318 −0 tests/test_data/api/isoforms.fpkm_tracking
  24. +1,202 −0 tests/test_data/api/sample_basic_run/MHC_Class_I/basic_run.combined.parsed.tsv
  25. +1 −0 tests/test_data/api/sample_basic_run/MHC_Class_I/basic_run.filtered.binding.tsv
  26. +1 −0 tests/test_data/api/sample_basic_run/MHC_Class_I/basic_run.final.tsv
  27. +25 −0 tests/test_data/api/sample_basic_run/MHC_Class_I/basic_run.tsv
  28. +25 −0 tests/test_data/api/sample_basic_run/MHC_Class_I/basic_run.tsv_1-24
  29. 0 tests/test_data/api/sample_basic_run/additional_input_file_list.yml
  30. +35 −0 tests/test_data/api/sample_basic_run/config.json
  31. +20 −0 tests/test_data/api/sample_basic_run/pVAC-Seq.log
  32. +3 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/endpoint_full.chop.tsv
  33. +4,763 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/endpoint_full.combined.parsed.tsv
  34. +48 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/endpoint_full.filtered.binding.tsv
  35. +3 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/endpoint_full.filtered.coverage.tsv
  36. +3 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/endpoint_full.final.tsv
  37. +25 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/endpoint_full.tsv
  38. +25 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/endpoint_full.tsv_1-24
  39. +1,202 −0 ...s/test_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full.HLA-E*01:01.10.parsed.tsv_1-48
  40. +1,181 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full.HLA-E*01:01.9.parsed.tsv_1-48
  41. +1,202 −0 ...s/test_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full.HLA-G*01:09.10.parsed.tsv_1-48
  42. +1,181 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full.HLA-G*01:09.9.parsed.tsv_1-48
  43. +1,572 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full.ann.HLA-E*01:01.10.tsv_1-48
  44. +1,620 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full.ann.HLA-E*01:01.9.tsv_1-48
  45. +1,572 −0 ...st_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full.pickpocket.HLA-E*01:01.10.tsv_1-48
  46. +1,620 −0 ...est_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full.pickpocket.HLA-E*01:01.9.tsv_1-48
  47. +1,572 −0 ...st_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full.pickpocket.HLA-G*01:09.10.tsv_1-48
  48. +1,620 −0 ...est_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full.pickpocket.HLA-G*01:09.9.tsv_1-48
  49. +96 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full_21.fa.split_1-48
  50. +96 −0 tests/test_data/api/sample_endpoint_full/MHC_Class_I/tmp/endpoint_full_21.fa.split_1-48.key
  51. +4 −0 tests/test_data/api/sample_endpoint_full/additional_input_file_list.yml
  52. +38 −0 tests/test_data/api/sample_endpoint_full/config.json
  53. +46 −0 tests/test_data/api/sample_endpoint_full/pVAC-Seq.log
  54. +25 −0 tests/test_data/api/sample_endpoint_input/MHC_Class_I/endpoint_input.tsv
  55. +25 −0 tests/test_data/api/sample_endpoint_input/MHC_Class_I/endpoint_input.tsv_1-24
  56. +96 −0 tests/test_data/api/sample_endpoint_input/MHC_Class_I/tmp/endpoint_input_21.fa.split_1-48
  57. +96 −0 tests/test_data/api/sample_endpoint_input/MHC_Class_I/tmp/endpoint_input_21.fa.split_1-48.key
  58. 0 tests/test_data/api/sample_endpoint_input/additional_input_file_list.yml
  59. +35 −0 tests/test_data/api/sample_endpoint_input/config.json
  60. +12 −0 tests/test_data/api/sample_endpoint_input/pVAC-Seq.log
  61. +25 −0 tests/test_data/api/sample_endpoint_processes/MHC_Class_I/endpoint_processes.tsv
  62. +25 −0 tests/test_data/api/sample_endpoint_processes/MHC_Class_I/endpoint_processes.tsv_1-24
  63. +96 −0 tests/test_data/api/sample_endpoint_processes/MHC_Class_I/tmp/endpoint_processes_21.fa.split_1-48
  64. +96 −0 ...s/test_data/api/sample_endpoint_processes/MHC_Class_I/tmp/endpoint_processes_21.fa.split_1-48.key
  65. 0 tests/test_data/api/sample_endpoint_processes/additional_input_file_list.yml
  66. +35 −0 tests/test_data/api/sample_endpoint_processes/config.json
  67. +12 −0 tests/test_data/api/sample_endpoint_processes/pVAC-Seq.log
  68. +414 −0 tests/test_data/api/snvs.bam_readcount
View
@@ -9,11 +9,15 @@ before_install:
- sudo apt-get -qq update
- sudo apt-get install -y ghostscript
install:
- pip install -e .
#Remove the following line when pvacseq-client is first pushed to the live pypi site
- pip install -i https://testpypi.python.org/pypi pvacseq-client
- pip install -e .[API]
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3
- sleep 3
services:
- postgresql
script:
- TEST_FLAG=1 python3 -m unittest discover -v
- prove --recurse --verbose
View
@@ -30,5 +30,23 @@ If you have an old version of pVAC-Seq installed you might want to consider upgr
`pip install pvacseq --upgrade`
## Web Client
If you would like to run pVAC-Seq with a user interface and built-in data visualizations,
install pVAC-Seq with the `API` extra:
`pip install pvacseq[API] --upgrade`
Then you can start the pVAC-Seq server by running the command:
`pvacseq-api`
Then navigate to `localhost:8000` in your web browser to manage pVAC-Seq.
###### Note: The pVAC-Seq Web Client (_pvacseq-api_) requires the following ports:
* Port 8080 for operating the internal api
* Port 8000 for serving the web client to your browser
* Port 5006 for rendering data visualizations
## Documentation
The pVAC-Seq documentation can be found on <a href="http://pvac-seq.readthedocs.io/">ReadTheDocs</a>.
View
@@ -5,29 +5,37 @@
import sys
import http.server
import socketserver
from threading import Thread
from webbrowser import open_new_tab
from flask_cors import CORS
from pvacseq.server.controllers.utils import initialize
#FIXME: sanitize sample name
def main():
def check_is_directory(directory):
fullpath = os.path.abspath(directory)
if os.path.isfile(fullpath):
raise argparse.ArgumentTypeError("Path \"%s\" must be a directory"%directory)
if not os.path.isdir(fullpath):
os.makedirs(fullpath)
# raise argparse.ArgumentTypeError("Path \"%s\" must be a directory"%directory)
return fullpath
app = connexion.App(
"pVAC-Seq Visualization Server",
specification_dir=os.path.join(
os.path.dirname(__file__),
'config'
),
)
def main():
app = connexion.App("pVAC-Seq Visualization Server", specification_dir=os.path.join(
os.path.dirname(__file__),
'swagger'
))
from werkzeug.routing import IntegerConverter as BaseIntConverter
class IntConverter(BaseIntConverter):
regex = r'-?\d+'
app.app.url_map.converters['int'] = IntConverter
initialize(app.app, set(sys.argv)) #initialize the app configuration
app.add_api('swagger.yaml', arguments={'title': 'API to support pVacSeq user interface for generating reports on pipeline results'})
app.app.secret_key = os.urandom(1024)
#Eventually, have this open a browser to whatever the main page is
# Thread(target=lambda:open_new_tab("localhost:8080/static/testpage"), daemon=True).start()
app.run(port=8080)
#setup CORS
CORS(
app.app,
#should match localhost at with any port, path, or protocol
origins=r'^(.+://)?localhost(:\d+)?(/.*)?$'
)
app.run(port=8080, debug='--debug' in sys.argv, threaded=True)
if __name__ == '__main__':
main()
@@ -0,0 +1,5 @@
{
"processes":"~/.pvacseq/processes.json",
"dropbox":"~/.pvacseq/dropbox.json",
"data-dir":"~/pVAC-Seq"
}
@@ -0,0 +1,26 @@
{
"chromosome":"integer",
"start":"bigint",
"stop":"bigint",
"hla_allele":"text",
"sub_peptide_position":"integer",
"peptide_length":"integer",
"transcript":"text",
"variant":"text",
"mutation_position":"integer",
"best_mt_score_method":"text",
"wt_epitope_seq":"text",
"ensembl_gene_id":"text",
"median_wt_score":"numeric",
"mt_epitope_seq":"text",
"protein_position":"integer",
"median_fold_change":"numeric",
"corresponding_fold_change":"numeric",
"reference":"text",
"gene_name":"text",
"median_mt_score":"numeric",
"variant_type":"text",
"best_mt_score":"numeric",
"mutation":"text",
"corresponding_wt_score":"numeric"
}
Oops, something went wrong.

0 comments on commit 80ca911

Please sign in to comment.