Axis error on R (R or treeWAS issue)
0
0
Entering edit mode
4.8 years ago
Nerdobyte • 0

Hi,

I was wondering if anyone could help me address this issue? I am trying to use the treeWAS package on R to perform SNP analysis. I have prepared my two data-sets (one is a matrix (geney) the other is factor (pheny)) as required by the package, and then ran the following treeWAS command. I keep getting the "Error in axis" comment below:

> out <- treeWAS(snps = geney,
+                phen = pheny,
+                na.rm=TRUE,
+                tree = "BIONJ",
+                seed = 1)
Error in axis(side = side, at = x, labels = lab, ...) : 
  no locations are finite

When I use the two example data-sets, provided with the package, the command works fine. I have checked the two data-sets I have created against the two examples in the package and the class, attributes and formatting match. So I'm not sure what the error means. The following is a short description of my data:

> class(geney)
[1] "matrix"
> str(geney)
 num [1:27, 1:62] NA NA NA NA NA 0 NA NA NA NA ...
 - attr(*, "dimnames")=List of 2
  ..$ : chr [1:27] "FR3883.vcf" "FR3977.vcf" "FR4887.vcf" "FR4928.vcf" ...
  ..$ : chr [1:62] "X1000756.G" "X1000756.t" "X1001126.g" "X1001126.T" ...
> class(pheny)
[1] "factor"
> str(pheny)
 Factor w/ 2 levels "A","B": 1 1 1 1 1 1 1 1 1 1 ...
 - attr(*, "names")= chr [1:27] "FR4887.vcf" "FR4928.vcf" "FR4930.vcf" "FR5128.vcf" ...

This is the description of the exemplary data-sets:

> class(snps)
[1] "matrix"
> str(snps)
 num [1:100, 1:20003] 0 1 1 1 1 1 1 1 1 1 ...
 - attr(*, "dimnames")=List of 2
  ..$ : chr [1:100] "A_1090" "B_1078" "A_1070" "B_1083" ...
  ..$ : chr [1:20003] "1.g" "1.a" "2.t" "2.g" ...
> class(phen)
[1] "factor"
> str(phen)
 Factor w/ 2 levels "A","B": 2 2 2 2 1 2 1 1 2 2 ...
 - attr(*, "names")= chr [1:100] "B_1132" "B_1105" "B_1079" "B_1133" ...

I'm not sure if this is an R issue or a treeWAS issue. Any feedback would be greatly appreciated!

Cheers =)

R software error SNP • 687 views
ADD COMMENT

Login before adding your answer.

Traffic: 1860 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6