-
Notifications
You must be signed in to change notification settings - Fork 0
2. Prediction Pipeline
This guide demonstrates the standard RiSPICE workflow for scoring variants from a snp_list.tsv file. If you have not yet installed RiSPICE or downloaded the required models, please follow the Installation guide before proceeding.
RiSPICE accepts variants in a snp_list.tsv file as the input to the prediction pipeline. If your variants are stored in a VCF file, you may use the helper script below to convert them.
python -m scripts.snp.vcf_to_snp_list \
-i <INPUT_VCF> \
-o <OUTPUT_DIR> \
--nip_to_chromNote:
snp_list.tsvexpects thechromcolumn to contain numerical chromosome identifiers (1–12). If your VCF uses Nipponbare GenBank chromosome accessions (e.g.AP014960.1), use the--nip_to_chromflag to convert them automatically.
Alternatively, you may prepare your own snp_list.tsv containing the following columns:
chrom pos id ref alt
where chrom contains numerical chromosome identifiers.
The following commands demonstrate the standard RiSPICE prediction workflow.
Tip: Append
--helpto any RiSPICE script to view all available options and command-line arguments. For example:python -m scripts.predict.probs --help
Generate the reference and alternative DNA sequences for each variant.
python -m scripts.predict.generate_sequences \
-i <OUTPUT_DIR>/snp_list.tsv \
-o <OUTPUT_DIR> \
-f <REFERENCE_GENOME_FASTA> \
-l 1000Note: Ensure the
-lvalue matches the downloaded adapter (500,750, or1000).Reference genome: Use the GenBank FASTA for the Nipponbare reference genome (assembly
GCA_001433935.1) as<REFERENCE_GENOME_FASTA>. RiSPICE was developed using this reference assembly.
Predict the probability of each chromatin feature listed in features.csv for the reference and alternative sequences.
python -m scripts.predict.probs \
-m <BASE_MODEL_DIR> \
-l <ADAPTER_DIR> \
-i <OUTPUT_DIR>/sequences.tsv \
-o <OUTPUT_DIR> \
--automodel \
--cudaRemove the
--cudaflag if running on a CPU-only system.
Compute the Per-Feature Scores using the selected scoring mode (default: log_odds) and aggregate them into an Overall Score using the Euclidean norm.
python -m scripts.predict.compute_scores \
-i <OUTPUT_DIR> \
-m log_odds \
-f scoresSuppose your input VCF contains the following variant:
Chr4 19884685 . C A
First, convert the VCF into a snp_list.tsv (or prepare one manually):
chrom pos id ref alt
4 19884685 . C A
Then, run the RiSPICE prediction pipeline:
- Generate the reference and alternative sequences.
- Predict chromatin feature probabilities for both sequences.
- Compute the Per-Feature Scores and Overall Score.
The pipeline produces the following files:
output/
├── snp_list.tsv
├── sequences.tsv
├── ref.tsv
├── alt.tsv
└── scores.tsv
| File | Description |
|---|---|
snp_list.tsv |
Input variants used by the RiSPICE pipeline. |
sequences.tsv |
Generated reference and alternative DNA sequences for each variant. |
ref.tsv |
Predicted chromatin feature probabilities for the reference sequences. |
alt.tsv |
Predicted chromatin feature probabilities for the alternative sequences. |
scores.tsv |
Per-Feature Scores and Overall Scores used for variant prioritization. |