Entering edit mode
3.0 years ago
chenglei1865
•
0
When I used 2020+ to analyze example date, one error occurred at step 55
python `which 2020plus.py` --out-dir output_bladder/pretrained_output --log-level=INFO classify -n 200 --trained-classifier data/2020plus_10k.Rdata -d .7 -o 1.0 --features output_bladder/features.txt --null-distribution output_bladder/simulated_null_dist.txt --random-seed 71 --cv
Version: 1.2.3
Command: /home/ug0416/software/2020plus/2020plus.py --log-level=INFO classify --trained-classifier data/2020plus_10k.Rdata --null-distribution output_bladder/simulated_null_dist.txt --features output_bladder/simulated_summary/simulated_features.txt --simulated --cv
Running Random forest . . .
****************************************
AN ERROR HAS OCCURRED: check the log file
****************************************
Type: <class 'AttributeError'>
Exception: 'DataFrame' object has no attribute 'ix'
Traceback:
File "/home/ug0416/software/2020plus/2020plus.py", line 275, in <module>
args.func() # run function corresponding to user's command
File "/home/ug0416/software/2020plus/2020plus.py", line 37, in _classify
src.classify.python.classifier.main(opts) # run code
File "/home/ug0416/software/2020plus/src/classify/python/classifier.py", line 190, in main
result_df = trained_rand_forest_pred(rrclf, df, None, null_pvals, is_cv)
File "/home/ug0416/software/2020plus/src/classify/python/classifier.py", line 104, in trained_rand_forest_pred
onco_prob, tsg_prob, other_prob = clf.predict_cv()
File "/home/ug0416/software/2020plus/src/classify/python/generic_classifier.py", line 136, in predict_cv
test_feat = self.x.ix[new_genes]
File "/home/ug0416/.local/lib/python3.6/site-packages/pandas/core/generic.py", line 5141, in __getattr__
return object.__getattribute__(self, name)
R[write to console]: Warning message:
R[write to console]: package ‘randomForest’ was built under R version 4.0.3
Check for pandas library usage within python code. Probably, it's written for earlier versions of pandas.
Thank you for your reponse! I uninstalled current pandas(1.5), and I tried installed 0.17,0.18, errors occurred: Running setup.py clean for pandas Failed to build pandas Installing collected packages: pandas Running setup.py install for pandas ... error ERROR: Command errored out with exit status 1: command: /home/ug0416/.conda/envs/2020plus/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fkpkj06m/pandas_db40b85687e043a995bafbc57b16500a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fkpkj06m/pandas_db40b85687e043a995bafbc57b16500a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);
current version is 1.3.4 as per https://pandas.pydata.org/. Please check your pandas versions.