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

'x' must be an array of at least two dimensions #3

Open
fuesseler opened this issue Aug 25, 2021 · 1 comment
Open

'x' must be an array of at least two dimensions #3

fuesseler opened this issue Aug 25, 2021 · 1 comment

Comments

@fuesseler
Copy link

fuesseler commented Aug 25, 2021

Hello!
I am trying to use your package, which looks very promising! The examples you provided work perfectly fine for me, but when I try to run it for my own idxstats files R gives the following error:

Error in rowMeans(mat[, g == 1]) :
'x' must be an array of at least two dimensions

the above is when I try to use it in R, it happens when I try to run the sexDetermine function. I also tried doing it in shiny, but get the same error message as above.

I suspect it must be something wrong with my idxstats input files (i have six). Here is an example how the head of these files look like. First column is the name of the scaffold, then length, then number of mapped and unmapped reads.

0 91818038 6538851 936
1 108327730 7688399 1165
2 99174761 7077374 973
3 92607911 6538700 834

Do you have any idea what might be causing the error and how to make it work?

@casia16
Copy link
Collaborator

casia16 commented Sep 8, 2021

Hi,
The idxstat looks fine. It is possible that our default filtering threshold, filter out all the scaffolds you have. Can you play around with setting a lower threshold of minLength? and if you run it in R, you may also check the dim(idx[[1]]) compared with dim(rFilt[[1]]), that will give you number of scaffolds before and after filtering.

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