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

Sample parser is throwing error that does not respect Phenopacket schema #529

Open
lacek opened this issue Nov 6, 2023 · 0 comments
Open

Comments

@lacek
Copy link

lacek commented Nov 6, 2023

Exomiser throws below error when provided sample YAML in phenopacket format with pedigree entry containing paternalId or maternalId of 0

java.lang.IllegalStateException: Failed to execute CommandLineRunner
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:771)
        at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:752)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292)
        at org.monarchinitiative.exomiser.cli.Main.main(Main.java:53)
Caused by: java.lang.IllegalArgumentException: Parent '0' not found for individual 'father'
        at org.monarchinitiative.exomiser.core.model.Pedigree.checkParent(Pedigree.java:73)
        at org.monarchinitiative.exomiser.core.model.Pedigree.validate(Pedigree.java:61)
        at org.monarchinitiative.exomiser.core.model.Pedigree.<init>(Pedigree.java:51)
        at org.monarchinitiative.exomiser.core.model.Pedigree.of(Pedigree.java:83)
        at org.monarchinitiative.exomiser.core.analysis.sample.PhenopacketPedigreeConverter.toExomiserPedigree(PhenopacketPedigr
eeConverter.java:56)
        at org.monarchinitiative.exomiser.core.analysis.sample.PhenopacketSampleConverter.findFamilyOrProbandOnlyPedigree(Phenop
acketSampleConverter.java:65)
        at org.monarchinitiative.exomiser.core.analysis.sample.PhenopacketSampleConverter.toExomiserSample(PhenopacketSampleConv
erter.java:49)
        at org.monarchinitiative.exomiser.core.analysis.sample.PhenopacketConverter.toSample(PhenopacketConverter.java:40)
        at org.monarchinitiative.exomiser.core.analysis.sample.Sample.from(Sample.java:56)
        at org.monarchinitiative.exomiser.core.analysis.JobParser.getSample(JobParser.java:120)
        at org.monarchinitiative.exomiser.core.analysis.JobParser.parseSample(JobParser.java:85)
        at org.monarchinitiative.exomiser.core.analysis.AnalysisParser.parseSample(AnalysisParser.java:99)
        at org.monarchinitiative.exomiser.core.Exomiser.run(Exomiser.java:67)
        at org.monarchinitiative.exomiser.cli.ExomiserCommandLineRunner.runJob(ExomiserCommandLineRunner.java:79)
        at org.monarchinitiative.exomiser.cli.ExomiserCommandLineRunner.runJobs(ExomiserCommandLineRunner.java:62)
        at org.monarchinitiative.exomiser.cli.ExomiserCommandLineRunner.run(ExomiserCommandLineRunner.java:57)
        at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:768)
        ... 5 common frames omitted

Example entry that triggers the above error:

pedigree:
  persons:
    - familyId: 1234
      individualId: father
      paternalId: '0'
      maternalId: '0'
      sex: MALE
      affectedStatus: UNAFFECTED

According to the Phenopacket schema v1.0.0:

Individuals whose parents are not represented in the PED file are known as founders; their parents are represented by a zero (“0”) in the columns for mother and father.

I would therefore expect '0' to be a valid empty value.

As a workaround, I'm now omitting the fields paternalId and maternalId similar to the example provided in Phenopacket's documentation and Exomiser would not throw error. This is in fact does not conform to Phenopacket schema neither as both fields are "required".

I guess validating strictly according to Phenopacket schema (i.e. making paternalId and maternalId required) may break the practice/script/pipeline of existing Exomiser users. However, supporting string value of 0 should be acceptable.

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

No branches or pull requests

1 participant