diff --git a/webapp/home/forms.py b/webapp/home/forms.py index e8d619f1..fb242149 100644 --- a/webapp/home/forms.py +++ b/webapp/home/forms.py @@ -416,6 +416,8 @@ class CellRangerRequestForm(BaseAccessRequestForm): name = forms.CharField() email = forms.EmailField(validators=[validators.institutional_email]) institution = forms.CharField() + agree_terms = forms.BooleanField() + agree_usage = forms.BooleanField() ACCESS_FORMS = { diff --git a/webapp/home/templates/home/requests/access/alphafold.html b/webapp/home/templates/home/requests/access/alphafold.html index 5ca29a4e..1ac1af4d 100644 --- a/webapp/home/templates/home/requests/access/alphafold.html +++ b/webapp/home/templates/home/requests/access/alphafold.html @@ -33,69 +33,7 @@

Galaxy Australia AlphaFold 2 Access Request

{{ form.non_field_errors }} -
-
- - {{ form.name.errors }} - -
- -
- - {{ form.email.errors }} - - - - -
- -
- - {{ form.institution.errors }} - -
- Your department, organization or research institute -
-
-
+ {% include 'home/requests/access/snippets/personal-details-fields.html' %}

diff --git a/webapp/home/templates/home/requests/access/cellranger.html b/webapp/home/templates/home/requests/access/cellranger.html new file mode 100644 index 00000000..88ecf9b7 --- /dev/null +++ b/webapp/home/templates/home/requests/access/cellranger.html @@ -0,0 +1,129 @@ +{% extends 'home/header.html' %} + +{% load static %} + + +{% block head %} + + +{% endblock %} + + +{% block content %} +

+ +
+

Galaxy Australia CellRanger Access Request

+ + + arrow_back + Back to support menu + + +
+ +

+ Cell Ranger is a set of analysis pipelines, from 10X Genomics, that process Chromium single cell data to align reads, generate feature-barcode matrices, perform clustering and other secondary analysis. +

+ +

+ The following Cell Ranger tools are available on Galaxy Australia: +

+ +

+ cellranger mkfastq + demultiplexes raw base call (BCL) files generated by Illumina sequencers into FASTQ files. It is a wrapper around Illumina's bcl2fastq, with additional features that are specific to 10x Genomics libraries and a simplified sample sheet format. +

+ +

+ cellranger count + takes FASTQ files from cellranger mkfastq and performs alignment, filtering, barcode counting, and UMI counting. It uses the Chromium cellular barcodes to generate feature-barcode matrices, determine clusters, and perform gene expression analysis. The count pipeline can take input from multiple sequencing runs on the same GEM well. cellranger count also processes Feature Barcode data alongside Gene Expression reads. +

+ +

+ cellranger mkgft + a simple utility to filter genes based on their key-value pairs in the GTF attribute column. +

+ +

+ Cell Ranger is available on Galaxy Australia for Australian researchers. Please apply for access, using your institutional email. +

+ +
+ + {% csrf_token %} + + {{ form.non_field_errors }} + + {% include 'home/requests/access/snippets/personal-details-fields.html' %} + +
+
+

+ The + + CellRanger End User Licence Agreement + + must be read and acknowledged prior to access being provisioned. +

+ {{ form.agree_terms.errors }} + + +
+ +
+

+ The use of Cell Ranger is for academic or non-commercial research + purposes. You must agree to this prior to access being provisioned. +

+ {{ form.agree_usage.errors }} + + +
+
+ +
+ Privacy Collection Notice: by completing this form you agree that your + responses will be provided to the Australian BioCommons and Galaxy + Australia and will be used solely for the purposes of determining + suitability for access to the Australian CellRanger Service. Your + responses will be protected against unauthorised access and use; providing + your name is required to enable any follow ups. For more information, + please see the + + BioCommons Privacy Statement. +
+ +
+
+ +
+
+
+ +
+{% endblock %} + + +{% block script %} + +{% endblock %} + + +{% block onload %} +{% endblock %} diff --git a/webapp/home/templates/home/requests/access/fgenesh.html b/webapp/home/templates/home/requests/access/fgenesh.html index ca8c8995..a9fbcf32 100644 --- a/webapp/home/templates/home/requests/access/fgenesh.html +++ b/webapp/home/templates/home/requests/access/fgenesh.html @@ -37,69 +37,7 @@

Galaxy Australia FGENESH++ Access Request

{{ form.non_field_errors }} -
-
- - {{ form.name.errors }} - -
- -
- - {{ form.email.errors }} - - - - -
- -
- - {{ form.institution.errors }} - -
- Your department, organization or research institute -
-
-
+ {% include 'home/requests/access/snippets/personal-details-fields.html' %}
diff --git a/webapp/home/templates/home/requests/access/snippets/personal-details-fields.html b/webapp/home/templates/home/requests/access/snippets/personal-details-fields.html new file mode 100644 index 00000000..091ff298 --- /dev/null +++ b/webapp/home/templates/home/requests/access/snippets/personal-details-fields.html @@ -0,0 +1,62 @@ +
+
+ + {{ form.name.errors }} + +
+ +
+ + {{ form.email.errors }} + + +
+ +
+ + {{ form.institution.errors }} + +
+ Your department, organization or research institute +
+
+
diff --git a/webapp/home/tests.py b/webapp/home/tests.py index f2546896..aaceeb30 100644 --- a/webapp/home/tests.py +++ b/webapp/home/tests.py @@ -181,17 +181,7 @@ def test_it_can_handle_request_for_alphafold_access(self): 'email': 'test@uq.edu.au', 'institution': 'University of Queensland', }) - self.assertEqual(response.status_code, 200) - self.assertContains( - response, - 'Thanks for your submission', - ) - self.assertContains( - response, - 'please check your spam folder', - ) - # Mail sent to admins and user - self.assertEqual(len(mail.outbox), 2) + self.assert_access_form_success(response, auto_action=True) def test_it_can_handle_request_for_fgenesh_access(self): response = self.client.post('/request/access/fgenesh', { @@ -202,15 +192,39 @@ def test_it_can_handle_request_for_fgenesh_access(self): 'agree_acknowledge': 'on', 'matrices': [genematrix_tree.as_choices()[0][0]], }) + self.assert_access_form_success(response, auto_action=False) + + def test_it_can_handle_request_for_cellranger_access(self): + response = self.client.post('/request/access/cellranger', { + 'name': 'John Doe', + 'email': 'test@uq.edu.au', + 'institution': 'University of Queensland', + 'agree_terms': 'on', + 'agree_usage': 'on', + }) + self.assert_access_form_success(response, auto_action=True) + + def assert_access_form_success(self, response, auto_action=True): + """Assert that an auto-action form has been successfully submitted. + + Auto-action forms send an email to user to let them know that access + has been granted. Non-auto-action forms do not send an email because + manual intervention is required. + """ self.assertEqual(response.status_code, 200) self.assertContains( response, 'Thanks for your submission', ) - # FGenesh needs to be actioned by admins, so user mail should not be - # sent - self.assertNotContains( - response, - 'please check your spam folder', - ) - self.assertEqual(len(mail.outbox), 1) + if auto_action: + self.assertContains( + response, + 'please check your spam folder', + ) + else: + self.assertNotContains( + response, + 'please check your spam folder', + ) + expect_len = 2 if auto_action else 1 + self.assertEqual(len(mail.outbox), expect_len)