-
Notifications
You must be signed in to change notification settings - Fork 79
adding archive release #2769
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
adding archive release #2769
Changes from 3 commits
1df4304
c6e3272
499b333
4cc95f6
345b846
75a4054
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ | |
| import qiita_db as qdb | ||
|
|
||
|
|
||
| class Archive(object): | ||
| class Archive(qdb.base.QiitaObject): | ||
| r"""Extra information for any features stored in a BIOM Artifact | ||
|
|
||
| Methods | ||
|
|
@@ -26,6 +26,25 @@ class Archive(object): | |
| qiita_db.QiitaObject | ||
| """ | ||
|
|
||
| @classmethod | ||
| def merging_schemes(cls): | ||
| r"""Returns the available merging schemes | ||
|
|
||
| Returns | ||
| ------- | ||
| Iterator | ||
| Iterator over the sample ids | ||
|
|
||
| See Also | ||
| -------- | ||
| keys | ||
| """ | ||
| with qdb.sql_connection.TRN: | ||
| sql = """SELECT archive_merging_scheme_id, archive_merging_scheme | ||
| FROM qiita.archive_merging_scheme""" | ||
| qdb.sql_connection.TRN.add(sql) | ||
| return dict(qdb.sql_connection.TRN.execute_fetchindex()) | ||
|
|
||
| @classmethod | ||
| def _inserting_main_steps(cls, ms, features): | ||
| with qdb.sql_connection.TRN: | ||
|
|
@@ -178,9 +197,9 @@ def retrieve_feature_values(cls, archive_merging_scheme=None, | |
| else: | ||
| qdb.sql_connection.TRN.add(sql.format('')) | ||
|
|
||
| return {k: v for k, v in | ||
| qdb.sql_connection.TRN.execute_fetchindex()} | ||
| return dict(qdb.sql_connection.TRN.execute_fetchindex()) | ||
|
|
||
| @classmethod | ||
| def insert_features(self, merging_scheme, features): | ||
|
||
| r"""Inserts new features to the database based on a given artifact | ||
|
|
||
|
|
||
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.
eqaul -> equal
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 there a way to hash some invariant, like metadata stored inside the BIOM file instead? Perhaps that's enough.
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.
sure, added a tests to check that at least the filename is what we expect ...