Skip to content
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

Add python script to repo #1

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open

Add python script to repo #1

wants to merge 29 commits into from

Conversation

pmb59
Copy link
Member

@pmb59 pmb59 commented Jan 29, 2025

Adds a python script to dynamically fetch and parse experiment metadata from the EBI Gene Expression Atlas (GXA) API, outputting structured data in valid YAML format.

The script retrieves experiment accessions, extracts key details such as organism, experiment type, and assay groups, and ensures properly formatted YAML for downstream processing.

GitHub action included for linting yaml and python code.

@pmb59 pmb59 self-assigned this Jan 29, 2025
pythonic-query.py Outdated Show resolved Hide resolved
pythonic-query.py Outdated Show resolved Hide resolved
pythonic-query.py Outdated Show resolved Hide resolved
pythonic-query.py Outdated Show resolved Hide resolved
pythonic-query.py Outdated Show resolved Hide resolved
@anilthanki
Copy link

consider renaming pythonic-query.py to something self explanatory for example fetch_gxa_metadata.py or gxa_metadata_extractor.py or something similar

@anilthanki
Copy link

anilthanki commented Feb 3, 2025

consider renaming pythonic-query.py to something self explanatory for example fetch_gxa_metadata.py or gxa_metadata_extractor.py or something similar

With recent comments from Christina about table data format.. converting to dict will make more sense as it can be converted to various format we need, like YAML, JSON, TSV/CSV, XML etc

pmb59 and others added 2 commits February 5, 2025 11:13
@pmb59
Copy link
Member Author

pmb59 commented Feb 10, 2025

consider renaming pythonic-query.py to something self explanatory for example fetch_gxa_metadata.py or gxa_metadata_extractor.py or something similar

With recent comments from Christina about table data format.. converting to dict will make more sense as it can be converted to various format we need, like YAML, JSON, TSV/CSV, XML etc

comment addressed here: b8cace9

Comment on lines +20 to +21
parser.add_argument("yaml_filename", help="Output Yaml filename")
parser.add_argument("tsv_filename", help="Output Tsv filename")

Choose a reason for hiding this comment

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

Are these both yaml_filename and yaml_filename required or either is fine..

if aim is to generate both file per run, consider taking just one optional argument like file_name with some default value and just change extension so user need to provide only one argument or none.

if aim is to generate either then script needs some logic at the EOF

@anilthanki
Copy link

anilthanki commented Feb 10, 2025

code outside defined functions is a bit scattered, may be consider using a main function to make it more readable

@anilthanki
Copy link

code outside defined functions is a bit scattered, may be consider using a main function to make it more readable

I had a second look and its not scattered but divided into two blocks top and bottom .. so this comment can be ignored... but still using a main function might benefit it

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.

2 participants