diff --git a/.travis.yml b/.travis.yml index f17059b..a651b6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,10 @@ language: python +python: + - "3.6" + - "3.7" + - "3.8" + install: - pip install pandas argparse requests pytest - python setup.py install diff --git a/Dockerfile b/Dockerfile index b1cdff0..a1eece8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:focal RUN apt-get update && apt-get install -y --no-install-recommends build-essential \ python3 \ @@ -16,4 +16,4 @@ RUN ln -s /usr/bin/python3 /usr/bin/python && \ COPY . /app WORKDIR /app -RUN python setup.py install \ No newline at end of file +RUN python setup.py install diff --git a/docs/analysis.html b/docs/analysis.html index 22cfe9d..c08e78f 100644 --- a/docs/analysis.html +++ b/docs/analysis.html @@ -1,17 +1,18 @@ - +
-API calls are avaialble @ https://reactome.org/AnalysisService/#/
Data model key classes for id query are available @ https://reactome.org/documentation/data-model
-reactome2py.analysis.compare_species(species='48892', page_size='1', page='1', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1')¶reactome2py.analysis.compare_species(species='48892', page_size='1', page='1', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1')¶
Compares Homo sapiens to the specified species
reactome2py.analysis.db_name()¶The name of current database
@@ -74,7 +75,7 @@reactome2py.analysis.db_version()¶The version number of current database
@@ -85,9 +86,9 @@reactome2py.analysis.found_entities(token, path='', resource='TOTAL', file='result.csv', save=False, chunk_size=128)¶reactome2py.analysis.found_entities(token, path='', resource='TOTAL', file='result.csv', save=False, chunk_size=128)¶
list of found entities in reactome database
reactome2py.analysis.identifier(id='EGFR', interactors=False, page_size='1', page='1', species='Homo Sapiens', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None, projection=False)¶reactome2py.analysis.identifier(id='EGFR', interactors=False, page_size='1', page='1', species='Homo Sapiens', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None, projection=False)¶
Given a protein, gene, or small molecule identifier symbol conducts analysis of the identifier over different species and pathways in reactome database.
reactome2py.analysis.identifiers(ids='EGF, EGFR', interactors=False, page_size='1', page='1', species='Homo Sapiens', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None, projection=False)¶reactome2py.analysis.identifiers(ids='EGF,EGFR', interactors=False, page_size='1', page='1', species='Homo Sapiens', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None, projection=False)¶
Given a list of protein, gene, or small molecule identifiers conducts reactome pathway enrichment analysis.
reactome2py.analysis.identifiers_form(path, interactors=False, page_size='1', page='1', species='Homo Sapiens', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None, projection=False)¶reactome2py.analysis.identifiers_form(path, interactors=False, page_size='1', page='1', species='Homo Sapiens', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None, projection=False)¶
Given a file path with a list of identifiers conducts reactome pathway enrichment analysis
reactome2py.analysis.identifiers_mapping(ids='EGF, EGFR', interactors=False, projection=False)¶reactome2py.analysis.identifiers_mapping(ids='EGF,EGFR', interactors=False, projection=False)¶
Maps the identifiers passed as a comma seperated list in str format over the different species and if projection is set to true, projects the result to Homo Sapiens
reactome2py.analysis.identifiers_mapping_form(path, interactors=False, projection=False)¶reactome2py.analysis.identifiers_mapping_form(path, interactors=False, projection=False)¶
Maps the identifiers passed via txt file over the different species and if projection is set to true, projects the result to Homo Sapiens
reactome2py.analysis.identifiers_mapping_url(external_url, interactors=False, projection=False)¶reactome2py.analysis.identifiers_mapping_url(external_url, interactors=False, projection=False)¶
Maps the identifiers passed via url over the different species and if projection is set to true, projects the result to Homo Sapiens
reactome2py.analysis.identifiers_url(external_url, interactors=False, page_size='1', page='1', species='Homo Sapiens', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None, projection=False)¶reactome2py.analysis.identifiers_url(external_url, interactors=False, page_size='1', page='1', species='Homo Sapiens', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None, projection=False)¶
Given a url with a list of identifiers conducts reactome pathway enrichment analysis
reactome2py.analysis.import_form(input_file)¶reactome2py.analysis.import_form(input_file)¶
Imports the posted json file into the service The accepted format is the same as provided by the method /#/download/{token}/result.json. Note: The submitted file can be gzipped.
reactome2py.analysis.import_json(input_json)¶reactome2py.analysis.import_json(input_json)¶
Imports the posted json into the service The accepted format is the same as provided by the method /#/download/{token}/result.json. Note: The provided file can be gzipped.
reactome2py.analysis.import_url(input_url)¶reactome2py.analysis.import_url(input_url)¶
Imports the json file provided by the posted url into the service The accepted format is the same as provided by the method /#/download/{token}/result.json. Note: The provided file can be gzipped.
reactome2py.analysis.pathway2df(token, path='', resource='TOTAL', file='result.csv', save=False, chunk_size=128)¶reactome2py.analysis.pathway2df(token, path='', resource='TOTAL', file='result.csv', save=False, chunk_size=128)¶
Create a Data frame of the analysis result for all the pathway hits - save to csv file (comma separated)
reactome2py.analysis.report(token, path, file='report.pdf', number='25', resource='TOTAL', diagram_profile='Modern', analysis_profile='Standard', fireworks_profile='Barium Lithium', species='Homo sapiens', chunk_size=128)¶reactome2py.analysis.report(token, path, file='report.pdf', number='25', resource='TOTAL', diagram_profile='Modern', analysis_profile='Standard', fireworks_profile='Barium Lithium', species='Homo sapiens', chunk_size=128)¶
Downloads a report for a given pathway analysis result
reactome2py.analysis.result2json(token, path='', file='result.json', save=False, gzip=False, chunk_size=128)¶reactome2py.analysis.result2json(token, path='', file='result.json', save=False, gzip=False, chunk_size=128)¶
View of analysis result in json format
reactome2py.analysis.token(token, species='Homo sapiens', page_size='1', page='1', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None)¶reactome2py.analysis.token(token, species='Homo sapiens', page_size='1', page='1', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None)¶
Returns the result associated with token. Use page and pageSize to reduce the amount of data retrieved. Use sortBy and order to sort the result by your preferred option. The resource field will filter the results to show only those corresponding to the preferred molecule type (TOTAL includes all the different molecules type)
@@ -439,9 +440,9 @@reactome2py.analysis.token_filter_species(token, species='Homo sapiens', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL')¶reactome2py.analysis.token_filter_species(token, species='Homo sapiens', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL')¶
Queries analysis token and returns and filters the result by species
reactome2py.analysis.token_pathway_page(token, pathway, page_size='1', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None)¶reactome2py.analysis.token_pathway_page(token, pathway, page_size='1', sort_by='ENTITIES_FDR', order='ASC', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None)¶
Returns the page where the corresponding pathway is taking into account the passed parameters
reactome2py.analysis.token_pathway_reactions(token, pathway, resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None)¶reactome2py.analysis.token_pathway_reactions(token, pathway, resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None)¶
Returns the reaction ids a or one pathway's stable identifiers (stId) that is present in the original result
reactome2py.analysis.token_pathway_summary(token, pathway, resource='TOTAL', page='1', page_size='1', by='all')¶reactome2py.analysis.token_pathway_summary(token, pathway, resource='TOTAL', page='1', page_size='1', by='all')¶
by='all': all the contained identifiers and interactors
reactome2py.analysis.token_pathways_binned(token, resource='TOTAL', bin_size='100', p_value='1', include_disease=True)¶reactome2py.analysis.token_pathways_binned(token, resource='TOTAL', bin_size='100', p_value='1', include_disease=True)¶
Returns a list of binned hit pathway sizes associated with the token
reactome2py.analysis.token_pathways_reactions(token, pathways, resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None)¶reactome2py.analysis.token_pathways_reactions(token, pathways, resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None)¶
Returns the reaction ids of all the pathway stable identifiers (stIds) that are present in the original result
reactome2py.analysis.token_pathways_result(token, pathways, species='Homo sapiens', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None)¶reactome2py.analysis.token_pathways_result(token, pathways, species='Homo sapiens', resource='TOTAL', p_value='1', include_disease=True, min_entities=None, max_entities=None)¶
For a given list of pathway stable identifiers (stId) it will query and retrieve a list containing those that are present in the result (with the results for the indicated molecule type)
reactome2py.analysis.token_pathways_summary(token, pathways, resource='TOTAL')¶reactome2py.analysis.token_pathways_summary(token, pathways, resource='TOTAL')¶
Queries analysis token and returns a summary of the contained identifiers and interactors for all pathways
reactome2py.analysis.token_resources(token)¶reactome2py.analysis.token_resources(token)¶
the resources summary associated with the token
reactome2py.analysis.token_unfound_identifiers(token, page_size='1', page='1')¶reactome2py.analysis.token_unfound_identifiers(token, page_size='1', page='1')¶
Returns a list of the identifiers not found for a given token
reactome2py.analysis.unfound_entities(token, path='', file='result.csv', save=False, chunk_size=128)¶reactome2py.analysis.unfound_entities(token, path='', file='result.csv', save=False, chunk_size=128)¶
list of unfound entities in reactome database