{"id":20531789,"url":"https://github.com/mrzresearcharena/pyfeat","last_synced_at":"2025-04-14T06:12:21.441Z","repository":{"id":41277794,"uuid":"131823183","full_name":"mrzResearchArena/PyFeat","owner":"mrzResearchArena","description":"A Python-based Effective Feature Generation Tool from DNA, RNA, and Protein Sequences","archived":false,"fork":false,"pushed_at":"2022-08-14T09:20:26.000Z","size":5766,"stargazers_count":95,"open_issues_count":1,"forks_count":30,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T06:12:15.539Z","etag":null,"topics":["bioinformatics","computational-biology","genomics","proteomics"],"latest_commit_sha":null,"homepage":"http://rafsanjani.pythonanywhere.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrzResearchArena.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-05-02T08:44:28.000Z","updated_at":"2025-04-06T04:49:47.000Z","dependencies_parsed_at":"2022-09-21T01:10:36.966Z","dependency_job_id":null,"html_url":"https://github.com/mrzResearchArena/PyFeat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzResearchArena%2FPyFeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzResearchArena%2FPyFeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzResearchArena%2FPyFeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzResearchArena%2FPyFeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrzResearchArena","download_url":"https://codeload.github.com/mrzResearchArena/PyFeat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830398,"owners_count":21168272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","computational-biology","genomics","proteomics"],"created_at":"2024-11-16T00:09:50.481Z","updated_at":"2025-04-14T06:12:21.409Z","avatar_url":"https://github.com/mrzResearchArena.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# \u003ccenter\u003ePyFeat: A Python-based Effective Feature Generation Tool from DNA, RNA, and Protein Sequences \u003c/center\u003e\n\n### Authors: Rafsanjani Muhammod, Sajid Ahmed, Dewan Md Farid, Swakkhar Shatabda, Alok Sharma, and Abdollah Dehzangi\n\u003c!-- ### \u003ccenter\u003e United International University, Dhaka, Bangladesh  \u003c/center\u003e --\u003e\n\n\u0026nbsp;\n\n## 1. Download Package\n### 1.1. Direct Download\nWe can directly [download](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/mrzResearchArena/PyFeat) by clicking the link.\n\n**Note:** The package will download in zip format `(.zip)` named `PyFeat-master.zip`.\n\n***`or,`***\n\n### 1.2. Clone a GitHub Repository (Optional)\n\nCloning a repository syncs it to our local machine (Example for Linux-based OS). After clone, we can add and edit files and then push and pull updates.\n- Clone over HTTPS: `user@machine:~$ git clone https://github.com/mrzResearchArena/PyFeat.git `\n- Clone over SSH: `user@machine:~$ git clone git@github.com:mrzResearchArena/PyFeat.git `\n\n**Note #1:** If the clone was successful, a new sub-directory appears on our local drive. This directory has the same name (PyFeat) as the `GitHub` repository that we cloned.\n\n**Note #2:** We can run any Linux-based command from any valid location or path, but by default, a command generally runs from `/home/user/`.\n\n**Note #2.1:** `user` is the name of our computer but your computer name can be different (Example: `/home/bioinformatics/`).\n\n## 2. Installation Process\n### 2.1. Required Python Packages\n`Major (Generate Features):`\n- Install: python (version \u003e= 3.5)\n- Install: numpy (version \u003e= 1.13.0)\n\n`Minor (Performance Measures):`\n- Install: sklearn (version \u003e= 0.19.0)\n- Install: pandas (version \u003e= 0.21.0)\n- Install: matplotlib (version \u003e= 2.1.0)\n\n### 2.2. How to download\n`Using PIP:`  pip install `\u003cpackage name\u003e`\n```console\nuser@machine:~$ pip install scikit-learn\n```\n**`or,`**\n\n`Using anaconda environment:` conda install `\u003cpackage name\u003e`\n\n```console\nuser@machine:~$ conda install scikit-learn\n```\n\n## 3. Working Procedure\n\nRun command on your console or terminal.\n\n### 3.1. Generate Features\n#### 3.1.1. Training Purpose\n```console\nuser@machine:~$ python main.py --sequenceType=DNA --fullDataset=1 --optimumDataset=1 --fasta=/home/user/PyFeat/Datasets/DNA/FASTA.txt --label=/home/user/PyFeat/Datasets/DNA/Labels.txt --kTuple=3 --kGap=5 --pseudoKNC=1 --zCurve=1 --gcContent=1 --cumulativeSkew=1 --atgcRatio=1 --monoMono=1 --monoDi=1 --monoTri=1 --diMono=1 --diDi=1 --diTri=1 --triMono=1 --triDi=1\n```\n***`or,`***\n\n```console\nuser@machine:~$ python main.py -seq=DNA -full=1 -optimum=1 -fa=/home/user/PyFeat/Datasets/DNA/FASTA.txt -la=/home/user/PyFeat/Datasets/DNA/Label.txt -ktuple=3 -kgap=5 -pseudo=1 -zcurve=1 -gc=1 -skew=1 -atgc=1 -f11=1 -f12=1 -f13=1 -f21=1 -f22=1 -f23=1 -f31=1 -f32=1\n```\n\n#### 3.1.2. Evaluation Purpose\n\n```console\nuser@machine:~$ python main.py --sequenceType=Protein --testDataset=1 --fasta=/home/user/PyFeat/Datasets/Protein/independentFASTA.txt --label=/home/user/PyFeat/Datasets/Protein/independentLabel.txt --kTuple=3 --kGap=5 --pseudoKNC=1 --zCurve=1 --gcContent=1 --cumulativeSkew=1 --atgcRatio=1 --monoMono=1 --monoDi=1 --monoTri=1 --diMono=1 --diDi=1 --diTri=1 --triMono=1 --triDi=1\n```\n***`or,`***\n\n```console\nuser@machine:~$ python main.py -seq=Protein -test=1 -fa=/home/user/PyFeat/Datasets/Protein/independentFASTA.txt -la=/home/user/PyFeat/Datasets/Protein/independentLabel.txt -ktuple=3 -kgap=5 -pseudo=1 -zcurve=1 -gc=1 -skew=1 -atgc=1 -f11=1 -f12=1 -f13=1 -f21=1 -f22=1 -f23=1 -f31=1 -f32=1\n```\n\n\n[ Comment: The `= sign` is optional. ]\n\n**Note #1:** It will generate a full dataset named **fullDataset.csv** (if -full=1 `or,` --fullDataset==1) \u003cbr\u003e\n**Note #2:** It will generate a selected features dataset named **optimumDataset.csv** (if -optimum=1 `or,` --optimumDataset==1), and It will also track the selected features index. \u003cbr\u003e\n**Note #3:** It will generate a full dataset named **testDataset.csv** (if -test=1 `or,` --testDataset==1) [ Especially for the independent (testing) dataset purpose. ] **[ 3.1.2. ]** \u003cbr\u003e\n**Note #4:** The process will run smoothly for valid FASTA sequences and row-wise class label.\n\n\u0026nbsp;\n\n#### Table 1: Arguments Details for the Features Generation\n|   Argument     |   Corresponding Optional Argument |     Type     |   Default | Help   |\n|     :---       |    :---:     |  :---:       |  :---:    | ---:|\n| --sequenceType | -seq | string | --sequenceType=DNA | We can use DNA, RNA, and protein or prot as option; Case is not sensitive. |\n| --fasta | -fa  | string |  | Enter a UNIX-like path; Example: /home/user/FASTA.txt |\n| --label | -la  | string |  | Enter a UNIX-like path; Example: /home/user/Label.txt |\n| --kGap | -kgap  | integer | --kGap=5  | The number of gaps ranging from 1 to 5 inclusive; Example: -kGap=5  |\n| --kTuple | -ktuple  | integer | --kTuple=3  | The number of nucleotides ranging from 1 to 3 inclusive; Example: -kTuple=3 |\n| --fullDataset | -full  | integer |  --fullDataset=0  | Set --fullDataset=1, if we don't want to save full dataset. |\n| --testDataset | -test  | integer |  --testDataset=0  | Set --testDataset=1, if we don't want to save test dataset. |\n| --optimumDataset | -optimum  | integer |  --optimumDataset=0  | Set --optimumDataset=1, if we don't want to save optimum dataset. |\n| --pseudoKNC | -pseudo  | integer |  --pseudoKNC=0  | Set --pseudoKNC=1, if we want to generate features. |\n| --zCurve | -zcurve  | integer |  --zCurve=0  | Set --zCurve=1, if we want to generate features. |\n| --gcContent | -gc  | integer |  --gcContent=0  | Set --gcContent=1, if we want to generate features. |\n| --cumulativeSkew | -skew  | integer |  --cumulativeSkew=0  | Set --cumulativeSkew=1, if we want to generate features. |\n| --atgcRatio | -atgc  | integer |  --atgcRatio=0  | Set --atgcRatio=1, if we want to generate features. |\n| --monoMono | -f11  | integer |  --monoMono=0  | Set --monoMono=1, if we want to generate features. |\n| --monoDi | -f12  | integer |  --monoDi=0  | Set --monoDi=1, if we want to generate features. |\n| --monoTri | -f13  | integer |  --monoTri=0  | Set --monoTri=1, if we want to generate features. |\n| --diMono | -f21  | integer |  --diMono=0  | Set --diMono=1, if we want to generate features. |\n| --diDi | -f22  | integer |  --diDi=0  | Set --diDi=1, if we want to generate features. |\n| --diTri | -f23  | integer |  --diTri=0  | Set --diTri=1, if we want to generate features. |\n| --triMono | -f31  | integer |  --triMono=0  | Set --triMono=1, if we want to generate features. |\n| --triDi | -f32  | integer |  --triDi=0  | Set --triDi=1, if we want to generate features. |\n\n\n\u0026nbsp;\n\u0026nbsp;\n\u0026nbsp;\n\n#### Table 2: Feature Description\n| Feature Name | Feature Structure / Formula | Number of Features | Applicable |\n| :---         |        :---:      |         :---:      |    ---:    |\n|zCurve| x_axis = (A+G)-(C+T); y_axis = (A+C)-(G+T); z_axis = (A+T)-(G+C) | 3 features for DNA/RNA | DNA, RNA |\n|gcContent| ( (G+C)/(A+C+G+T) ) x 100 % | 1 features for DNA/RNA | DNA, RNA |\n|atgcRatio| (A+T)/(G+C) |1 features for DNA/RNA| DNA, RNA |\n|cumulativeSkew|gcSkew=(G-C)/(G+C); atSkew=(A-T)/(A+T) |2 features for DNA/RNA| DNA, RNA |\n|pseudoKNC| X, XX, XXX | when --kTuple=3, 84 features for DNA/RNA and 8,420 features for protein  | DNA, RNA, Protein |\n|monoMonoKGap| X_X |when --kGap=1, 16 features for DNA/RNA and 400 features for protein|DNA, RNA, Protein|\n|monoDiKGap| X_XX |when --kGap=1, 64 features for DNA/RNA and 8,000 features for protein|DNA, RNA, Protein|\n|monoTriKGap| X_XXX |when --kGap=1, 256 features for DNA/RNA and 160,000 features for protein|DNA, RNA, Protein|\n|diMonoKGap| XX_X |when --kGap=1, 64 features for DNA/RNA and 8,000 features for protein|DNA, RNA, Protein|\n|diDiKGap| XX_XX |when --kGap=1, 256 features for DNA/RNA and 160,000 features for protein|DNA, RNA, Protein|\n|diTriKGap| XX_XXX |when --kGap=1, 1024 features for DNA/RNA and 3,200,000 features for protein|DNA, RNA, Protein|\n|triMonoKGap| XXX_X |when --kGap=1, 256 features for DNA/RNA and 160,000 features for protein|DNA, RNA, Protein|\n|triDiKGap| XXX_XX |when --kGap=1, 1024 features for DNA/RNA and 3,200,000 features for protein|DNA, RNA, Protein|\n\n**Note:** When sequence becomes DNA, RNA, and Protein then X = {A,C,G,T}, X = {A,C,G,U}, and\nX = {A,C,D,E,F,G,H,I,K,L,M,N,P,Q,R,S,T,V,W,Y} respectively.\n\n`Arguments Details for the Features Generation` and `Feature Description` are provided in Tables 1 and Table 2, respectively.\n\n\u0026nbsp;\n\u0026nbsp;\n\u0026nbsp;\n\n\n### 3.2. Run Machine Learning Classifiers (Optional)\n```console\nuser@machine:~$ python runClassifiers.py --nFCV=10 --dataset=optimumDataset.csv --auROC=1 --boxPlot=1\n```\n\n**Note #1:** It will provide classification results (**evaluationResults.txt**) from the user provides binary class dataset (**.csv** format). \u003cbr\u003e\n**Note #2:** Generate a ROC Curve (**auROC.png**). \u003cbr\u003e\n**Note #3:** Generate an accuracy comparison via boxPlot (**AccuracyBoxPlot.png**).\n\n\n\u0026nbsp;\n\n#### Table 3: Arguments Details for the Machine Learning Classifiers\n|   Argument     |   Corresponding Optional Argument  |     Type     |   Default | Help   |\n|     :---       |    :---:     |  :---:       |  :---:    | ---:|\n| --nFCV | -cv | integer | --nFCV=10 | How many numbers of cross-validation? |\n| --dataset | -data  | string | --dataset=optimumDataset.csv | Enter a UNIX-like path for a .csv file; Example: /home/User/dataset.csv |\n|--auROC|-roc|integer|--auROC=1|Set --auROC=0, if we didn't want to generate the ROC Curve.|\n|--boxPlot|-box|integer|--boxPlot=1|Set --boxPlot=0, if we didn't want to generate the accuracy box-plot.|\n\n\u0026nbsp;\n### 3.3. Training Model (Optional)\n\n```console\nuser@machine:~$ python trainModel.py --dataset=optimumDataset.csv --model=LR\n```\n\n**Note #1:** It will provide a **dumpModel.pkl** from the user provides binary class dataset (**.csv** format). \u003cbr\u003e\n\n\u0026nbsp;\n\n#### Table 4: Arguments Details for Training Model\n|   Argument     |   Corresponding Optional Argument   |     Type     |   Default | Help   |\n|     :---       |    :---:     |  :---:       |  :---:    | ---:|\n| --dataset | -data  | string | --dataset=optimumDataset.csv | Enter a UNIX-like path for a .csv file; Example: /home/User/dataset.csv |\n|--model|-m|string|--model=LR|We can use LR, SVM, KNN, DT, SVM, NB, Bagging, RF, AB, GB, and LDA as an option; All options are case sensitive.|\n| --K | -k  | integer | --K=5 | Only for the KNN classifier; Number of neighbor |\n\n**Note:** LR, SVM, KNN, DT, NB, Bagging, RF, AB, GB, and LDA represents Logistics Regression, Support Vector Machine, k-Nearest Neighbor, Decision Tree, Naive Bayes, Bagging, Random Forest, AdaBoost, Gradient Boosting, Linear Discriminant Analysis classifier respectively.\n\n\u0026nbsp;\n\u0026nbsp;\n\u0026nbsp;\n\n### 3.4. Evaluation Model (Optional)\n\n```console\nuser@machine:~$ python evaluateModel.py --optimumDatasetPath=optimumDataset.csv --testDatasetPath=testDataset.csv\n```\n\n**Note #1:** Here, **optimumDataset.csv**, and **testDataset.csv** using as a traing dataset and test dataset respectively.\n\n\u0026nbsp;\n\n#### Table 5: Arguments Details for Evaluation Model\n|   Argument     | Corresponding Optional Argument   |     Type     |   Default | Help   |\n|     :---       |    :---:     |  :---:       |  :---:    | ---:|\n| --optimumDatasetPath | -optimumPath  | string | --optimumDatasetPath=optimumDataset.csv | Enter a UNIX-like path for a .csv file; Example: /home/User/dataset.csv |\n| --testDatasetPath | -testPath  | string | --testDatasetPath=testDataset.csv | Enter a UNIX-like path for a .csv file; Example: /home/User/dataset.csv |\n\n\n\u0026nbsp;\n\u0026nbsp;\n\u0026nbsp;\n\n## References\n\n**[1]** Bin Liu, Fule Liu, Longyun Fang, Xiaolong Wang, and Kuo-Chen Chou. repdna: a\npython package to generate various modes of feature vectors for dna sequences by in-\ncorporating user-defined physicochemical properties and sequence-order effects. Bioin-\nformatics, 31(8):1307–1309, 2014.\n\n**[2]** Dong-Sheng Cao, Qing-Song Xu, and Yi-Zeng Liang. propy: a tool to generate various\nmodes of chous pseaac. Bioinformatics, 29(7):960–962, 2013.\n\n**[3]** Zhen Chen, Pei Zhao, Fuyi Li, André Leier, Tatiana T Marquez-Lago, Yanan Wang,\nGeoffrey I Webb, A Ian Smith, Roger J Daly, Kuo-Chen Chou, et al. ifeature: a python\npackage and web server for features extraction and selection from protein and peptide\nsequences. Bioinformatics, 1:4, 2018.\n\n**[4]** Md Rafsan Jani, Md Toha Khan Mozlish, Sajid Ahmed, Dewan Md Farid, and Swakkhar\nShatabda. irecspot-ef: Effective sequence based features for recombination hotspot\nprediction. Computers in biology and medicine, 2018.\n\n**[5]** Bin Liu, Fule Liu, Longyun Fang, Xiaolong Wang, and Kuo-Chen Chou. reprna: a web\nserver for generating various feature vectors of rna sequences. Molecular Genetics and\nGenomics, 291(1):473–481, 2016.\n\n**[6]** Nan Xiao, Dong-Sheng Cao, Min-Feng Zhu, and Qing-Song Xu. protr/protrweb: R\npackage and web server for generating various numerical representation schemes of pro-\ntein sequences. Bioinformatics, 31(11):1857–1859, 2015.\n\n**[7]** Bin Liu. Bioseq-analysis: a platform for dna, rna and protein sequence analysis based\non machine learning approaches. Briefings in bioinformatics, 2017.\n\n**[8]** Bin Liu, Hao Wu, Deyuan Zhang, Xiaolong Wang, and Kuo-Chen Chou. Pse-analysis:\na python package for dna/rna and protein/peptide sequence analysis based on pseudo\ncomponents and kernel methods. Oncotarget, 8(8):13338, 2017.\n\n**[9]** Bin Liu, Fule Liu, Xiaolong Wang, Junjie Chen, Longyun Fang, and Kuo-Chen Chou.\nPse-in-one: a web server for generating various modes of pseudo components of dna,\nrna, and protein sequences. Nucleic acids research, 43(W1):W65–W71, 2015.\n\n**[10]** Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier\nGrisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. Scikit-learn: Machine\nlearning in python. Journal of machine learning research, 12(Oct):2825–2830, 2011.\n\n**[11]** Eamonn Keogh and Abdullah Mueen. Curse of dimensionality. In Encyclopedia of\nMachine Learning and Data Mining, pages 314–315. Springer, 2017.\n\n**[12]** Ruihu Wang. Adaboost for feature selection, classification and its relation with svm, a\nreview. Physics Procedia, 25:800–807, 2012.\n\n**[13]** Hao Lin, En-Ze Deng, Hui Ding, Wei Chen, and Kuo-Chen Chou. ipro54-pseknc: a\nsequence-based predictor for identifying sigma-54 promoters in prokaryote with pseudo\nk-tuple nucleotide composition. Nucleic acids research, 42(21):12961–12972, 2014.\n\n**[14]** Wei Chen, Pengmian Feng, Hui Ding, and Hao Lin. Pai: Predicting adenosine to inosine\nediting sites by using pseudo nucleotide compositions. Scientific reports, 6:35123, 2016.\n\n**[15]** Hao Lin, Zhi-Yong Liang, Hua Tang, and Wei Chen. Identifying sigma70 promoters\nwith novel pseudo nucleotide composition. IEEE/ACM transactions on computational\nbiology and bioinformatics, 2017.\n\n**[16]** Mahmoud Ghandi, Dongwon Lee, Morteza Mohammad-Noori, and Michael A Beer.\nEnhanced regulatory sequence prediction using gapped k-mer features. PLoS computa-\ntional biology, 10(7):e1003711, 2014.\n\n**[17]** Shahana Yasmin Chowdhury, Swakkhar Shatabda, and Abdollah Dehzangi. Idnaprot-\nes: Identification of dna-binding proteins using evolutionary and structural features.\nScientific Reports, 7(1):14938, 2017.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrzresearcharena%2Fpyfeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrzresearcharena%2Fpyfeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrzresearcharena%2Fpyfeat/lists"}