# Webserver

## LSHTM TB-Profiler webserver

If you don't have access to a linux or macOS environment you can still use tb-profiler by using our webserver <http://tbdr.lshtm.ac.uk/>

You can upload your next generation sequencing data in **fastQ** format. You can upload one or two (forward and reverse) fastq files. When you upload your data, the run will be be assigned a unique ID. Please take a note of this ID as you will need to to find your results later. Batch upload of samples is also possible.

## Setting up your own webserver

The code for the webserver <http://tbdr.lshtm.ac.uk/> is available on [here](https://github.com/jodyphelan/tb-profiler-webserver). This is still in early development but you can use it to set up your own instance of the server. To do this run the following code

```
# Install libraries
git clone https://github.com/jodyphelan/tb-profiler-webserver.git
cd tb-profiler-webserver
python setup.py install

# Run flask
export FLASK_APP=tbprofiler_web
export FLASK_ENV=development
flask run

# Run rabbit-mq server
rabbitmq-server

# Run celery
celery -A tbprofiler_web.worker worker --loglevel=info --concurrency=1
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jodyphelan.gitbook.io/tb-profiler/quickstart/webserver.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
