diff --git a/parsing.py b/parsing.py index 52b028e..1b66383 100644 --- a/parsing.py +++ b/parsing.py @@ -20,44 +20,44 @@ # USI specification: http://www.psidev.info/usi usi_pattern = re.compile( # mzspec preamble - '^mzspec' + r'^mzspec' # collection identifier # Proteomics collection identifiers: PXDnnnnnn, MSVnnnnnnnnn, RPXDnnnnnn, # PXLnnnnnn # Unofficial: MASSIVEKB # https://github.com/HUPO-PSI/usi/blob/master/CollectionIdentifiers.md - ':(MSV\d{9}|PXD\d{6}|PXL\d{6}|RPXD\d{6})' + r':(MSV\d{9}|PXD\d{6}|PXL\d{6}|RPXD\d{6})' # msRun identifier - ':(.*)' + r':(.*)' # index flag - ':(scan|index|nativeId|trace)' + r':(scan|index|nativeId|trace)' # index number - ':(.+)' + r':(.+)' # optional spectrum interpretation - '(:.+)?$', + r'(:.+)?$', flags=re.IGNORECASE ) # OR: Metabolomics USIs. usi_pattern_draft = re.compile( # mzdraft preamble - '^(?:mzspec|mzdraft)' + r'^(?:mzspec|mzdraft)' # collection identifier # Unofficial proteomics spectral library identifier: MASSIVEKB # Metabolomics collection identifiers: GNPS, MASSBANK, MS2LDA, MOTIFDB - ':(MASSIVEKB|GNPS|MASSBANK|MS2LDA|MOTIFDB)' + r':(MASSIVEKB|GNPS|MASSBANK|MS2LDA|MOTIFDB)' # msRun identifier - ':(.*)' + r':(.*)' # index flag - ':(scan|index|nativeId|trace|accession)' + r':(scan|index|nativeId|trace|accession)' # index number - ':(.+)' + r':(.+)' # optional spectrum interpretation - '(:.+)?$', + r'(:.+)?$', flags=re.IGNORECASE ) -gnps_task_pattern = re.compile('^TASK-([a-z0-9]{32})-(.+)$', +gnps_task_pattern = re.compile(r'^TASK-([a-z0-9]{32})-(.+)$', flags=re.IGNORECASE) -ms2lda_task_pattern = re.compile('^TASK-(\d+)$', flags=re.IGNORECASE) +ms2lda_task_pattern = re.compile(r'^TASK-(\d+)$', flags=re.IGNORECASE) splash_builder = splash.Splash() diff --git a/run_server.sh b/run_server.sh index 92e62f1..141426d 100755 --- a/run_server.sh +++ b/run_server.sh @@ -1,4 +1,4 @@ #!/bin/bash source activate usi -gunicorn -w 2 -b 0.0.0.0:5000 --timeout 3600 main:app --access-logfile /app/logs/access.log --max-requests 1000 +gunicorn -w 2 --threads=1 -b 0.0.0.0:5000 main:app --access-logfile /app/logs/access.log --timeout 30 --max-requests 100 --max-requests-jitter 20 \ No newline at end of file diff --git a/templates/mirror.html b/templates/mirror.html index 9d12e73..e499e10 100644 --- a/templates/mirror.html +++ b/templates/mirror.html @@ -69,6 +69,13 @@
+ + Download as JSON + +
+