Code Monkey home page Code Monkey logo

qkay's Introduction

Introduction

Qkay is a Docker containerized web application developed using Flask, which serves as a manager for the quality assessment of large neuroimaging studies.

Prerequisites

To run the Qkay package using Docker Compose, you'll need to have Docker and Docker Compose installed on your machine. You can download and install them from the following links: Docker Docker-compose

Usage

Before using qkay, you will need to set up the necessary environment variables by completing the .env file. In this file, you should provide the path to the database and the path to all datasets that you want to use. If there is more than one dataset, the path should be the parent folder.

Run the containers with Docker Compose:

$ docker-compose up

The application will be reachable on http://localhost. Here are the steps you need to follow to set up the environment variables:

1. Open the .env file in a text editor.
2. Set the DATABASE_PATH variable to the path of the database file you want to use.
3. Set the DATASETS_PATH variable to the path of the folder containing all the datasets you want to use. If you have more than one dataset, provide the path to the parent folder.
4. Save the .env file.

To run qkay using Docker Compose, follow these steps:

1. Clone the qkay repository from GitHub: git clone https://github.com/nipreps/qkay.git
2. Navigate to the qkay directory: cd qkay
3. Run "docker-compose up" to start the app and the database.
4. Open a web browser and navigate to https://localhost.
5. Log in to the app using the following credentials:
    Username: Admin
    Password: abcd
6. Once you have logged in, go to the Admin panel and change your password to something more secure.
7. Once you have logged in, go to the Admin panel and add a dataset by clicking on the "Add Dataset" button. You will need to provide the following information:
Dataset Name: The name of the dataset you want to add.
Dataset Path: The path to the dataset on your computer relative to the /datasets/ folder mounted in the Docker image. For example, if the dataset is located at /data/ds1 on your computer and your .env file contains the variable DATASETS_PATH=/data/, you should enter /datasets/ds1/ as the dataset path. Note that the DATASETS_PATH variable in the .env file specifies the parent folder that contains all datasets, and the dataset path you enter in the Admin panel should be a subfolder of this parent folder, mounted as /datasets/ in the Docker image.

Contributing

We welcome contributions to Qkay. Please read the contributing guide to get started.

License

Qkay is released under the Apache 2.0 License.

qkay's People

Contributors

esavary avatar celprov avatar

Stargazers

Hugo Fluhr avatar Sofía Férnandez avatar Jaime Rios avatar Eric Earl avatar

Watchers

Oscar Esteban avatar Mathias Goncalves avatar

qkay's Issues

The Admin user should not be a normal user

IMHO, it makes more sense that the admin user is used only for assigning datasets.
As such, it should not be possible to assign datasets to rate to the admin.
Additionally, the admin user should not have a page showing him what datasets are assigned to him; it should only have access to the admin panel page.

Persist the grade after closing the report

What would you like to see added in this software?

When the report is reopened after grading, the previous grade isn't visible. It would be helpful to show it for reassessment.

Do you have any interest in helping implement the feature?

Yes

Additional information / screenshots

No response

The interface to assign dataset offers several options such repeating images, but the implementation of these options is not functional

What happened?

#17 is breaking the implementation of the following options. Those options need either to be deleted from the interface or correctly implemented.

  • Randomize
  • Repeat images
  • Two conditions
  • Blind inspections

What command did you use?

n/a

What version of the software are you running?

latest

How are you running this software?

Local installation ("bare-metal")

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

No response

Additional information / screenshots

No response

Implement in the admin panel a button to download the ratings into a dataframe

What would you like to see added in this software?

For now, it is not clear to the user how to extract the ratings from the database once the reports have been rated.
It would be very handy to have a button that allows the extraction of the ratings from the database and storing them in a data frame in TSV format.
I already implemented the code to perform the ratings extraction, it is available at https://github.com/TheAxonLab/hcph-sops/blob/mkdocs/code/qc/from_mongodb_to_dataframe.py.
In my opinion, the filter passed to find_pandas_all that determines which ratings you want to extract and where the TSV file should be saved should be options given by the administrator.

Once this feature is implemented, how to extract the ratings should be described in the documentation of the repo.

Do you have any interest in helping implement the feature?

Yes

Additional information / screenshots

No response

Cannot docker-compose up

What happened?

When I try to launch q'kay with docker-compose up I get Permission denied error.

So I thought let's launch it with sudo sudo docker-compose up, but then I'm getting another error. Not sure if that error is related to trying to launch it with sudo or because of another bug.

What command did you use?

`docker-compose up`

What version of the software are you running?

latest github main

How are you running this software?

Docker

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

(base) cprovins@hos74379:~/code/qkay$ docker-compose up
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect
    sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 532, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
  File "/usr/lib/python3/dist-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 557, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 544, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 657, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 33, in <module>
    sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
    command_func()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 200, in perform_command
    project = project_from_options('.', options)
  File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 60, in project_from_options
    return get_project(
  File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 152, in get_project
    client = get_client(
  File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 41, in get_client
    client = docker_client(
  File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 170, in docker_client
    client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
(base) cprovins@hos74379:~/code/qkay$ sudo docker-compose up
Creating qkay_db_1 ... error

ERROR: for qkay_db_1  Cannot create container for service db: invalid volume specification: 'qkay_db-data:.:rw': invalid mount config for type "volume": invalid mount path: '.' mount path must be absolute

ERROR: for db  Cannot create container for service db: invalid volume specification: 'qkay_db-data:.:rw': invalid mount config for type "volume": invalid mount path: '.' mount path must be absolute
ERROR: Encountered errors while bringing up the project.
(base) cprovins@hos74379:~/code/qkay$

Additional information / screenshots

No response

Qkay cannot deal with dataset name that have spaces

The dataset assignment fails because request.form.get("datasets dropdown") cuts the dataset name at the first space.
So that data_selected is not found within the database of datasets.

e.g
dataset_name = "IXI dataset - MRIQC derivatives"
data_selected = "IXI"

Scrolling in the reports

The base window has scrolling option enabled (and seems slightly oversized), resulting in no or difficult to find internal scrollbar within the report.

Additional field in reports

Reports should include the ID of the inspection they are associated with. This could be useful, for instance, if the same user conducts both blind and non-blind inspections of the same dataset simultaneously.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.