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

Unable to run fisher test due to LDSTP being too small #17

Closed
thh32 opened this issue Nov 29, 2018 · 8 comments
Closed

Unable to run fisher test due to LDSTP being too small #17

thh32 opened this issue Nov 29, 2018 · 8 comments

Comments

@thh32
Copy link

thh32 commented Nov 29, 2018

Currently getting the following issue when running the serial group comparisonl

Error in fisher.test(pre_table[, -3], alternative = "two.sided") : 
  FEXACT error 7(location). LDSTP=18630 is too small for this problem,
  (pastp=22.2575, ipn_0:=ipoin[itp=555]=2557, stp[ipn_0]=16.1017).
Increase workspace or consider using 'simulate.p.value=TRUE'
In addition: There were 30 warnings (use warnings() to see them)

The first OTU to pass the filtering used seems to run Ok as shown below, but none of the others are studied;

1	Richness	1	1
2	Shannon.effective	1	1
3	Simpson.effective	1	1
4	OTU_5697	1	1

I have tried both solutions posted on this overflow post without success (https://stackoverflow.com/questions/17052639/fisher-test-error-ldstp-is-too-small)

Is it possible to implement another version of the fisher test which works with larger datasets or remove the fisher test so only the Wilcoxon test is conducted and plotted as currently the Wilcoxon tests are done and printed to a file but the information is not plotted.

@SandraReitmeier
Copy link
Collaborator

SandraReitmeier commented Nov 29, 2018 via email

@thh32
Copy link
Author

thh32 commented Nov 29, 2018

Hi Sandra,

I tried increasing the workspace with increments of 2e8, 2e9, 2e11, 2e15, 2e100, 2e1000. However none of these seemed to solve the problem.

I havnt used a trycatch function in R before, could you perhaps explain how to go about this.

Thanks,
Tom

@SandraReitmeier
Copy link
Collaborator

SandraReitmeier commented Nov 29, 2018 via email

@thh32
Copy link
Author

thh32 commented Nov 30, 2018

I have just tried 2e7 and the error message seems to be the same.

Attached is the OTUsCombined.tab file I was trying to analyse.

OTUsCombined.tab.gz

Serial-Group-Comparisons.R.gz

@SandraReitmeier
Copy link
Collaborator

SandraReitmeier commented Nov 30, 2018 via email

@thh32
Copy link
Author

thh32 commented Nov 30, 2018

OK I just tried using the IV of "Mouse type" and it worked fine as you said however the one I have been studying is "Timepoint_Type" which was manually added by me and has all the information so that shouldnt be an issue. Looking into it further I found that the "Timepoint_facility" IV also worked fine. The only difference I could see between the IVs that worked and those that dont is the number of groups, which made me wonder what would happen if I removed some of the samples from groups not really needing to be studied e.g. Dam-faeces and Dam-CC. Once they were removed the issue was gone and the analysis worked perfectly.

Due to this it seems as though the issue is that the fisher test can only work on 7 or less groups.

It might be worth adding an option at the top to prevent the use of the fisher test so that users with datasets including >7 groups can avoid this issue.

Thanks,
Tom

@SandraReitmeier
Copy link
Collaborator

SandraReitmeier commented Nov 30, 2018 via email

@thh32
Copy link
Author

thh32 commented Nov 30, 2018

SOLVED!

Thank you Sandra, turned out I had only edited the workspace on line 477, not line 460. Now it works perfectly!

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