Skip to content

Commit aa68dda

Browse files
Merge pull request #11 from ArnovanHilten/dev
Release 1.2.0
2 parents 6dbc1e3 + 13ea850 commit aa68dda

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+26580
-26634
lines changed

GenNet.py

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import sys
22
import os
33
import warnings
4+
45
warnings.filterwarnings('ignore')
56
import argparse
7+
68
sys.path.insert(1, os.path.dirname(os.getcwd()) + "/utils/")
79
from utils.Create_plots import plot
810
from utils.Train_network import train_classification, train_regression
911
from utils.Convert import convert
1012

13+
1114
def main(args):
1215
if args.mode == 'train':
1316
if args.problem_type == "classification":
@@ -23,19 +26,20 @@ def main(args):
2326

2427

2528
if __name__ == '__main__':
26-
parser = argparse.ArgumentParser(description = "GenNet: Interpretable neural networks for phenotype prediction.",
29+
parser = argparse.ArgumentParser(description="GenNet: Interpretable neural networks for phenotype prediction.",
2730
epilog="Check the wiki on github.com/arnovanhilten/gennet/ for more info")
28-
subparsers = parser.add_subparsers(help = "GenNet main options", dest="mode")
31+
subparsers = parser.add_subparsers(help="GenNet main options", dest="mode")
2932

30-
parser_convert = subparsers.add_parser("convert", help = "Convert genotype data to hdf5")
33+
parser_convert = subparsers.add_parser("convert", help="Convert genotype data to hdf5")
3134
parser_convert.add_argument("-g", "--genotype", nargs='+', type=str, help="path/paths to genotype data folder")
3235
parser_convert.add_argument('-study_name', type=str, required=True, nargs='+',
3336
help=' Name for saved genotype data, without ext')
34-
parser_convert.add_argument('-variants', type=str, help="Path to file with row numbers of variants to include, if none is "
35-
"given all variants will be used", default=None)
37+
parser_convert.add_argument('-variants', type=str,
38+
help="Path to file with row numbers of variants to include, if none is "
39+
"given all variants will be used", default=None)
3640
parser_convert.add_argument("-o", "--out", type=str, required=True, help="path to save result folder")
3741
parser_convert.add_argument('-ID', action='store_true', default=False,
38-
help='Flag to convert minimac data to genotype per subject files first (default False)')
42+
help='Flag to convert minimac data to genotype per subject files first (default False)')
3943

4044
parser_convert.add_argument('-vcf', action='store_true', default=False, help='Flag for VCF data to convert')
4145
parser_convert.add_argument('-tcm', type=int, default=500000000, help='Modifier for chunk size during TRANSPOSING'
@@ -55,7 +59,7 @@ def main(args):
5559
parser_train.add_argument(
5660
"-problem_type",
5761
default='classification', type=str,
58-
choices=['classification','regression'],
62+
choices=['classification', 'regression'],
5963
help="Type of problem, choices are: classification or regression"
6064
)
6165
parser_train.add_argument(
@@ -110,11 +114,9 @@ def main(args):
110114
type=int,
111115
help="Only for layer weight: Number of the to be plotted layer",
112116
metavar="Layer_number:",
113-
default = 0
117+
default=0
114118
)
115119

116120
args = parser.parse_args()
117121

118122
main(args)
119-
120-

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ cd ~
4242
python3 -m venv env_GenNet
4343
```
4444

45-
This automatically instals the latest Tensorflow version for which GenNet has been tested. If you have an older version of CUDA install the appriopriate tensorflow-gpu by
45+
This automatically installs the latest Tensorflow version for which GenNet has been tested. If you have an older version of CUDA install the appriopriate tensorflow-gpu by
4646
`pip install tensorflow-gpu==1.13.1` (change 1.13.1 to your version).
4747

4848
**Activate the environment**

0 commit comments

Comments
 (0)