R scripts to predict preferences between two TFs using data from predict-tf-binding
- R (Included Dockerfile provides r-base, which is adequate)
- Python 2.7 for filtering NegCtrl (Included Dockerfile installs python 2.7)
This script is designed to extract binding probabilities out of BED files generated by Predict-TF-Binding.
./predict-tf-preference.R tf1 tf2 tf1.bed tf2.bed prefs.bed
Where:
tf1
is the name of the first transcription factor (e.g. E2f1)tf2
is the name of the second transcription factor (e.g. E2f4)tf1.bed
is a bed file containing prediction scores for the first TFtf2.bed
is a bed file containing prediction scores for the second TFprefs.bed
is the name of the output file you'd like to write.
This script is designed to remove preference scores favoring a TF where the binding prediction was below a NegCtrl threshold
./filter-preference-threshold.py --spaces tf1.bed tf2.bed prefs.bed tf1_threshold tf2_threshold
Where:
tf1.bed
is a bed file containing prediction scores for the first TFtf2.bed
is a bed file containing prediction scores for the second TFtf1_threshold
is the NegCtrl threshold value (float) for tf1tf2_threshold
is the NegCtrl threshold value (float) for tf2prefs.bed
is the preferences generated by predict-tf-preference.R
- tf1.bed and tf2.bed must be the same length
- Only certain combinations are valid. See predict-tf-preference.R for details.
- script assumes that the first 3 columns of tf1.bed and tf2.bed (chrom, start, stop) are identical, and only difference will be the predictions in the 4th column
- Output file is generated by reusing the first 3 columns of tf1.bed and replacing score column with the calculated preference.