Study index finngen
Bases: StudyIndex
Study index dataset from FinnGen.
The following information is aggregated/extracted:
- Study ID in the special format (FINNGEN_R9_*)
- Trait name (for example, Amoebiasis)
- Number of cases and controls
- Link to the summary statistics location
Some fields are also populated as constants, such as study type and the initial sample size.
Source code in src/otg/dataset/study_index.py
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 |
|
from_source(finngen_studies, finngen_release_prefix, finngen_sumstat_url_prefix, finngen_sumstat_url_suffix)
classmethod
This function ingests study level metadata from FinnGen.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
finngen_studies | DataFrame | FinnGen raw study table | required |
finngen_release_prefix | str | Release prefix pattern. | required |
finngen_sumstat_url_prefix | str | URL prefix for summary statistics location. | required |
finngen_sumstat_url_suffix | str | URL prefix suffix for summary statistics location. | required |
Returns:
Name | Type | Description |
---|---|---|
StudyIndexFinnGen | StudyIndexFinnGen | Parsed and annotated FinnGen study table. |
Source code in src/otg/dataset/study_index.py
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 |
|
get_schema()
classmethod
Provides the schema for the StudyIndexFinnGen dataset.
This method is a duplication from the parent class, but by definition, the use of abstract methods require that every child class implements them.
Returns:
Name | Type | Description |
---|---|---|
StructType | StructType | Spark schema for the StudyIndexFinnGen dataset. |
Source code in src/otg/dataset/study_index.py
446 447 448 449 450 451 452 453 454 455 |
|
Schema
root
|-- studyId: string (nullable = false)
|-- projectId: string (nullable = false)
|-- studyType: string (nullable = false)
|-- traitFromSource: string (nullable = false)
|-- traitFromSourceMappedIds: array (nullable = true)
| |-- element: string (containsNull = true)
|-- pubmedId: string (nullable = true)
|-- publicationTitle: string (nullable = true)
|-- publicationFirstAuthor: string (nullable = true)
|-- publicationDate: string (nullable = true)
|-- publicationJournal: string (nullable = true)
|-- backgroundTraitFromSourceMappedIds: array (nullable = true)
| |-- element: string (containsNull = true)
|-- initialSampleSize: string (nullable = true)
|-- nCases: long (nullable = true)
|-- nControls: long (nullable = true)
|-- nSamples: long (nullable = true)
|-- discoverySamples: array (nullable = true)
| |-- element: struct (containsNull = false)
| | |-- sampleSize: string (nullable = true)
| | |-- ancestry: string (nullable = true)
|-- replicationSamples: array (nullable = true)
| |-- element: struct (containsNull = false)
| | |-- sampleSize: string (nullable = true)
| | |-- ancestry: string (nullable = true)
|-- summarystatsLocation: string (nullable = true)
|-- hasSumstats: boolean (nullable = true)