Skip to content

WIP: load-qebil-downloaded-studies - #3112

Open
antgonza wants to merge 5 commits into
qiita-spots:devfrom
antgonza:load-qebil-downloaded-studies
Open

antgonza wants to merge 5 commits into
qiita-spots:devfrom
antgonza:load-qebil-downloaded-studies

Conversation

@antgonza

@antgonza antgonza commented Jun 4, 2021

Copy link
Copy Markdown
Member

No description provided.

@antgonza
antgonza requested a review from wasade June 4, 2021 16:11
@coveralls

coveralls commented Jun 4, 2021

Copy link
Copy Markdown

Coverage Status

coverage: 91.165% (+0.01%) from 91.155%
when pulling 87fecb4 on antgonza:load-qebil-downloaded-studies
into f7dd269 on qiita-spots:dev.

Comment thread scripts/qiita-load-qebil-downloads Outdated


SLEEP_TIME = 10
EBIDIR = '/panfs/panfs1.ucsd.edu/panscratch/qiita/qebil/vertebrates/'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

vertebrates?

Comment thread scripts/qiita-load-qebil-downloads Outdated
# note necessry but nice for debugging
print(f'\n\n\n+++> Processing {folder}, you have {SLEEP_TIME} '
'seconds to ctrl-c')
sleep(10)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what's the sleep for?

Comment on lines +40 to +42
qebil_status_fp = [f for f in files if f.endswith('qebil_status')][0]
with open(qebil_status_fp, 'r') as fp:
qebil_status = fp.readlines()[0]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How is qebil being executed? The filebased process communication may represent a pain point in the future.

continue
files_used.append(qebil_status_fp)

title_fp = [f for f in files if f.endswith('_study_title.txt')][0]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be erroneous if there were zero _study_title.txt files, or more than 1?

Comment thread scripts/qiita-load-qebil-downloads Outdated
st = study.sample_template
sample_info = load_sample_template_from_cmd(sample_fp, study.id)
st.ebi_sample_accessions = st.get_category('secondary_sample_accession')
st.biosample_accessions = st.get_category('sample_accession')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, would it be valuable to test if the accessions were observed already in qiita in addition to the study title? although, I'm not sure what action it would suggest if they were :/

Comment thread scripts/qiita-load-qebil-downloads Outdated

filepaths = []
for rp in run_prefixes:
matches = sorted([f for f in files if rp in f])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this be if f.startswith(rp)?

prep_template=pt, move_files=False)
notes = ''
if warnings:
notes = '<b>Warnings</b>:<ol>%s</ol>\n' % ''.join(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

html formatting here feeeeels like it should be done at the visualization layer on template render, but I would understand why doing so here is pragmatic

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.

3 participants