Package: profile-binr
profile_binrThe PROFILE methodology for the binarisation and normalisation of RNA-seq data.This is a Python interface to a set of normalisation and binarisation functions for
RNA-seq data originally written in R.This software package is based on the methodology developed by Beal, Jonas; Montagud, Arnau;
Traynard, Pauline; Barillot, Emmanuel; and Calzone, Laurence atComputational Systems Biology of Cancer team at Institut Curie(contact-sysbio@curie.fr).
It generalizes and offers a Python interface of the original implementation in Rmarkdown notebooks available athttps://github.com/sysbio-curie/PROFILE.InstallationUsing condaThe tool can be installed using the Conda packageprofile_binrin thecolomotochannel. Note that some of its dependencies requires theconda-forgechannel.conda install -c conda-forge colomoto::profile_binrUsing pipRequirementsR (≥4.0)R packages:mclustdiptestmomentsmagrittrtidyrdplyrtibblebigmemorydoSNOWforeachgluepip install profile_binrUsageOnce again this is a minimal example :fromprofile_binrimportProfileBinimportpandasaspd# your data is assumed to contain observations as# rows and genes as columnsdata=pd.read_csv("path/to/your/data.csv")data.head()Clec1bKdm3aCoro2b8430408G22RikClec9aPhf6Usp14Tmem167bcell_idHSPC_0250.04.8916041.4261480.00.02.5997582.9540356.357369HSPC_0310.06.8777250.0000000.00.02.4234831.8049140.000000HSPC_0370.00.0000006.9133840.00.02.0516598.2654650.000000LT-HSC_0010.00.0000008.1783740.00.06.4198173.4535022.579528HSPC_0010.00.0000009.4755770.00.07.7333701.4789000.000000# create the binarisation instance using the dataframe# with the index containing the cell identifier# and the columns being the gene namesprobin=ProfileBin(data)# compute the criteria used to binarise/normalise the data :# This method uses a parallel implementation, you can specify the# number of workers with an integerprobin.fit(8)# train using 8 threads# Look at the computed criteriaprobin.criteria.head(8)DipBIKurtosisDropOutRateMeanNZDenPeakAmplitudeCategoryClec1b0.3581071.63569854.0177360.8762081.520978-0.0072498.852181ZeroInfKdm3a0.0000002.407548-0.7840190.3260873.8479400.20923910.126676BimodalCoro2b0.0000002.3200607.0616040.6582132.3838190.0045979.475577ZeroInf8430408G22Rik0.6844543.12106921.7290440.8840582.9834720.0056639.067857ZeroInfClec9a1.0000002.081717140.0892850.9655802.280293-0.0093619.614233DiscardedPhf60.0000001.988667-1.3890240.0356285.0255012.01754710.135226BimodalUsp140.0000002.208080-1.2249870.0078506.1099648.24557011.088750BimodalTmem167b0.0000002.4308130.0930230.3937203.4483310.0729829.486826Bimodal# get binarised data (alternatively .binarise()):my_bin=probin.binarize()my_bin.head()Clec1bKdm3aCoro2b8430408G22RikClec9aPhf6Usp14Tmem167bHSPC_025NaN1.0NaNNaNNaN0.00.01.0HSPC_031NaN1.0NaNNaNNaN0.00.00.0HSPC_037NaN0.01.0NaNNaN0.01.00.0LT-HSC_001NaN0.01.0NaNNaN1.00.00.0HSPC_001NaN0.01.0NaNNaN1.00.00.0# idem for normalised data :my_norm=probin.normalize()my_norm.head()Clec1bKdm3aCoro2b8430408G22RikClec9aPhf6Usp14Tmem167bHSPC_0250.09.786196e-010.1841020.0NaN0.0008018.318176e-059.999970e-01HSPC_0310.09.999981e-010.0000000.0NaN0.0004628.084114e-076.874397e-11HSPC_0370.04.408417e-090.8924490.0NaN0.0001459.999940e-016.874397e-11LT-HSC_0010.04.408417e-091.0000000.0NaN0.9918656.230178e-041.599753e-04HSPC_0010.04.408417e-091.0000000.0NaN0.9998652.171153e-076.874397e-11ReferencesBéal J, Montagud A, Traynard P, Barillot E and Calzone L (2019)Personalization of Logical Models With Multi-Omics Data Allows Clinical Stratification of Patients. Front. Physiol. 9:1965. doi:10.3389/fphys.2018.01965