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

readFam problem #32

Closed
thoree opened this issue Feb 12, 2020 · 2 comments
Closed

readFam problem #32

thoree opened this issue Feb 12, 2020 · 2 comments

Comments

@thoree
Copy link
Contributor

thoree commented Feb 12, 2020

After quite a bit of testing I manage to to find a problem:

x = forrel::readFam("http://familias.name/foo.fam")
#> Familias version: 3.2.9 (DVI)
#> Read DVI: Yes
#> 
#> Number of individuals (excluding 'extras'): 0
#> 
#> Number of pedigrees: 0
#> 
#> Database: New database
#> Number of loci: 1
#>   D3S1358: 9 alleles, model = equal, rate = 0 (unisex)
#> 
#> *** Reading DVI section ***
#> Unidentified persons: 2
#>   BS1
#>   BS2
#> 
#> Reference families: 1
#>   F14 (3 persons, 2 pedigrees)
#>     Reference pedigree
#> Error in this.fidx[child.idx[par.is.male]] <- parent.idx[par.is.male]: NAs are not allowed in subscripted assignments

Created on 2020-02-12 by the reprex package (v0.3.0)

@magnusdv magnusdv mentioned this issue Feb 12, 2020
@magnusdv
Copy link
Owner

Thanks! This error is interesting, and I'm not sure if it can be fixed.

The file specifies that "Missing person" is a parent of "RS31 [Son]", but with no sex information about "Missing person". Hence the program runs into a problem when trying to decide if it is the father or mother.

Note that such "extra" individuals are ok as children, because then the gender info is not needed to create the pedigree.

I'm not really sure how to deal with this, but at least I'll add a more sensible error message.

@magnusdv
Copy link
Owner

Ok, I've pushed a partial fix for this, see daecbbf .

The new code uses tries to deduce the sex of "nosex-parents" by looking at spouses, and fails gracefully if unsuccessful.

I think this is the closest we can get to a solution here, but further ideas are welcome.
(Closing this now.)

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

2 participants