Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions qiita_pet/handlers/api_proxy/prep_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def prep_template_ajax_get_req(user_id, prep_id):
'editable': editable,
'data_type': pt.data_type(),
'alert_type': alert_type,
'ebi_experiment_accessions': pt.ebi_experiment_accessions,
'alert_message': alert_msg}


Expand Down
2 changes: 2 additions & 0 deletions qiita_pet/handlers/api_proxy/studies.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def study_get_req(study_id, user_id):
study_info['study_title'] = study.title
study_info['shared_with'] = [s.id for s in study.shared_with]
study_info['status'] = study.status
study_info['ebi_study_accession'] = study.ebi_study_accession
study_info['ebi_submission_status'] = study.ebi_submission_status

# Clean up StudyPerson objects to string for display
pi = study_info['principal_investigator']
Expand Down
27 changes: 27 additions & 0 deletions qiita_pet/handlers/api_proxy/tests/test_prep_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,33 @@ def test_prep_template_ajax_get_req(self):
'editable': True,
'data_type': '18S',
'alert_type': '',
'ebi_experiment_accessions': {'1.SKB1.640202': 'ERX0000011',
'1.SKB2.640194': 'ERX0000008',
'1.SKB3.640195': 'ERX0000024',
'1.SKB4.640189': 'ERX0000020',
'1.SKB5.640181': 'ERX0000006',
'1.SKB6.640176': 'ERX0000025',
'1.SKB7.640196': 'ERX0000002',
'1.SKB8.640193': 'ERX0000000',
'1.SKB9.640200': 'ERX0000016',
'1.SKD1.640179': 'ERX0000012',
'1.SKD2.640178': 'ERX0000009',
'1.SKD3.640198': 'ERX0000013',
'1.SKD4.640185': 'ERX0000023',
'1.SKD5.640186': 'ERX0000017',
'1.SKD6.640190': 'ERX0000007',
'1.SKD7.640191': 'ERX0000021',
'1.SKD8.640184': 'ERX0000001',
'1.SKD9.640182': 'ERX0000019',
'1.SKM1.640183': 'ERX0000026',
'1.SKM2.640199': 'ERX0000015',
'1.SKM3.640197': 'ERX0000018',
'1.SKM4.640180': 'ERX0000004',
'1.SKM5.640177': 'ERX0000005',
'1.SKM6.640187': 'ERX0000022',
'1.SKM7.640188': 'ERX0000010',
'1.SKM8.640201': 'ERX0000014',
'1.SKM9.640192': 'ERX0000003'},
'alert_message': ''}
self.assertEqual(obs, exp)

Expand Down
4 changes: 3 additions & 1 deletion qiita_pet/handlers/api_proxy/tests/test_studies.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def test_study_get_req(self):
'study_title': 'Identification of the Microbiomes for '
'Cannabis Soils',
'number_samples_collected': 27,
'owner': 'test@foo.bar'},
'owner': 'test@foo.bar',
'ebi_submission_status': 'submitted',
'ebi_study_accession': 'EBI123456-BB'},
'editable': True}

self.assertEqual(obs, exp)
Expand Down
9 changes: 8 additions & 1 deletion qiita_pet/handlers/study_handlers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,17 @@ def get(self):
share_access = (self.current_user.id in study_info['shared_with'] or
self.current_user.id == study_info['owner'])

ebi_info = study_info['ebi_submission_status']
if ebi_info == 'submitted':
ebi_info = ''.join([
('<a href="https://www.ebi.ac.uk/ena/data/view/{0}">{0}'
'</a></br>'.format(acc))
for acc in study_info['ebi_study_accession'].split(',')])

self.render('study_ajax/base_info.html',
study_info=study_info, publications=study_doi, pi=pi,
contact=contact, editable=res['editable'],
share_access=share_access)
share_access=share_access, ebi_info=ebi_info)


class StudyDeleteAjax(BaseHandler):
Expand Down
2 changes: 2 additions & 0 deletions qiita_pet/templates/study_ajax/base_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
Shared With: <span id="shared_html_{{study_info['study_id']}}">
</span><br/>
Samples: {{study_info['num_samples']}}<br />
EBI: {% raw ebi_info %}<br />

{% if share_access %}
<a class="btn btn-default" data-toggle="modal" data-target="#share-study-modal-view" onclick="modify_sharing({{study_info['study_id']}});"><span class="glyphicon glyphicon-share"></span> Share</a>
{% end %}
Expand Down
9 changes: 6 additions & 3 deletions qiita_pet/templates/study_ajax/prep_summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,10 @@ <h4>
<!-- #samples and #columns -->
<div class="row">
<div class="col-md-12">
There are <b>{{num_samples}}</b> samples and <b>{{num_columns}}</b> columns in this preparation.
There are <b>{{num_samples}}</b> samples and <b>{{num_columns}}</b> columns in this preparation.</br>
{% if ebi_experiment_accessions %}
<b>EBI status: </b> Submitted
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have other statuses available right? Any reason why we are not showing the current status instead of just Submitted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, this is for preps. This is, the study is what's being submitted/updated and the prep is only submitted/not-submitted and we know is submitted if the samples have ebi_experiment_accessions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

On (Apr-20-16| 9:36), Antonio Gonzalez wrote:

@@ -353,7 +353,10 @@

- There are {{num_samples}} samples and {{num_columns}} columns in this preparation. - There are {{num_samples}} samples and {{num_columns}} columns in this preparation.
- {% if ebi_experiment_accessions %} - EBI status: Submitted

Not really, this is for preps. This is, the study is what's being submitted/updated and the prep is only submitted/not-submitted and we know is submitted if the samples have ebi_experiment_accessions.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/biocore/qiita/pull/1804/files/854af66518166469335927275d9319f9a7ef5a1e#r60443512

{% end %}
</div>
</div>

Expand Down Expand Up @@ -406,12 +409,12 @@ <h4>

<!-- Files graph or add artifact -->
<div class="row">
<div class="col-md-12" id="graph-or-new-artifact-div">
<div class="col-md-10" id="graph-or-new-artifact-div">
</div>
</div>

<!-- Prep information summary -->
<div class="row">
<div class="col-md-12" id="prep-artifact-summary-div">
<div class="col-md-10" id="prep-artifact-summary-div">
</div>
</div>