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

glPca and dapc freezing -- am I picking the wrong nf? #304

Open
konradtaube opened this issue Apr 10, 2021 · 1 comment
Open

glPca and dapc freezing -- am I picking the wrong nf? #304

konradtaube opened this issue Apr 10, 2021 · 1 comment

Comments

@konradtaube
Copy link

konradtaube commented Apr 10, 2021

Hi all,

I'm coming to an issue with running both glPca() and dapc(), where in both cases it seems as though RStudio is freezing. I can't figure out if I am doing something wrong, so I thought maybe I would come here and post to see if this is a common issue worth reporting, or if there is some silly mistake on my end. I'll try to be as thorough as possible with sharing details on this possible issue! Here is some code and outputs:

bbel1.vcf <- read.vcfR("masters-p1-bbel-trim.vcf") Gives me the following:

Scanning file to determine attributes.
File attributes:
  meta lines: 10
  header_line: 11
  variant count: 267921
  column count: 64

Here is my genlight object info:

/// GENLIGHT OBJECT /////////

 // 55 genotypes,  264,766 binary SNPs, size: 70.9 Mb
 10384055 (71.31 %) missing data

 // Basic content
   @gen: list of 55 SNPbin
   @ploidy: ploidy of each individual  (range: 2-2)

 // Optional content
   @ind.names:  55 individual labels
   @loc.names:  264766 locus labels
   @chromosome: factor storing chromosomes of the SNPs
   @position: integer storing positions of the SNPs
   @pop: population of each individual (group size range: 3-17)
   @other: a list containing: elements without names

And just in case this helpful, here is my vcfR object:

***** Object of Class vcfR ***** 55 samples 110003 CHROMs 267,921 variants

Now, this code here:

bbel1.pca <- glPca(gl.bbel1, nf = 55)

Causes my RStudio to apparently freeze. I tried to let this run for around 8 hours and came back to seeing that nothing happened.

I chose my nf to equal 55, and maybe that is a problem. When I try Start Local Job and run the entire script, after about 4.5 hours I get the following error:

Scanning file to determine attributes.
File attributes:
  meta lines: 10
  header_line: 11
  variant count: 267921
  column count: 64
Meta line 10 read in.
All meta lines processed.
gt matrix initialized.
Character matrix gt created.
  Character matrix gt rows: 267921
  Character matrix gt cols: 64
  skip: 0
  nrows: 267921
  row_num: 0
Processed variant: 267921
All variants processed
Select the number of axes: Error in 1:nf : NA/NaN argument
Calls: sourceWithProgress -> eval -> eval -> glPca -> sweep
In addition: Warning message:
In vcfR2genlight(bbel1.vcf) : Found 3155 loci with more than two alleles.
Objects of class genlight only support loci with two alleles.
3155 loci will be omitted from the genlight object.
Execution halted

That error seems to indicate that glPca and dapc are NOT freezing? Perhaps my nf value I indicated as 55 is incorrect, I could try adjusting my nf value to something else, but I'm unsure what that might be so any assistance would be really appreciated!

@romunov
Copy link
Collaborator

romunov commented Apr 13, 2021

In my experience Rstudio sometimes has problems (i.e. takes ages to source a chunk, can hang up in some random processes). Have you tried updating it, perhaps using a daily build? Or perhaps try another IDE, like VSCODE?

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