Step 4.1 and 4.2: Training and testing in targeted (split reads, 1) and SV filtering (2) modes - GooglingTheCancerGenome/sv-channels GitHub Wiki
Training and testing are both performed by train_model_with_fit.py:
Inputs:
- outputpath: parent folder where the 'sample' folder is, for storing the output results
- training_sample: sample name (subfolder name) for the training set
- test_sample: sample name (subfolder name) for the test set
- logfile: name of the log file
- sv_caller: only in filtering mode, the svcaller name for loading the right window_pairs Numpy file
- mode: training or test, not used at the moment. It can be used to run only the training or only the testing
- load_npz: True for loading the training set and test set as Numpy NPZ files; False for using the training set and test set in carray format (much slower)
Output:
A folder named train_'training_sample'_test_'test_sample' with:
- a 'confusion_matrix' folder with the confusion matrix in CSV format (columns are predicted, rows are true)
- a 'plots' folder with the precision-recall plot
- a 'models' folder with the model in HDF5 format
- a 'predictions' folder with:
- a BEDPE file named 'results_DEL_predicted_2.bedpe' with the predicted SVs (predicted label == true label), including the SV score (different of the posterior probabilities Pr(DEL|X) - Pr(noDEL|X)
- a BEDPE file named 'results_wrong_predictions_2.bedpe' with the wrongly predicted SVs (predicted label != true label)
Example:
For cross-validation:
python train_model_with_fit.py
--test_sample NA12878
--training_sample NA12878
--outputpath "/hpc/cog_bioinf/ridder/users/lsantuari/Processed/DeepSV/channel_data/"
--logfile model_training.log