Papini programs: page with the software produced by Alessio Papini and Ugo Santosuosso (University of Florence)

Countnoise.py Program to count pixels differing in value between two images recorded of the same object

Version 2.0 calculates also the amount of noise in the starting images

Allamodagrey1_0.py Calculate an image containing the mode of the pixels in three images taken from the same subject

AllamodaRGB1_0.py the same as above but with RGB images

Allamodagrey6_0.py as above but on eight starting images

Allaveragegrey6_0.py Calculate an image containing the average of the pixels in eight images recorded from the same subject

2IMAGESinframe1_1.py put in frame two images from scanning of a negative of Transmission Electron microscope images by cutting edges of the images: the result is two smaller images of the same size

2IMAGESinframe1_2.py put in frame two images from scanning of a negative of Transmission Electron microscope images by cutting edges of the second image and adding black edge to recover an image of the same dimension as the first: the second image is of the same dimension as the first (but with black edge on the right and bottom sides). With this program it is possible to put in frame a third image (and more) with the first.

Resetexpo1_0.py if two images are recorded with traditional electron microscopes (TEM or SEM) photographic device, the exposimeters can vary their settings from one image to another. This program adapts the grey tones of an image to those of another image recorded of the same object. To do it it is necessary to take two pixels in the same position in the two images to see how many points of grey scale of diffrence are obtained from the pixel in x,y in image 1 with respect to the same pixel of figure 2 (it may be NOT in x,y if the two images are out of frame!). For instance in one image the pixel might have value 150 and in the other 155 (better to try the values of more pixels). If the difference is constantly 5 pixels more you can apply this program before the other analysis programs (Countnoise, ALLAmoda, 2imagesinframe)

Combinex1_0.py combines two nexus matrixes. If some accessions are present in one matrix and not inthe other it produces a new matrixes with all accessions but with ? For lacking data. It is mandatory that accessions names are the same in both matrixes, that is: no misstypings! Otherwise the program will consider different names as different taxa. In case of taxa present in one matrix but not in the other, the program insert in the final matrix a series of ? corresponding to the missing sequence. Taken from an idea in Biopython wiki http://biopython.org by an anonymous author, User:Davidw,, debugged and adapted to phylogenetic purpose. Provided under GPL licence.

The program works well with BioPython 1.53-1

If You use more recent version of Biopython, as 1.56-1 you may receive a terminal error due to a bug in the Biopython library in the Nexus Class Nexus.py: “Traceback (most recent call last):

File "combinex1_0.py", line 34, in <module>

combined.write_nexus_data(filename=m3)

File "/usr/lib/pymodules/python2.7/Bio/Nexus/Nexus.py", line 1292, in write_nexus_data

fh=open(filename,'w',encoding="utf-8")

TypeError: 'encoding' is an invalid keyword argument for this function"

It can be solved by deleting at line 1292 of Nexus.py the words ",encoding="utf-8""

Combinex2_0.py as the previous but working with three starting nexus matrixes.

Since 2016 the updated version of Geoprofiling scripts will be inserted in Bitbucket https://bitbucket.org/geoprofiling/



Central_point_Finder.py is a program (by Alessio Papini and Ugo Santosuosso) that finds the most probable origin of an invasive species starting from the distrubution data (example Canaryislands.bmp) and a map (example caulerpacanary.txt).

(published in:

Alessio Papini, Stefano Mosti, Ugo Santosuosso (2013) Tracking the origin of the invading Caulerpa (Caulerpales, Chlorophyta) with Geographic Profiling, a criminological technique for a killer alga. Biological Invasions 15(7): 1613-1621. DOI 10.1007/s10530-012-0396-5

Cini A., Anfora G., Escudero-Colomar L.A., Grassi A., Santosuosso U., Seljak G. Papini A. (2014) Tracking the invasion of the alien fruit pest Drosophila suzukii in Europe. Journal of Pest Science 87(4): 559-566.)

Kmeans by Alessio Papini and Ugo Santosuosso and calculates the Kmeans of a set of data in a given number of subclusters.

KmeansSilhouette by Ugo Santosuosso and Alessio Papini calculates the Kmeans of a set of data in a given number of subclusters and provides the Silhouette profile to evaluate how good is the choice of a certain number of clusters. It should provide an idea about in how many clusters a data set may be divided

(published in:

Santosuosso U, Papini A. (2016) Methods for geographic profiling of biological invasions with multiple origin sites. International Journal of Environmental Science and Technology, 13(8): 2037-2044. 10.1007/s13762-016-1032-1.)

Geoprof.py is program by Alessio Papini and Ugo Santosuosso that finds the center of origin of a set of data with Geographic profiling. With respect to the previous version it accepts as input csv files

more recent version

Geoprofiling with application of weights to positions (to be used for instance in infectious disease source investigation); exe version for windows user (zipped folder, 15Mb)

(in press in Brazilian Journal of Infectious Diseases:

Papini A, Santosuosso U. Snow's case revisited: new tool in geographic profiling of epidemiology.
To be published in: Brazilian Journal of Infectious Diseases, DOI 10.1016/j.bjid.2016.09.010)

Simulainvasionclusters: by Alessio Papini and Ugo Santosuosso, produces a Montecarlo simulation of an invasion of 100 populations of an invasive species subdivided in a given number of clusters on a user provided map

voronoi.py by Alessio Papini and Ugo Santosuosso divides a surface (provided as bmp image) in a given number of tessels

All last version and programs for kmeans (analysis and simulation) are contained in the folders examplekmaenssimula.zip and examplekmeansanalysis.zip

(published in:

Santosuosso U, Papini A. (2016) Methods for geographic profiling of biological invasions with multiple origin sites. International Journal of Environmental Science and Technology, 13(8): 2037-2044. 10.1007/s13762-016-1032-1.)

Jackknife applied on Geoprofiling: a zipped folder containing a data set on Caulerpa, a corresponding map and a series of programs (the controlling script jackscript1_0linux.py; Geoprof2_0_3csv.py; jack0_2.py; miximage10.py) performing Jackknife of a set of data , the corresponding jackknifing geoprofiling images. The jackknifed images are summarized with OR, AND logical operators or MEAN and mixed with the starting map. For more than 20 replicates it takes various hours of work, depending on the dimension of the map and of the data set) is available under jackknifeGP.zip

Clustering method DBSCAN