blob: b80be6dbdf854e46f9405e763b54cda282035cae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
SRC = Mutagenicity-Salmonella_typhimurium.csv
LAZAR_BIN = ../../bin
MODEL = independent-variable-type dependent-variable-type dependent-variable-values similarity-thresholds independent-variables dependent-variables smiles metadata.json
all: crossvalidation/summaries
model: $(MODEL)
# Crossvalidation
crossvalidation/summaries: crossvalidation
$(LAZAR_BIN)/classification-summary.rb crossvalidation
crossvalidation: $(MODEL)
$(LAZAR_BIN)/crossvalidation.rb .
# Model
independent-variables: smiles
$(LAZAR_BIN)/fingerprints.rb smiles > $@
dependent-variables: $(SRC)
cut -f2 -d ',' $< | sed '1d' > $@
smiles: $(SRC)
cut -f1 -d ',' $< | sed '1d' > $@
# Metadata
metadata.json:
echo '{"species":"Salmonella typhimurium","endpoint":"Mutagenicity","source":"http://cheminformatics.org/datasets/bursi/cas_4337.zip, http://doc.ml.tu-berlin.de/toxbenchmark/Mutagenicity_N6512.csv, https://data.europa.eu/euodp/data/storage/f/2017-07-19T142131/GENOTOX data and dictionary.xls","qmrf":{"group":"QMRF 4.10. Mutagenicity","name":"OECD 471 Bacterial Reverse Mutation Test"}}' > $@
# Model parameters
independent-variable-type:
echo "binary" > $@
dependent-variable-type:
echo "binary" > $@
dependent-variable-values:
echo -e "\"0\"\n\"1\"" > $@
similarity-thresholds:
echo -e "0.2\n0.5" > $@
# Merge data
Mutagenicity-Salmonella_typhimurium.csv: download/efsa.csv download/hansen.csv download/kazius.csv
$(LAZAR_BIN)/merge_csv.rb $^
# Convert data
download/efsa.csv: download/efsa.tsv
download/efsa_classification.rb $< > $@
download/efsa.tsv: download/efsa.xls
xls2csv -s cp1252 -d utf-8 -x -c " " $< > $@
download/hansen.csv: download/Mutagenicity_N6512.csv
download/hansen_convert.rb $< > $@
download/kazius.csv: download/cas_4337.sdf
$(LAZAR_BIN)/sdf2csv.rb $< > $@
# Download original data
download/cas_4337.sdf:
cd download && wget http://cheminformatics.org/datasets/bursi/cas_4337.zip && unzip cas_4337.zip
download/Mutagenicity_N6512.csv:
cd download && wget http://doc.ml.tu-berlin.de/toxbenchmark/Mutagenicity_N6512.csv
download/efsa.xls:
wget "https://data.europa.eu/euodp/data/storage/f/2017-07-19T142131/GENOTOX data and dictionary.xls" -o $@
|