Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Next steps #1488

Merged
merged 21 commits into from Oct 10, 2015
Merged

Conversation

antgonza
Copy link
Member

@antgonza antgonza commented Oct 6, 2015

This is based on #1481 so that should be merged first.

Here I'm fixing the last standing points in the joy list, so far:

  • Fix Store EBI submission files with the preprocessed data #1479
  • In the template documentation changing that sample description is a required field for Qiita deploy to a requirement for EBI, as this is required for submissions.
  • Removing 2 cfg variables that are not needed anymore with the new EBI system. Today we got a notification that the old system will be out in 2 months.
  • Changes so tests pass in the main branch.

@antgonza antgonza mentioned this pull request Oct 8, 2015
14 tasks
@@ -98,6 +96,8 @@ These are the columns required for successfully submit your data to EBI:
+-------------------------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``library_construction_protocol`` | free text | Brief description or reference to the protocol that was used for preparing this amplicon library starting from DNA, usually this includes what genomic region was targeted such as *16S*, *ITS*, *18S*, etc. |
+-------------------------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``description`` | free text | Description of the sample. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Why has this been moved from the sample template to the prep template? IIRC, there was a problem if we had duplicated columns between the sample template and the prep template, and the description was required already in the sample template. Also, I think the description applies to the "biological sample" (i.e. sample template) rather than to the preparation sample.

Copy link
Member Author

Choose a reason for hiding this comment

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

My error, this was meant to be in the required fields for EBI in the sample template, not the prep template, will change.

@ElDeveloper
Copy link
Member

I'm having a hard time figuring out what are the specifics that need review in this PR, maybe once #1490 is merged, it will be easier.

@antgonza
Copy link
Member Author

antgonza commented Oct 9, 2015

This is ready for final review. Note that this solves all the open issues in the joy list: #1451. Once this is merged, we just need to fix conflicts between master and the ebi-improvements branch ...

return ppd

def test_submit_EBI_step_2_failure(self):
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still want these tests? Or should they be dropped?

@ElDeveloper
Copy link
Member

👍 done with my review!

for cmd in ebi_submission.generate_send_sequences_cmd():
cmd_pieces = shsplit(cmd)
try:
call(cmd_pieces, stdout=open(ebi_submission.ascp_reply, 'a'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth using moi's moi.job.system_call function? It does the stdout and stderr parsing for you and it will reduce code in here.

@ElDeveloper
Copy link
Member

👍 on my end, @josenavas, please merge once your review comments are addressed 👟

LogEntry.create('Runtime',
("Submitting XMLs for pre_processed_id: "
"%d" % preprocessed_data_id))
try:
# place holder for moi call see #1477
xmls_cmds_moi = xmls_cmds
call(xmls_cmds, stdout=open(ebi_submission.curl_reply, 'w'))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it may be useful to store the stderr too, in case that something unexpected happens (not only in EBI end)


demux = [path for _, path, ftype in ppd.get_filepaths()
if ftype == 'preprocessed_demux'][0]

demux_samples = set()
with open_file(demux) as demux_fh:
if not isinstance(demux_fh, File):
error_msg = ("There was an error parsing the demux file: "
Copy link
Contributor

Choose a reason for hiding this comment

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

This error message can be improved, as the error is that file is not a demux file.

else:
LogEntry.create('Runtime',
('Submission of sequences of pre_processed_id: '
'%d completed successfully' %
preprocessed_data_id))
finally:
Copy link
Contributor

Choose a reason for hiding this comment

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

If system_call raises, xml_content is not defined, and stderr doesn't contain the value from such call (it will have the value from the above call to system_call in the loop.

@josenavas
Copy link
Contributor

2 comments and tests are still failing. It looks like now you're installing ascp, so why is that test failing?

@antgonza
Copy link
Member Author

@josenavas this is ready. After your comments I realized that we weren't doing the same for all possible failures in commands.py, which I fixed. Also, fixed some warnings that were left over cause missing instrument_model.

@josenavas
Copy link
Contributor

Thanks @antgonza
awesome work!

josenavas added a commit that referenced this pull request Oct 10, 2015
@josenavas josenavas merged commit 0a47d89 into qiita-spots:ebi-improvements Oct 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants