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
WIP: Next steps #1488
Conversation
@@ -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. | |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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. |
…nto next-joy-list
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 |
There was a problem hiding this comment.
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?
👍 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')) |
There was a problem hiding this comment.
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.
👍 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')) |
There was a problem hiding this comment.
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: " |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
2 comments and tests are still failing. It looks like now you're installing ascp, so why is that test failing? |
@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. |
Thanks @antgonza |
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: