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

ArgumentError: Person 5101360 is his or her own ancestor. #9

Open
fingerfen opened this issue Oct 22, 2020 · 4 comments
Open

ArgumentError: Person 5101360 is his or her own ancestor. #9

fingerfen opened this issue Oct 22, 2020 · 4 comments

Comments

@fingerfen
Copy link

Background
I have a pedigree file with roughly 35,000 rows and around 700 families. The file looks something like this

...
fam20,5101470,5101420,5101410,M,0
fam20,5101340,,,F,0
fam20,5101350,5101340,5101250,M,0
fam20,5101360,5101340,5101250,F,0                        <---- Error refers to this line
fam20,5101370,,,F,0
fam20,5101380,5101370,5101260,F,0
fam20,5101390,,,F,0
fam20,5101400,5101390,5101270,F,0
...

Issue

The command I used to calculate the theoretical kinship matrix is

Kinship("C.../.../filepath...bla..bla.bla...../.../control.txt")

but it throws ArgumentError: Person 5101360 is his or her own ancestor error

I checked my pedigree file and saw that this is person is NOT his or her own ancestor. This person's ID appears once in the Person column of the entire pedigree file and that's it. So there is no way that this person is his or her own ancestor.

I am wondering if I can get some insight into the error and maybe figure out why it's throwing this error. Is there maybe a file size limit to the program?

Thank you,

@fingerfen
Copy link
Author

The Stacktrace is as followed:

Stacktrace:
 [1] person_information(::DataFrames.DataFrame, ::DataFrames.DataFrame, ::DataFrames.DataFrame, ::MendelBase.Locus, ::MendelBase.Pedigree, ::Dict{AbstractString,Any}) at C:\Users\duong\.julia\packages\MendelBase\y8mGn\src\read_data.jl:1635
 [2] read_external_data_files(::Dict{AbstractString,Any}) at C:\Users\duong\.julia\packages\MendelBase\y8mGn\src\read_data.jl:98
 [3] Kinship(::String; args::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}}) at C:\Users\duong\.julia\packages\MendelKinship\UUNNi\src\MendelKinship.jl:83
 [4] Kinship(::String) at C:\Users\duong\.julia\packages\MendelKinship\UUNNi\src\MendelKinship.jl:35
 [5] top-level scope at In[47]:1
 [6] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091
 [7] execute_code(::String, ::String) at C:\Users\duong\.julia\packages\IJulia\rWZ9e\src\execute_request.jl:27
 [8] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\duong\.julia\packages\IJulia\rWZ9e\src\execute_request.jl:86
 [9] #invokelatest#1 at .\essentials.jl:710 [inlined]
 [10] invokelatest at .\essentials.jl:709 [inlined]
 [11] eventloop(::ZMQ.Socket) at C:\Users\duong\.julia\packages\IJulia\rWZ9e\src\eventloop.jl:8
 [12] (::IJulia.var"#15#18")() at .\task.jl:356

I am not familiar with Julia so, sadly, I don't really understand this.

@biona001
Copy link
Member

biona001 commented Oct 23, 2020

I'm sure @ericsobel has a better idea of how to help you, but I'll try to explain what's going on.

According to your stack trace, the error is a result of this line in MendelBase.jl. To reach this error, the per variable returned by this loop function is non-zero, which can only happen via this line. The loop() function appears to be a complicated way of permuting your pedigree. My best guess is that it is somehow impossible to rearrange your pedigree so that all parents precede their children + everything the loop() function needs to do. If this is the case, the printed error message needs to be updated.

Do you think you can upload your data and control file so I can play with it?

@fingerfen
Copy link
Author

Thank you for the quick reply and the thorough explanation, it is very much appreciated! :)

There is an important observation that I think you might be interested in.

As seen from above, fam20 is the pedigree that has the erroneous entry. If I was to toss out fam20 from my entire pedigree file, and run the command again, the same error would happen, but for a different person from a different family.
Interestingly, if I was to put fam20 into its own pedigree file, the program runs fine and was actually able to produce a kinship matrix output file.

This tells me that there doesn't seem to be anything wrong with fam20's pedigree itself, but maybe it has something to do with the combination of different pedigrees.

Is this piece of information useful to you?

Sadly, I don't think I can provide you with the pedigree file since this data is private as of now.

Thank you

@biona001
Copy link
Member

biona001 commented Oct 26, 2020

I will have to consult my advisors who know more about the loop function to better understand what might cause the issue. I will try to get back to you asap.

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