harmslab / gpseer Goto Github PK
View Code? Open in Web Editor NEWA tool to predict missing data in sparsely sampled genotype-phenotype maps
Home Page: https://gpseer.readthedocs.io
A tool to predict missing data in sparsely sampled genotype-phenotype maps
Home Page: https://gpseer.readthedocs.io
Add a very simple notebook showing how to use this as an API.
Hello!
While running through the GPseer tutorial, I experienced a bug while running the following command with the raw pfcrt data:
gpseer cross-validate pfcrt-raw-data.csv --spline_order 2 --spline_smoothness 100000 --threshold 5 --output_root linear_spline2_threshold5 --n_samples 1000
Output:
[GPSeer] Reading data from pfcrt-raw-data.csv...
[GPSeer] └──> Done reading data.
[GPSeer] Fitting all data data...
Traceback (most recent call last):
File "/home/john/anaconda3/envs/gptest2/bin/gpseer", line 8, in <module>
sys.exit(entrypoint())
File "/home/john/anaconda3/envs/gptest2/lib/python3.8/site-packages/gpseer/main.py", line 180, in entrypoint
run(parser)
File "/home/john/anaconda3/envs/gptest2/lib/python3.8/site-packages/gpseer/main.py", line 174, in run
main(logger, **kwargs)
File "/home/john/anaconda3/envs/gptest2/lib/python3.8/site-packages/gpseer/cross_validate.py", line 131, in main
full_model.fit()
File "/home/john/.local/lib/python3.8/site-packages/epistasis/models/pipeline.py", line 49, in fit
gpm = model.fit_transform(X=X, y=y)
File "/home/john/.local/lib/python3.8/site-packages/epistasis/models/classifiers/base.py", line 52, in fit_transform
self.fit(X=X, y=y, **kwargs)
File "/home/john/.local/lib/python3.8/site-packages/epistasis/models/utils.py", line 52, in inner
return method(self, **kws)
File "/home/john/.local/lib/python3.8/site-packages/epistasis/models/classifiers/logistic.py", line 63, in fit
self._fit_classifier(X=X, y=y)
File "/home/john/.local/lib/python3.8/site-packages/epistasis/models/classifiers/base.py", line 44, in _fit_classifier
y = binarize(y.reshape(1, -1), self.threshold)[0]
TypeError: binarize() takes 1 positional argument but 2 were given
A collaborator, Jamie Robertson has been in contact with @Zsailer on this bug. This is what Zach had to say:
The issue arises when trying to fit a dataset that doesn't have data points on both sides of the "activity threshold". For example, if the threshold is set too low, it may be unlikely that you detect any data points below that value and the model won't have enough information to perform a valid fit. I see a couple issues with our software—1) we should raise a more helpful error message when this happens and 2) we should probably skip this "threshold" fitting when cross-validating since it's inevitable that a sample dataset will be drawn that doesn't demonstrate a clear threshold. In the meantime, increasing your value for the threshold should help alleviate the issue when cross validating.
I've tried rerunning the command with thresholds from -5 to 130 at increments of 5, and all thresholds return the same error, which is not what I would expect as these values span from the minimum to the maximum values of the phenotypes in the pfcrt data.
The command works fine when the threshold argument is not specified.
Thanks for any help, and please let me know if there is more information I can provide
Put io.html after basic example, but before full-interface
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.