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 assignR on converted genepop file #24

Open
lplough opened this issue Mar 21, 2021 · 2 comments
Open

error running assignR on converted genepop file #24

lplough opened this issue Mar 21, 2021 · 2 comments

Comments

@lplough
Copy link

lplough commented Mar 21, 2021

Dear Thierry et al.,

I am getting this error when I run assignR:

Calibrating REF/ALT alleles... Error in if (detect.gt == "GT_VCF_NUC") { : argument is of length zero
when I try to run assignR on a converted genepop file.

Here is my code to load and convert to tidy format:

> packageVersion("assignR") [1] ‘2.0.0’

> packageVersion("radiator") [1] ‘1.1.9’

BC.tidy <- radiator::tidy_genepop(data = "SNP.BC_3.11.21.hwe.bi.recode.gen")

BC.tidy
# A tibble: 2,760,186 x 4
POP_ID INDIVIDUALS MARKERS GT
<fct> <chr> <fct> <chr>
1 1 CED-02 HiC_scaffold_1__9318304_1006119 001001
2 1 CED-03 HiC_scaffold_1__9318304_1006119 001001
3 1 CED-04 HiC_scaffold_1__9318304_1006119 001002
4 1 CED-05 HiC_scaffold_1__9318304_1006119 001001
5 1 CED-06 HiC_scaffold_1__9318304_1006119 001002
6 1 CED-07 HiC_scaffold_1__9318304_1006119 001001
7 1 CED-08 HiC_scaffold_1__9318304_1006119 001002
8 1 CED-08dup HiC_scaffold_1__9318304_1006119 001002
9 1 CED-09 HiC_scaffold_1__9318304_1006119 000000
10 1 CED-10 HiC_scaffold_1__9318304_1006119 002002
… with 2,760,176 more rows

This genpop file was converted from a dDocent-created (free-bayes) VCF file and it loaded fine in genepop or GenoDive etc. has 429 individuals; 6,434 loci; 12,868 alleles;

Then the assignR code:

> test3 <- assigner::assignment_ngs(data = BC.tidy, assignment.analysis = "gsi_sim", marker.number = c(100, 200, "all"), markers.sampling = "ranked", thl = 0.3)

################################################################################
########################## assigner::assignment_ngs ############################
################################################################################
Execution date/time: 20210321@1157
Assignment analysis with gsi_sim
Calibrating REF/ALT alleles...
Error in if (detect.gt == "GT_VCF_NUC") { : argument is of length zero

**Computation time, overall: 2 sec
########################## assignment_ngs completed ############################

Clearly there is a format error with the BC.tidy dataset, but im not sure where Ive gone wrong here. I am sorry if I am missing something obvious, but my understanding was that I could use radiator to convert to a tidy genotype format, and then run assignR on the converted file (the tibble BC.tidy)

UPDATE:
I get the same error on the example dataset from the assignR package (from the tutorial

> data <- data_assigner_sim_01
> test1 <- assigner::assignment_ngs( data = data, assignment.analysis = "gsi_sim", markers.sampling = "ranked", thl = 0.2, iteration.method = 5)
################################################################################
########################## assigner::assignment_ngs ############################
################################################################################
Execution date/time: 20210321@1655
Assignment analysis with gsi_sim
Calibrating REF/ALT alleles...
Error in if (detect.gt == "GT_VCF_NUC") { : argument is of length zero

Computation time, overall: 0 sec
########################## assignment_ngs completed ############################
`

UPDATE- I am able to recreate this same error with the example dataset from the 'getting started' tutorial [here])(http://thierrygosselin.github.io/assigner/articles/get_started.html)

> data <- data_assigner_sim_01
> test1 <- assigner::assignment_ngs( data = data, assignment.analysis = "gsi_sim", markers.sampling = "ranked", thl = 0.2, iteration.method = 5)

################################################################################
########################## assigner::assignment_ngs ############################
################################################################################
Execution date/time: 20210321@1655
Assignment analysis with gsi_sim
Calibrating REF/ALT alleles...
Error in if (detect.gt == "GT_VCF_NUC") { : argument is of length zero

Computation time, overall: 0 sec
########################## assignment_ngs completed ############################

Thanks for any help here!

LP

@esnielsen
Copy link

Hi LP,

Did you happen to solve this issue? I am trying with my genepop file at the moment and getting the same error...

Thanks!
Erica

@saat-mics
Copy link

Hi,

while reying to estimate fst, I am having the error below:

Calibrating REF/ALT alleles...
Error in purrr::map():
ℹ In index: 1.
Caused by error in dplyr::filter():
ℹ In argument: GT != "000000".
Caused by error:
! object 'GT' not found

Any clue how to solve this?

thanks

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

3 participants