Download cas9/scripts/pcomole.sh from ChatterjeeLab/pCoMole: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/ChatterjeeLab/pCoMole/resolve/main/cas9/scripts/pcomole.sh
- Command line
-
hf download hf://ChatterjeeLab/pCoMole/cas9/scripts/pcomole.sh
-
curl -L -o pcomole.sh https://huggingface.co/ChatterjeeLab/pCoMole/resolve/main/cas9/scripts/pcomole.sh
1.23 kB
| # Official Cas9 pCoMole editor: cas9-likeness + deletion-count + PAM-matching, | |
| # under Cas9-score, PAM-matching and length constraints. | |
| set -euo pipefail | |
| ROOT="$(cd "$(dirname "$0")/../.." && pwd)" | |
| cd "$ROOT" | |
| ORTHOLOG="${ORTHOLOG:-cjcas9}" | |
| INPUT_SEQUENCE="$(awk -v n=">$ORTHOLOG" ' | |
| $1==n {f=1; next} /^>/{f=0} f {printf "%s", $0}' cas9/data/orthologs.fasta)" | |
| if [ -z "$INPUT_SEQUENCE" ]; then | |
| echo "Ortholog '$ORTHOLOG' not found in cas9/data/orthologs.fasta" >&2; exit 1 | |
| fi | |
| python -u -m cas9.pcomole \ | |
| --pcomol_config "$ROOT/configs/config_cas9.yaml" \ | |
| --ckpt "$ROOT/cas9/ckpt/last.ckpt" \ | |
| --input "$INPUT_SEQUENCE" \ | |
| --cas9_objective --deletion_count_obj --pam_distr_objective \ | |
| --objective_weights 1 1 1 \ | |
| --target_pam matching \ | |
| --num_steps 5 \ | |
| --num_rollouts 5 \ | |
| --num_candidates 10 \ | |
| --num_sequences 50 \ | |
| --max_deletion_percentage 0.2 \ | |
| --deletion_rate_scale 2500 \ | |
| --pam_min_confidence 0.7 \ | |
| --pam_prediction_temperature 1 \ | |
| --pam_probability_threshold 0.0 \ | |
| --cas9_score_threshold 0.5 \ | |
| --max_target_length 930 \ | |
| --min_target_length 890 \ | |
| --use_ce_loss --allow_equal_length --zero_lam_ins \ | |
| --output_file "$ROOT/outputs/cas9_${ORTHOLOG}_pcomole.csv" \ | |
| "$@" | |