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

Error running 'coancestry' function - TrioR.DAT does not exist #22

Open
MboiTui opened this issue May 25, 2024 · 5 comments
Open

Error running 'coancestry' function - TrioR.DAT does not exist #22

MboiTui opened this issue May 25, 2024 · 5 comments

Comments

@MboiTui
Copy link

MboiTui commented May 25, 2024

Hello!

I am trying to run related on a Mac within RStudio, but I encounter the following error:

Input file TrioR.DAT does not exist! Program stoped in subroutine ReadData Error in system.time(.Fortran("related", PACKAGE = "related")) : Related encountered a fatal error. Timing stopped at: 1.009 0.998 2.027

I produced the input genotype data with the 'readgenotypedata' function, after using gl2related from the dartR package to convert a genlight to the required input dataframe.

I tried to look at the source code to understand why I am receiving that error but couldn't really get anywhere.

Any help is appreciated

Cheers,
L.V.B.

@timothyfrasier
Copy link
Owner

timothyfrasier commented May 27, 2024 via email

@MboiTui
Copy link
Author

MboiTui commented May 31, 2024

Hello Tim,

Apologies that was a pretty poor description of my issue. Here is more info:

Read vcf file into R:

my.gl <- gl.read.vcf("my.vcf")

Convert from genlight to related format

gl2related(my.gl, outfile = "my.related", outpath="outpath")

Import related formatted data:

my.related <- readgenotypedata("my.related")

Run coancestry function

coancestry(my.related$gdata, allele.freqs = my.related$freqs, wang = 2, lynchli = 2, lynchrd = 2, ritland = 2, quellergt = 2, dyadml = 2, output.file = "my.related.output"

This is the traceback

Error in system.time(.Fortran("related", PACKAGE = "related")) : Related encountered a fatal error.
7. system.time(.Fortran("related", PACKAGE = "related"))
6. print(system.time(.Fortran("related", PACKAGE = "related")))
5. doTryCatch(return(expr), name, parentenv, handler)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
3. tryCatchList(expr, classes, parentenv, handlers)
2. tryCatch({ print(system.time(.Fortran("related", PACKAGE = "related"))) }, interrupt = function(ex) { .Fortran("clean_mem", PACKAGE = "related") ...
1. coancestry(relLN2$gdata, allele.freqs = relLN2$freqs, wang = 2, lynchli = 2, lynchrd = 2, ritland = 2, quellergt = 2, dyadml = 2, output.file = "../9_relatedness/9_1_related/")

I followed the installation instruction on this github, and checked that all required packages and that the compiler installed successfully

Versions:

  • related_1.0
  • dartR_2.9.7
  • R 4.2.3 (2023-03-15) # i know it's a year old, running this on macOS HighSierra, i understand if can't offer support for later R versions

@timothyfrasier
Copy link
Owner

timothyfrasier commented May 31, 2024 via email

@MboiTui
Copy link
Author

MboiTui commented Jun 4, 2024

Hello Timothy,

Thank you for your reply.

I tried with the GenotypeData.txt file as input and got the same error. This was the code I used.

relLN2 <- readgenotypedata("../in/GenotypeData.txt")

coancestry(relLN2$gdata, allele.freqs = relLN2$freqs,
                    wang = 2,lynchli = 2,
                    lynchrd = 2,ritland = 2,
                    quellergt = 2,dyadml = 2,
                    output.file = "../out")

@timothyfrasier
Copy link
Owner

timothyfrasier commented Jun 10, 2024 via email

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