|
a/README.md |
|
b/README.md |
1 |
<h1 align="center"> |
1 |
<h1 align="center">
|
2 |
<br> |
2 |
<br>
|
3 |
<img src="https://github.com/lauzingaretti/DeepGP/blob/master/Logo.png" width="500"></a> |
3 |
<img src="https://github.com/lauzingaretti/DeepGP/blob/master/Logo.png?raw=true" width="500"></a>
|
4 |
<br> |
4 |
<br>
|
5 |
</h1> |
5 |
</h1> |
6 |
|
6 |
|
7 |
<h3 align="center">Harnessing deep learning for complex traits Genomic Prediction (GP) in plant breeding programs </h3> |
7 |
<h3 align="center">Harnessing deep learning for complex traits Genomic Prediction (GP) in plant breeding programs </h3> |
8 |
|
8 |
|
9 |
<p align="center"> |
9 |
<p align="center"> |
10 |
|
10 |
|
11 |
|
11 |
|
12 |
<p align="center"> |
12 |
<p align="center">
|
13 |
Laura Zingaretti (m.lau.zingaretti@gmail.com) and Miguel Pérez-Enciso (miguel.perez@uab.es) |
13 |
Laura Zingaretti (m.lau.zingaretti@gmail.com) and Miguel Pérez-Enciso (miguel.perez@uab.es)
|
14 |
</p> |
14 |
</p>
|
15 |
<hr> |
15 |
<hr>
|
16 |
<p align="center"> |
16 |
<p align="center">
|
17 |
A python based tool to implement Genomic Prediction Experiments using Deep Learning |
17 |
A python based tool to implement Genomic Prediction Experiments using Deep Learning |
18 |
|
18 |
|
19 |
</p> |
19 |
</p> |
20 |
|
20 |
|
21 |
### The Software |
21 |
### The Software |
22 |
|
22 |
|
23 |
The DeepGP package implements Multilayer Perceptron Networks (MLP), |
23 |
The DeepGP package implements Multilayer Perceptron Networks (MLP),
|
24 |
Convolutional Neural Network (CNN), |
24 |
Convolutional Neural Network (CNN),
|
25 |
Ridge Regression and Lasso Regression to Genomic Prediction purposes. |
25 |
Ridge Regression and Lasso Regression to Genomic Prediction purposes.
|
26 |
Our package takes advantage of Autonomio Talos [Computer software] (2019) ( http://github.com/autonomio/talos) functionalities to |
26 |
Our package takes advantage of Autonomio Talos [Computer software] (2019) ( http://github.com/autonomio/talos) functionalities to
|
27 |
optimize the networks parameters. It also implements uni and |
27 |
optimize the networks parameters. It also implements uni and
|
28 |
multi-trait experiments with a set of normalization options. |
28 |
multi-trait experiments with a set of normalization options.
|
29 |
We believe it can be a useful tool for people who want to |
29 |
We believe it can be a useful tool for people who want to
|
30 |
implement Deep Learning models for predicting complex traits in an |
30 |
implement Deep Learning models for predicting complex traits in an
|
31 |
easy way. |
31 |
easy way.
|
32 |
For a more 'didactic' site on DL, please check: https://github.com/miguelperezenciso/DLpipeline |
32 |
For a more 'didactic' site on DL, please check: https://github.com/miguelperezenciso/DLpipeline
|
33 |
Citation: [Pérez-Enciso M, Zingaretti LM. 2019. A Guide on Deep Learning for Complex Trait Genomic Prediction. Genes, 10, 553.](https://www.mdpi.com/2073-4425/10/7/553) |
33 |
Citation: [Pérez-Enciso M, Zingaretti LM. 2019. A Guide on Deep Learning for Complex Trait Genomic Prediction. Genes, 10, 553.](https://www.mdpi.com/2073-4425/10/7/553) |
34 |
|
34 |
|
35 |
### Citation |
35 |
### Citation
|
36 |
If you find this resource useful, please cite: |
36 |
If you find this resource useful, please cite: |
37 |
|
37 |
|
38 |
[Zingaretti LM, Gezan SA, Ferrão LFV, Osorio LF, Monfort A, Muñoz PR, Whitaker VM, Pérez-Enciso M. 2020. Exploring Deep Learning for Complex Trait Genomic Prediction in Polyploid Outcrossing Species. Frontiers in Plant Science 11:25](https://doi.org/10.3389/fpls.2020.00025) |
38 |
[Zingaretti LM, Gezan SA, Ferrão LFV, Osorio LF, Monfort A, Muñoz PR, Whitaker VM, Pérez-Enciso M. 2020. Exploring Deep Learning for Complex Trait Genomic Prediction in Polyploid Outcrossing Species. Frontiers in Plant Science 11:25](https://doi.org/10.3389/fpls.2020.00025) |
39 |
|
39 |
|
40 |
[Pérez-Enciso M, Zingaretti LM. 2019. A Guide on Deep Learning for Complex Trait Genomic Prediction. Genes, 10, 553.](https://www.mdpi.com/2073-4425/10/7/553) |
40 |
[Pérez-Enciso M, Zingaretti LM. 2019. A Guide on Deep Learning for Complex Trait Genomic Prediction. Genes, 10, 553.](https://www.mdpi.com/2073-4425/10/7/553) |
41 |
|
41 |
|
42 |
and possibly |
42 |
and possibly |
43 |
|
43 |
|
44 |
[Bellot P, De Los Campos G, Pérez-Enciso M. 2018. Can Deep Learning Improve Genomic Prediction of Complex Human Traits? Genetics 210:809-819.](https://www.genetics.org/content/210/3/809) |
44 |
[Bellot P, De Los Campos G, Pérez-Enciso M. 2018. Can Deep Learning Improve Genomic Prediction of Complex Human Traits? Genetics 210:809-819.](https://www.genetics.org/content/210/3/809) |
45 |
|
45 |
|
46 |
### Introduction |
46 |
### Introduction |
47 |
|
47 |
|
48 |
Deep Learning (DL) techniques comprise a heterogeneous collection of Machine Learning |
48 |
Deep Learning (DL) techniques comprise a heterogeneous collection of Machine Learning
|
49 |
algorithms which have excelled at prediction tasks. |
49 |
algorithms which have excelled at prediction tasks.
|
50 |
All DL algorithms employ multiple neuron layers and numerous |
50 |
All DL algorithms employ multiple neuron layers and numerous
|
51 |
architectures have been proposed. |
51 |
architectures have been proposed.
|
52 |
DL is relatively easy to implement (https://keras.io/why-use-keras/) but |
52 |
DL is relatively easy to implement (https://keras.io/why-use-keras/) but
|
53 |
is not 'plug and play' and the DL performance highly depends of the |
53 |
is not 'plug and play' and the DL performance highly depends of the
|
54 |
hyperparameter combination. |
54 |
hyperparameter combination. |
55 |
|
55 |
|
56 |
Genomic Selection is the breeding strategy |
56 |
Genomic Selection is the breeding strategy
|
57 |
consisting in predicting complex traits using |
57 |
consisting in predicting complex traits using
|
58 |
genomic-wide genetic markers and it is standard in many animal and |
58 |
genomic-wide genetic markers and it is standard in many animal and
|
59 |
plant breeding schemes. Its powerful predictive ability makes |
59 |
plant breeding schemes. Its powerful predictive ability makes
|
60 |
DL a suitable tool for prediction problems. Here, we deliver a tool |
60 |
DL a suitable tool for prediction problems. Here, we deliver a tool
|
61 |
to predicting complex traits |
61 |
to predicting complex traits
|
62 |
from whole genome SNP information in a easy way. |
62 |
from whole genome SNP information in a easy way.
|
63 |
This is thanks to Keras API (https://keras.io/) and TensorFlow (https://www.tensorflow.org/), which allow all intricacies to be encapsulated through very simple statements. TensorFlow is a machine-learning library developed by Google. |
63 |
This is thanks to Keras API (https://keras.io/) and TensorFlow (https://www.tensorflow.org/), which allow all intricacies to be encapsulated through very simple statements. TensorFlow is a machine-learning library developed by Google.
|
64 |
We also take advantage of the scikit learn (https://scikit-learn.org/stable/) |
64 |
We also take advantage of the scikit learn (https://scikit-learn.org/stable/)
|
65 |
to surrender classical penalized models for prediction purposes. |
65 |
to surrender classical penalized models for prediction purposes. |
66 |
|
66 |
|
67 |
The novelty of our tool lies in the fact that it allows us to tune |
67 |
The novelty of our tool lies in the fact that it allows us to tune
|
68 |
the most important hyperparameters in CNN and MLP architectures. |
68 |
the most important hyperparameters in CNN and MLP architectures. |
69 |
|
69 |
|
70 |
### GP main features |
70 |
### GP main features |
71 |
|
71 |
|
72 |
- It allows tuning the MLP and CNN architectues for GP purposes |
72 |
- It allows tuning the MLP and CNN architectues for GP purposes
|
73 |
- Our package uses a random search for hyperparameter optimization. |
73 |
- Our package uses a random search for hyperparameter optimization.
|
74 |
- It is easy to implement |
74 |
- It is easy to implement
|
75 |
- It delivers all the parameters to implemented models |
75 |
- It delivers all the parameters to implemented models
|
76 |
allowing you to explore the hyperparameters influence |
76 |
allowing you to explore the hyperparameters influence |
77 |
|
77 |
|
78 |
### What is a hyperparameter in DL jargon? |
78 |
### What is a hyperparameter in DL jargon? |
79 |
|
79 |
|
80 |
Hyperparameters are variables that need to set |
80 |
Hyperparameters are variables that need to set
|
81 |
in order to apply a DL algorithm to a dataset. Even in a simple neural network, |
81 |
in order to apply a DL algorithm to a dataset. Even in a simple neural network,
|
82 |
numerous hyperparameters need to be configured. The optimal combination of |
82 |
numerous hyperparameters need to be configured. The optimal combination of
|
83 |
hyperparameters depends on the specific problem and a set of suitable hyperparameters |
83 |
hyperparameters depends on the specific problem and a set of suitable hyperparameters
|
84 |
are required each time. This makes our tool a good solution for applying DL to |
84 |
are required each time. This makes our tool a good solution for applying DL to
|
85 |
Genomic Prediction problems. |
85 |
Genomic Prediction problems. |
86 |
|
86 |
|
87 |
### Deep Learning hyperparameters |
87 |
### Deep Learning hyperparameters |
88 |
|
88 |
|
89 |
|Term|Definition| |
89 |
|Term|Definition|
|
90 |
|:----:|----------| |
90 |
|:----:|----------|
|
91 |
|**Activation functions**|The mathematical function f that produces neuron’s output f(w’x + b), where w is a weights vector, x is an input vector, and b is bias, a scalar. Both w and b are to be estimated for all neurons.| |
91 |
|**Activation functions**|The mathematical function f that produces neuron’s output f(w’x + b), where w is a weights vector, x is an input vector, and b is bias, a scalar. Both w and b are to be estimated for all neurons.|
|
92 |
|**Batch**|In **Stochastic Gradient Descent** algorithms, each of the sample partitions within a given **epoch**.| |
92 |
|**Batch**|In **Stochastic Gradient Descent** algorithms, each of the sample partitions within a given **epoch**.|
|
93 |
|**Dropout**|Dropout means that a given percentage of neurons output is set to zero. The percentage is kept constant, but the specific neurons are randomly sampled in every iteration. The goal of dropout is to avoid overfitting.| |
93 |
|**Dropout**|Dropout means that a given percentage of neurons output is set to zero. The percentage is kept constant, but the specific neurons are randomly sampled in every iteration. The goal of dropout is to avoid overfitting.|
|
94 |
|**Kernel = Filter = Tensor**|In DL terminology, the kernel is a multidimensional array of weights.| |
94 |
|**Kernel = Filter = Tensor**|In DL terminology, the kernel is a multidimensional array of weights.|
|
95 |
|**Learning rate**|Specify the speed of gradient update.| |
95 |
|**Learning rate**|Specify the speed of gradient update.|
|
96 |
|**Loss**|Loss function measures how differences between observed and predicted target variables are quantified.| |
96 |
|**Loss**|Loss function measures how differences between observed and predicted target variables are quantified.|
|
97 |
|**Neural layer**|‘Neurons’ are arranged in layers, i.e., groups of neurons that take the output of previous group of neurons as input | |
97 |
|**Neural layer**|‘Neurons’ are arranged in layers, i.e., groups of neurons that take the output of previous group of neurons as input |
|
98 |
|**Neuron**|The basic unit of a DL algorithm. A ‘neuron’ takes as input a list of variable values (x) multiplied by ‘weights’ (w) and, as output, produces a non-linear transformation f(w’x + b) where f is the activation function and b is the bias. Both w and b need to be estimated for each neuron such that the loss is minimized across the whole set of neurons.| |
98 |
|**Neuron**|The basic unit of a DL algorithm. A ‘neuron’ takes as input a list of variable values (x) multiplied by ‘weights’ (w) and, as output, produces a non-linear transformation f(w’x + b) where f is the activation function and b is the bias. Both w and b need to be estimated for each neuron such that the loss is minimized across the whole set of neurons.|
|
99 |
|**Optimizer**|Algorithm to find weights (w and b) that minimize the loss function. Most DL optimizers are based on **Stochastic Gradient Descent** (SGD).| |
99 |
|**Optimizer**|Algorithm to find weights (w and b) that minimize the loss function. Most DL optimizers are based on **Stochastic Gradient Descent** (SGD).|
|
100 |
|**Pooling**|A pooling function substitutes the output of a network at a certain location with a summary statistic of the neighboring outputs. This is one of the crucial steps on the CNN architecture. The most common pooling operations are maximum, mean, median.| |
100 |
|**Pooling**|A pooling function substitutes the output of a network at a certain location with a summary statistic of the neighboring outputs. This is one of the crucial steps on the CNN architecture. The most common pooling operations are maximum, mean, median.|
|
101 |
|**Weight regularization**|An excess of parameters (weights, w) may produce the phenomenon called ‘overfitting’, which means that the model adjusts to the observed data very well, but prediction of new unobserved data is very poor. To avoid this, weights are estimated subject to constraints, a strategy called ‘penalization’ or ‘regularization’. The two most frequent regularizations are the L1 and L2 norms, which set restrictions on the sum of absolute values of w (L1) or of the square values (L2)| |
101 |
|**Weight regularization**|An excess of parameters (weights, w) may produce the phenomenon called ‘overfitting’, which means that the model adjusts to the observed data very well, but prediction of new unobserved data is very poor. To avoid this, weights are estimated subject to constraints, a strategy called ‘penalization’ or ‘regularization’. The two most frequent regularizations are the L1 and L2 norms, which set restrictions on the sum of absolute values of w (L1) or of the square values (L2)| |
102 |
|
102 |
|
103 |
<hr> |
103 |
<hr> |
104 |
|
104 |
|
105 |
### List of input parameters |
105 |
### List of input parameters |
106 |
|
106 |
|
107 |
The next two tables include the whole list of DeepGenomic.py input parameters to be parser using argparse. |
107 |
The next two tables include the whole list of DeepGenomic.py input parameters to be parser using argparse. |
108 |
|
108 |
|
109 |
|Input parameter | Description| |
109 |
|Input parameter | Description|
|
110 |
|:----:|----------| |
110 |
|:----:|----------|
|
111 |
|`Xtr`| Required: **True**.<br/> The training prediction matrix. It should be a .csv file with samples in rows and SNPs in column coded as 0, 1, to ploidy level. Data may contains row and colnames. <br/> **Usage:** `--Xtr /path/to/XtrainData.csv` | |
111 |
|`Xtr`| Required: **True**.<br/> The training prediction matrix. It should be a .csv file with samples in rows and SNPs in column coded as 0, 1, to ploidy level. Data may contains row and colnames. <br/> **Usage:** `--Xtr /path/to/XtrainData.csv` |
|
112 |
|`ytr`|Required: **True**. <br/> The training y matrix containing traits to be predicted. It should be a .csv file with samples in rows and traits in columns. Data may contains row and colnames and rownames should match with Xtr. The matrix should contains at least one column which means you want evaluating a single trait. It allows both continous and categorical traits. <br/> **Usage:** `--ytr /path/to/ytrainData.csv` | |
112 |
|`ytr`|Required: **True**. <br/> The training y matrix containing traits to be predicted. It should be a .csv file with samples in rows and traits in columns. Data may contains row and colnames and rownames should match with Xtr. The matrix should contains at least one column which means you want evaluating a single trait. It allows both continous and categorical traits. <br/> **Usage:** `--ytr /path/to/ytrainData.csv` |
|
113 |
|`Xval`| Required: **False**.<br/> The validation set prediction matrix. It should be a .csv file with samples in rows and SNPs in column coded as 0, 1, to ploidy level. Data may contains row and colnames. This matrix have to have the same SPNs set than Xtr. If you don't give a validation set, the software internally split the data in train and validation set. <br/> **Usage:** `--Xval /path/to/XvalData.csv` | |
113 |
|`Xval`| Required: **False**.<br/> The validation set prediction matrix. It should be a .csv file with samples in rows and SNPs in column coded as 0, 1, to ploidy level. Data may contains row and colnames. This matrix have to have the same SPNs set than Xtr. If you don't give a validation set, the software internally split the data in train and validation set. <br/> **Usage:** `--Xval /path/to/XvalData.csv` |
|
114 |
|`yval`|Required: **False**.<br/> The validation y matrix containing traits to be predicted. It should be a .csv file with samples in rows and traits in columns. Data may contains row and colnames and rownames should match with Xval. The matrix should contains the same traits than ytr.<br/> **Usage:** ` --yval /path/to/yvalData.csv` | |
114 |
|`yval`|Required: **False**.<br/> The validation y matrix containing traits to be predicted. It should be a .csv file with samples in rows and traits in columns. Data may contains row and colnames and rownames should match with Xval. The matrix should contains the same traits than ytr.<br/> **Usage:** ` --yval /path/to/yvalData.csv` |
|
115 |
|`cat`| Required: **False**.<br/> This argument facilitates the normalization of the training dataset by a categorical variable, i.e. if you have a breeding program and you need to categorize by trial. To use it, ytr have to contains an extra categorical column indicating observations belonging to each trial.<br/> **Usage:** `--cat Trial_Cat`, where Trial_Cat is the name of the categorical variable.| |
115 |
|`cat`| Required: **False**.<br/> This argument facilitates the normalization of the training dataset by a categorical variable, i.e. if you have a breeding program and you need to categorize by trial. To use it, ytr have to contains an extra categorical column indicating observations belonging to each trial.<br/> **Usage:** `--cat Trial_Cat`, where Trial_Cat is the name of the categorical variable.|
|
116 |
|`scale`|Default: **False**.<br/> It is a Boolean argument indicating if the y matrix should be scaled. It only works if you write `--scale` argument when you run DeepGenomic.py.| |
116 |
|`scale`|Default: **False**.<br/> It is a Boolean argument indicating if the y matrix should be scaled. It only works if you write `--scale` argument when you run DeepGenomic.py.|
|
117 |
|`dummy`|Default: **False**.<br/> It is a Boolean argument indicating if the SNP matrix should be converted into OneHot enconding.<br/> **Usage:** `--dummy` | |
117 |
|`dummy`|Default: **False**.<br/> It is a Boolean argument indicating if the SNP matrix should be converted into OneHot enconding.<br/> **Usage:** `--dummy` |
|
118 |
|`categorical`|Default: **False**.<br/> It is a Boolean argument indicating if traits in y matrix are categorical. <br/> **Usage:** `--categorical` .| |
118 |
|`categorical`|Default: **False**.<br/> It is a Boolean argument indicating if traits in y matrix are categorical. <br/> **Usage:** `--categorical` .|
|
119 |
|`trait`| Required: **False**.<br/> This argument indicates which trait you want evaluating. Use in case your matrix have more than 1 trait and you don't want evaluating all of them. <br/> **Usage:** `--trait name_of_the_trait` when you run DeepGenomic.py.| |
119 |
|`trait`| Required: **False**.<br/> This argument indicates which trait you want evaluating. Use in case your matrix have more than 1 trait and you don't want evaluating all of them. <br/> **Usage:** `--trait name_of_the_trait` when you run DeepGenomic.py.|
|
120 |
|`output`| Required: **True**.<br/> This parameter indicates the folder which will contain the outputs (table with evaluated models, weights for the best models and a plot with the predictive performance of the model). <br/> **Usage:** `--output path/to/output/folder/`.| |
120 |
|`output`| Required: **True**.<br/> This parameter indicates the folder which will contain the outputs (table with evaluated models, weights for the best models and a plot with the predictive performance of the model). <br/> **Usage:** `--output path/to/output/folder/`.|
|
121 |
|`Method`| Required: **True**.<br/> A mutually exclusive group indicating which model you want to run. <br/> **Usage:** `--mlp` for Multilayer Perceptron Networks. `--cnn` for Convolutional Neural Networks `--lasso` for classical lasso modeling and `--ridge` for ridge regression approach.| |
121 |
|`Method`| Required: **True**.<br/> A mutually exclusive group indicating which model you want to run. <br/> **Usage:** `--mlp` for Multilayer Perceptron Networks. `--cnn` for Convolutional Neural Networks `--lasso` for classical lasso modeling and `--ridge` for ridge regression approach.| |
122 |
|
122 |
|
123 |
The next table includes the parameters required if you want to evaluate a MLP (`--mlp` argument) or CNN (`--cnn` argument) neural networks, i.e. it is the process of hyperparameter tuning using the talos tool. All these parameters wouldn't work if you choose `--ridge` or `--lasso` as Method. |
123 |
The next table includes the parameters required if you want to evaluate a MLP (`--mlp` argument) or CNN (`--cnn` argument) neural networks, i.e. it is the process of hyperparameter tuning using the talos tool. All these parameters wouldn't work if you choose `--ridge` or `--lasso` as Method. |
124 |
|
124 |
|
125 |
|Input parameter | Description| |
125 |
|Input parameter | Description|
|
126 |
|:----:|----------| |
126 |
|:----:|----------|
|
127 |
|`lr`| Required: **False**.<br/> A list of learning rates to be considered in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--lr 0.001 0.025 0.1` or just lr: `-lr 0.0001` if you don't want to evaluate different learning rates. **Default**: `--lr 0.0025`.| |
127 |
|`lr`| Required: **False**.<br/> A list of learning rates to be considered in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--lr 0.001 0.025 0.1` or just lr: `-lr 0.0001` if you don't want to evaluate different learning rates. **Default**: `--lr 0.0025`.|
|
128 |
|`dr1`| Required: **False**.<br/> A list of dropouts in the first layer to be considered in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--dr1 0.001 0 0.1` or just `-- dr1 0`. **Default**: `--dr1 0`.| |
128 |
|`dr1`| Required: **False**.<br/> A list of dropouts in the first layer to be considered in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--dr1 0.001 0 0.1` or just `-- dr1 0`. **Default**: `--dr1 0`.|
|
129 |
|`dr2`| Required: **False**.<br/> A list of dropouts in the hidden layers to be considered in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--dr2 0.001 0 0.1` or just `-- dr2 0`. **Default**: `--dr2 0`.| |
129 |
|`dr2`| Required: **False**.<br/> A list of dropouts in the hidden layers to be considered in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--dr2 0.001 0 0.1` or just `-- dr2 0`. **Default**: `--dr2 0`.|
|
130 |
|`reg1`| Required: **False**.<br/> A list of L2 weight regularization to be used in the first layer in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--reg1 0.001 0 0.1` or just `-- reg1 0`. **Default**: `--reg1 0`.| |
130 |
|`reg1`| Required: **False**.<br/> A list of L2 weight regularization to be used in the first layer in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--reg1 0.001 0 0.1` or just `-- reg1 0`. **Default**: `--reg1 0`.|
|
131 |
|`reg2`| Required: **False**.<br/> A list of L2 weight regularization to be used in the hidden layers in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--reg2 0.001 0 0.1` or just `-- reg2 0`. **Default**: `--reg2 0`.| |
131 |
|`reg2`| Required: **False**.<br/> A list of L2 weight regularization to be used in the hidden layers in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--reg2 0.001 0 0.1` or just `-- reg2 0`. **Default**: `--reg2 0`.|
|
132 |
|`reg3`| Required: **False**.<br/> A list of L2 weight regularization to be used in the last layer in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--reg3 0.001 0 0.1` or just `-- reg3 0`. **Default**: `--reg3 0`.| |
132 |
|`reg3`| Required: **False**.<br/> A list of L2 weight regularization to be used in the last layer in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--reg3 0.001 0 0.1` or just `-- reg3 0`. **Default**: `--reg3 0`.|
|
133 |
|`hn`| Required: **False**.<br/> A list of integers with the number of hidden neurons to be evaluated in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--hn 8 16 32` or just `-- hn 64`. **Default**: `-hn 8`.| |
133 |
|`hn`| Required: **False**.<br/> A list of integers with the number of hidden neurons to be evaluated in the process of Neural Network (NN) hyperparameters tuning. <br/> **Usage:** `--hn 8 16 32` or just `-- hn 64`. **Default**: `-hn 8`.|
|
134 |
|`hl`| Required: **False**.<br/> A list of integers with the number of hidden layers in the fully connected layers of both CNN or MLP networks. <br/> **Usage:** `--hl 1 5 7` or just `-- hl 3`. **Default**: `--hl 3`.| |
134 |
|`hl`| Required: **False**.<br/> A list of integers with the number of hidden layers in the fully connected layers of both CNN or MLP networks. <br/> **Usage:** `--hl 1 5 7` or just `-- hl 3`. **Default**: `--hl 3`.|
|
135 |
|`N_neurons_FL`| Required: **False**.<br/> A list of integer containing the number of neurons considered in the first layer of the mlp architecture. <br/> **Usage:** `--N_neurons_FL 1 4 10` or just `--N_neurons_FL 32`. **Default**: `--N_neurons_FL 8`. It only works when `--mlp` is activated.| |
135 |
|`N_neurons_FL`| Required: **False**.<br/> A list of integer containing the number of neurons considered in the first layer of the mlp architecture. <br/> **Usage:** `--N_neurons_FL 1 4 10` or just `--N_neurons_FL 32`. **Default**: `--N_neurons_FL 8`. It only works when `--mlp` is activated.|
|
136 |
|`epochs`| Required: **False**.<br/> A list of integers containing the number of epochs to be evaluated. <br/> **Usage:** `--epochs 50 100 150` or just `-- epochs 1000`. **Default**: `--epochs 50`.| |
136 |
|`epochs`| Required: **False**.<br/> A list of integers containing the number of epochs to be evaluated. <br/> **Usage:** `--epochs 50 100 150` or just `-- epochs 1000`. **Default**: `--epochs 50`.|
|
137 |
|`optimizer`| Required: **False**.<br/> A list of strings containing the optimizer function to be considered. You can choice between Adam, Nadam and sgd. <br/> **Usage:** `--optimizer Adam sgd` or just `-- optimizer Adam`. **Default**: `--optimizer Adam sgd Nadam`.| |
137 |
|`optimizer`| Required: **False**.<br/> A list of strings containing the optimizer function to be considered. You can choice between Adam, Nadam and sgd. <br/> **Usage:** `--optimizer Adam sgd` or just `-- optimizer Adam`. **Default**: `--optimizer Adam sgd Nadam`.|
|
138 |
|`bs`| Required: **False**.<br/> A list of integers containing the batch size to be considered. <br/> **Usage:** `--bs 16 32` or just `-- bs 32`. **Default**: `--bs 16`.| |
138 |
|`bs`| Required: **False**.<br/> A list of integers containing the batch size to be considered. <br/> **Usage:** `--bs 16 32` or just `-- bs 32`. **Default**: `--bs 16`.|
|
139 |
|`act1`| Required: **False**.<br/> A list of str with the activation function to be considered. For a fully connected network, i.e. mlp it is the activation to be used in the fully connected layers and for a cnn it should be the activation for the Convolutional layer. You can chose one or more from the following list: relu, elu, linear, softmax, tanh, softplus. <br/> **Usage:** `--act1 tanh linear` or just `--act1 tanh`. **Default**: `--act1 relu, elu, linear, softmax, tanh, softplus`.| |
139 |
|`act1`| Required: **False**.<br/> A list of str with the activation function to be considered. For a fully connected network, i.e. mlp it is the activation to be used in the fully connected layers and for a cnn it should be the activation for the Convolutional layer. You can chose one or more from the following list: relu, elu, linear, softmax, tanh, softplus. <br/> **Usage:** `--act1 tanh linear` or just `--act1 tanh`. **Default**: `--act1 relu, elu, linear, softmax, tanh, softplus`.|
|
140 |
|`act2`| Required: **False**.<br/> A list of str with the activation function to be considered in the fully connected layers of a CNN network.You can chose one or more from the following list: relu, elu, linear, softmax, tanh, softplus. <br/> **Usage:** `--act2 tanh linear` or just `--act2 tanh`. **Default**: `--act2 relu, elu, linear, softmax, tanh, softplus`. It only works when `--cnn` is activated.| |
140 |
|`act2`| Required: **False**.<br/> A list of str with the activation function to be considered in the fully connected layers of a CNN network.You can chose one or more from the following list: relu, elu, linear, softmax, tanh, softplus. <br/> **Usage:** `--act2 tanh linear` or just `--act2 tanh`. **Default**: `--act2 relu, elu, linear, softmax, tanh, softplus`. It only works when `--cnn` is activated.|
|
141 |
|`nconv`| Required: **False**.<br/> A list of integer with the number of convolutional layers to be considered. <br/> **Usage:** `--nconv 1 5` or just `--nconv 1`. **Default**: `--nconv 1`. It only works when `--cnn` is activated.| |
141 |
|`nconv`| Required: **False**.<br/> A list of integer with the number of convolutional layers to be considered. <br/> **Usage:** `--nconv 1 5` or just `--nconv 1`. **Default**: `--nconv 1`. It only works when `--cnn` is activated.|
|
142 |
|`ps`| Required: **False**.<br/> A list of integer containing pool size for convolutions. <br/> **Usage:** `--ps 1 5` or just `--ps 1`. **Default**: `--ps 1`. It only works when `--cnn` is activated.| |
142 |
|`ps`| Required: **False**.<br/> A list of integer containing pool size for convolutions. <br/> **Usage:** `--ps 1 5` or just `--ps 1`. **Default**: `--ps 1`. It only works when `--cnn` is activated.|
|
143 |
|`ks`| Required: **False**.<br/> A list of integer containing kernel size for convolutions. <br/> **Usage:** `--ks 3 5 7` or just `--ks 3`. **Default**: `--ks 3`. It only works when `--cnn` is activated.| |
143 |
|`ks`| Required: **False**.<br/> A list of integer containing kernel size for convolutions. <br/> **Usage:** `--ks 3 5 7` or just `--ks 3`. **Default**: `--ks 3`. It only works when `--cnn` is activated.|
|
144 |
|`ns`| Required: **False**.<br/> A list of integer containing the number of strides for convolutions. <br/> **Usage:** `--ns 3 5 7` or just `--ns 3`. **Default**: `--ns 1`. It only works when `--cnn` is activated.| |
144 |
|`ns`| Required: **False**.<br/> A list of integer containing the number of strides for convolutions. <br/> **Usage:** `--ns 3 5 7` or just `--ns 3`. **Default**: `--ns 1`. It only works when `--cnn` is activated.|
|
145 |
|`nfilters`| Required: **False**.<br/> A list of integer containing the number of convolutional operations in each convolutional layer. <br/> **Usage:** `--nfilters 16 32 128` or just `--nfilters 32`. **Default**: `--nfilters 8`. It only works when `--cnn` is activated.| |
145 |
|`nfilters`| Required: **False**.<br/> A list of integer containing the number of convolutional operations in each convolutional layer. <br/> **Usage:** `--nfilters 16 32 128` or just `--nfilters 32`. **Default**: `--nfilters 8`. It only works when `--cnn` is activated.|
|
146 |
|`gridProp`| Required: **False**.<br/> Proportion of random search for hyperparameter combination. Please be careful when selecting the prop and make sure you include at least one model to be evaluated, i.e. if the hyperparameters combination includes 10 models, gridProp should be at least 0.1. <br/> **Usage:** `--gridProp 0.01`. **Default**: `--gridProp 1` which means all the models would be evaluated. It only works when `--cnn` or --mlp is activated.| |
146 |
|`gridProp`| Required: **False**.<br/> Proportion of random search for hyperparameter combination. Please be careful when selecting the prop and make sure you include at least one model to be evaluated, i.e. if the hyperparameters combination includes 10 models, gridProp should be at least 0.1. <br/> **Usage:** `--gridProp 0.01`. **Default**: `--gridProp 1` which means all the models would be evaluated. It only works when `--cnn` or --mlp is activated.| |
147 |
|
147 |
|
148 |
|
148 |
|
149 |
<hr> |
149 |
<hr> |
150 |
|
150 |
|
151 |
### 📈 Genomic Prediction Examples |
151 |
### 📈 Genomic Prediction Examples |
152 |
|
152 |
|
153 |
|
153 |
|
154 |
Check in any of these items to access examples to run the desired DL option. |
154 |
Check in any of these items to access examples to run the desired DL option. |
155 |
|
155 |
|
156 |
|
156 |
|
157 |
- [1. MLP](https://github.com/lauzingaretti/DeepGS/blob/master/inst/md/MLP.md) |
157 |
- [1. MLP](https://github.com/lauzingaretti/DeepGS/blob/master/inst/md/MLP.md)
|
158 |
- [2. CNN](https://github.com/lauzingaretti/DeepGS/blob/master/inst/md/CNN.md) |
158 |
- [2. CNN](https://github.com/lauzingaretti/DeepGS/blob/master/inst/md/CNN.md)
|
159 |
- [3. Linear regression](https://github.com/lauzingaretti/DeepGS/blob/master/inst/md/LM.md) |
159 |
- [3. Linear regression](https://github.com/lauzingaretti/DeepGS/blob/master/inst/md/LM.md) |
160 |
|
160 |
|
161 |
|
161 |
|
162 |
<hr> |
162 |
<hr> |
163 |
|
163 |
|
164 |
### 💾 Usage |
164 |
### 💾 Usage |
165 |
|
165 |
|
166 |
Please clone this repo i the DeepGP folder |
166 |
Please clone this repo i the DeepGP folder |
167 |
|
167 |
|
168 |
`git clone https://github.com/lauzingaretti/DeepGP.git DeepGP` |
168 |
`git clone https://github.com/lauzingaretti/DeepGP.git DeepGP` |
169 |
|
169 |
|
170 |
Install dependencies |
170 |
Install dependencies |
171 |
|
171 |
|
172 |
`pip3 install -r requirements.txt` |
172 |
`pip3 install -r requirements.txt` |
173 |
|
173 |
|
174 |
`cd DeepGP` |
174 |
`cd DeepGP` |
175 |
|
175 |
|
176 |
|
176 |
|
177 |
`python3 Deep_genomic.py --Xtr /path/to/Xtrain.csv --Ytr /path/to/Ytrain.csv --Xval /path/to/Xval.csv --yval /path/to/Yval.csv --trait name of the trait --gridProp 1 --output /path/to/outputFolder/ --cnn --lr 0.025 0.01 --dr1 0 0.01 --dr2 0 --reg1 0.0001 --nconv 3 --act1 linear tanh --ks 3 --hl 1 5 --optimizer Adam --act2 tanh --dummy --scale` |
177 |
`python3 Deep_genomic.py --Xtr /path/to/Xtrain.csv --Ytr /path/to/Ytrain.csv --Xval /path/to/Xval.csv --yval /path/to/Yval.csv --trait name of the trait --gridProp 1 --output /path/to/outputFolder/ --cnn --lr 0.025 0.01 --dr1 0 0.01 --dr2 0 --reg1 0.0001 --nconv 3 --act1 linear tanh --ks 3 --hl 1 5 --optimizer Adam --act2 tanh --dummy --scale`
|
178 |
` |
178 |
` |
179 |
|
179 |
|
180 |
|
180 |
|
181 |
|
181 |
|
182 |
### How to cite? |
182 |
### How to cite? |
183 |
|
183 |
|
184 |
If you considered our program useful, please cite |
184 |
If you considered our program useful, please cite |
185 |
|
185 |
|
186 |
[Zingaretti LM, Gezan SA, Ferrão LFV, Osorio LF, Monfort A, Muñoz PR, Whitaker VM, Pérez-Enciso M. 2020. Exploring Deep Learning for Complex Trait Genomic Prediction in Polyploid Outcrossing Species. Frontiers in Plant Science 11:25](https://doi.org/10.3389/fpls.2020.00025) |
186 |
[Zingaretti LM, Gezan SA, Ferrão LFV, Osorio LF, Monfort A, Muñoz PR, Whitaker VM, Pérez-Enciso M. 2020. Exploring Deep Learning for Complex Trait Genomic Prediction in Polyploid Outcrossing Species. Frontiers in Plant Science 11:25](https://doi.org/10.3389/fpls.2020.00025) |
187 |
|
187 |
|
188 |
<hr> |
188 |
<hr> |
189 |
|
189 |
|
190 |
# |
190 |
#
|