Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given a string s that consists of the digits '1' to '9' and two integers k and minLength.
A partition of s is called beautiful if:

s is partitioned into k non-intersecting substrings.
Each substring has a length of at least minLength.
Each substring starts with a prime digit and ends with a non-prime digit. Prime digits are '2', '3', '5', and '7', and the rest of the digits are non-prime.

Return the number of beautiful partitions of s. Since the answer may be very large, return it modulo 109 + 7.
A substring is a contiguous sequence of characters within a string.
 
Please complete the following python code precisely:
```python
class Solution:
    def beautifulPartitions(self, s: str, k: int, minLength: int) -> int:
```