本文整理汇总了Python中qiita_db.study.Study.all_data_types方法的典型用法代码示例。如果您正苦于以下问题:Python Study.all_data_types方法的具体用法?Python Study.all_data_types怎么用?Python Study.all_data_types使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qiita_db.study.Study
的用法示例。
在下文中一共展示了Study.all_data_types方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: new_prep_template_get_req
# 需要导入模块: from qiita_db.study import Study [as 别名]
# 或者: from qiita_db.study.Study import all_data_types [as 别名]
def new_prep_template_get_req(study_id):
"""Returns the information needed to populate the new prep info template
Parameters
----------
study_id : int
The study id
Returns
-------
(list of str, list of str, dict of {str: list of str})
The list of txt, tsv files in the upload dir for the given study
The list of available data types
The investigation type ontology information
"""
prep_files = [f for _, f, _ in get_files_from_uploads_folders(study_id)
if f.endswith(('.txt', '.tsv'))]
data_types = sorted(Study.all_data_types())
# Get all the ENA terms for the investigation type
ontology_info = _get_ENA_ontology()
return {'status': 'success',
'prep_files': prep_files,
'data_types': data_types,
'ontology': ontology_info}
示例2: data_types_get_req
# 需要导入模块: from qiita_db.study import Study [as 别名]
# 或者: from qiita_db.study.Study import all_data_types [as 别名]
def data_types_get_req():
"""Returns data types available in the system
Returns
-------
dict
Data types information in the form
{'status': status,
'message': message,
'data_types': list of str}
status can be success, warning, or error depending on result
message has the warnings or errors
data_types is the list of available data types in the system
"""
return {'status': 'success',
'message': '',
'data_types': Study.all_data_types()}