Mixed dtypes in chromosome column from get_gwas_catalog_study_summary_stats
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- data-engineering
Research direction
The mixed types come from the pandas read_csv call in src/cellink/resources/_gwas_prs_qtl.py around line 419, inside get_gwas_catalog_study_summary_stats. Compare it with the low_memory=False usage in get_pgs_catalog_score_file and check how the chromosome column is read. Done when chromosome comes back with one consistent dtype for GCST90018926, and when other read_csv calls in the file are checked too.
Written by the indexing model from the issue text.
Description
Hi there,
When running get_gwas_catalog_study_summary_stats for GCST90018926, the chromosome column of the returned DataFrame contains mixed types, with some chromosomes appearing both as int and as str:
array([1, 2, 3, ..., 21, 22, '22', 'X', '7', '11', '5', '4', '13', '3'], dtype=object)
This comes from pandas inferring dtypes per chunk:
https://github.com/theislab/cellink/blob/924256a8a7ce66837aa0f8b12a413eea545eb48d/src/cellink/resources/_gwas_prs_qtl.py#L419
get_pgs_catalog_score_file already uses low_memory=False, so the same (or explicit dtypes) should work here. It depends on how a study's file encodes chromosomes, so it may not show up for every study, but it might be worth checking other read_csv calls as well.
Best wishes,
Pia
- Dominant language
- Python
- Stars
- 25
- Forks
- 8
- Avg merge
- 2m
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from theislab/cellink
-
ReleaseMay be free again @LArnoldt claimed this 122 days ago, and no pull request is open. Open
-
Implement variant to gene assignment using gencodeMay be free again @HolEv claimed this 211 days ago, and no pull request is open. Openenhancement
-
SnpEff installation instructionsMay be free again @LArnoldt claimed this 432 days ago, and no pull request is open. Openenhancement
-
VEP setupMay be free again @HolEv claimed this 546 days ago, and no pull request is open. Openenhancement
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
All issues in theislab/cellink
Similar issues
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gke-labs/kube-agents#5671 ·
Maintainers usually reply within 1 day
-
docs(auth): Method B step 4 should tell users to tick "Use this client for an AI-powered agent"Opendocumentation next-release v0.9.6
Difficulty 1/5 Under an hour Newbie friendliness 88/100
khuisman/mcp-gee-sweet#1446 ·
Maintainers usually reply within 1 day
-
model:sonnet runtime:claude security size:S
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FootprintAI/Containarium#3671 ·
Maintainers usually reply within 1 day
-
HolidayBase: reassigning `language` does not re-initialize translations or re-populate holidaysPossibly taken @shikhabhadoria claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vacanza/holidays#4116 · 1 comment ·
Maintainers usually reply within 1 day
-
bug CLI exec
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day