.gitlab-ci.yml 2.96 KB
Newer Older
Toby Hodges's avatar
Toby Hodges committed
1
image: r-base
Toby Hodges's avatar
Toby Hodges committed
2
before_script:
3
  - cd Rscript_flavor
4
  - Rscript 00_setup.r
5
  - cd ../
Toby Hodges's avatar
Toby Hodges committed
6
  - R CMD build ./
Toby Hodges's avatar
Toby Hodges committed
7
  - mv SIAMCAT*.tar.gz Rscript_flavor/.
Toby Hodges's avatar
Toby Hodges committed
8
  - cd Rscript_flavor
9
  - wget http://congo.embl.de/downloads/siamcat_test_data.tar.gz
Toby Hodges's avatar
Toby Hodges committed
10
  - tar -zxf siamcat_test_data.tar.gz && rm siamcat_test_data.tar.gz
Toby Hodges's avatar
Toby Hodges committed
11
12
13

test:
  stage: test
Konrad Zych's avatar
Konrad Zych committed
14
  script:
15
    - Rscript 00_setup.r
Konrad Zych's avatar
Konrad Zych committed
16
17
18
    - Rscript 01_validate_data.r --metadata_in num_metadata_cancer-vs-healthy_study-pop-I_N141_tax_profile_mocat_bn_genus.tsv --metadata_out valMetaData.tsv --label_in label_cancer-vs-healthy_study-pop-I_N141_tax_profile_mocat_bn_genus.tsv --label_out valLabel.tsv --feat_in feat_cancer-vs-healthy_study-pop-I_N141_tax_profile_mocat_bn_genus.tsv --feat_out valFeat.tsv
    - Rscript 02_select_samples.r --metadata_in valMetaData.tsv --metadata_out valMetaData_sel.tsv --label_in valLabel.tsv --label_out valLabel_sel.tsv --feat_in valFeat.tsv --feat_out valFeat_sel.tsv --filter_var="age" --allowed_range="[0,120]"
    - Rscript 03_check_for_confounders.r --metadata_in valMetaData_sel.tsv --plot metaCheck.pdf --label_in valLabel_sel.tsv
Konrad Zych's avatar
Konrad Zych committed
19
    - Rscript 04_filter_features.r --feat_in valFeat_sel.tsv --feat_out valFeat_sel_filtered.tsv --method="abundance" --cutoff="0.001" --recomp_prop="FALSE" --rm_unmapped="TRUE"
Konrad Zych's avatar
Konrad Zych committed
20
    - Rscript 05_check_associations.r --feat_in valFeat_sel_filtered.tsv --label_in valLabel_sel.tsv --plot assoc.pdf --col_scheme="RdYlBu" --alpha="0.7" --min_fc="0" --mult_test="fdr" --max_show="50" --detect_limit="1e-06" --plot_type="bean"
21
    - Rscript 06_normalize_features.r --feat_in valFeat_sel_filtered.tsv --feat_out valFeat_sel_norm.tsv --param_out param_out.tsv --method="log.unit" --log_n0="1e-08" --sd_min_quantile="0.2" --vector_norm="2" --norm_margin="1"
22
    - Rscript 07_add_metadata_as_predictor.r --feat_in valFeat_sel_norm.tsv --feat_out valFeat_sel_norm.tsv --metadata_in valMetaData_sel.tsv --pred_names="fobt" --std_meta="TRUE"
Konrad Zych's avatar
Konrad Zych committed
23
24
25
26
27
    - Rscript 08_split_data.r --label_in valLabel_sel.tsv --train_sets trainSets.tsv --test_sets testSets.tsv --num_folds="10" --resample="5" --stratify="TRUE" --inseparable="NULL" --metadata_in valMetaData_sel.tsv
    - Rscript 09_train_models.r --feat_in valFeat_sel_norm.tsv --label_in valLabel_sel.tsv --method="lasso" --train_sets trainSets.tsv --mlr_models_list models.RData --stratify="TRUE" --sel_criterion="auprc" --min_nonzero_coeff="2"
    - Rscript 10_make_predictions.r --label_in valLabel_sel.tsv --feat_in valFeat_sel_norm.tsv --test_sets testSets.tsv --pred pred.tsv --mlr_models_list models.RData
    - Rscript 11_evaluate_predictions.r --label_in valLabel_sel.tsv --plot evalPlot.pdf --pred pred.tsv
    - Rscript 12_interpret_model.r --label_in valLabel_sel.tsv --feat_in valFeat_sel_norm.tsv --origin_feat valFeat_sel.tsv --metadata_in valMetaData_sel.tsv --mlr_models_list models.RData --plot interpretation.pdf --pred pred.tsv --col_scheme="BrBG" --heatmap_type="zscore" --consens_thres="0.5"
28
29
30
  only:
    - master
    - development
Toby Hodges's avatar
Toby Hodges committed
31
32
33
after_script:
  - rm -r *.tsv
  - echo "cleaned up"