Metadata-Version: 2.4
Name: cornpy
Version: 0.2.0
Summary: Cornell Ecology Programs in Python
Home-page: https://github.com/maurobio/cornpy
Author: Mauro Cavalcanti
Author-email: maurobio@gmail.com
Keywords: ordination,classification,ecology,multivariate data analysis
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.22
Requires-Dist: scipy>=1.8
Requires-Dist: pandas>=1.4
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

CornPy: Cornell Ecology Programs in Python
******************************************
 
**CornPy** provides Python wrappers for two classic programs for ecological data analyses, DECORANA (DEtrended COrrespondence ANAlysis) and TWINSPAN (Two-Way SPecies INdicator ANalysis). Both programs were written by M. O. Hill in FORTRAN for mainframe computers, and modified for the IBM PC. 

These modified versions use the "strict" convergence criteria of Oksanen & Minchin (1997) for eigenanalysis, with a tolerance of 0.000005 and a maximum iteration limit of 999. In DECORANA, the bug in non-linear scaling has been corrected.

Besides binary executables compiled with GNU gfortran to run under MS-Windows or GNU/Linux, FORTRAN source files, decorana.f and twinspan.f, are also provided for those who wish to change the maximum dimensions (by simply changing the numbers in the first PARAMETER statement in each program). 

Both programs require an input data file in Cornell Condensed format, containing the community data to be analysed. The layout of this file should follow the same rules as for the original versions of DECORANA and TWINSPAN. The write_cep() function included in this package will automatically convert a pandas dataframe into a the required format for input to each program.

Install via 'pip install cornpy'

License
=====
**CornPy** is distributed under the GNU General Public License

Version
=====
0.2.0

Examples
======
Detrended correspondence analysis:

	import pandas as pd
    import cornpy as cp
    df = pd.read_csv("data.csv", index_col=0)
    site_scores, species_scores, site_labels, species_labels = cp.decorana(df)
	biplot(site_scores, species_scores, site_labels, species_labels)

Two-way species indicator analysis:

    import pandas as pd
    import cornpy as cp
    df = pd.read_csv("meadow.csv")
    output = twinspan(df)
