Peter Pettigrew is an anti-trans allegory.
Peter's character is made up of two allegories for transitioning: 1. changing sides in the First Wizarding War, and 2. living as a rat instead of a person
Changing sides in the war is a metaphor for transitioning because he fundamentally changed who he was from his original identity to the exact opposite, but kept his new identity a secret even from his friends specifically in order to fool and harm them. This is just like how JKR believes trans women try to fool and harm cis women with their identities.
Peter's initial betrayal/transition ended in the ultimate effect of giving a man (Voldemort) access to a cis woman's (Lily's) private room (sound familiar?) which was framed as the ultimate evil by JKR. Here, Voldemort plays the role of JKR's trans woman when he forces his way into a cis woman's private space (Lily's bedroom) specifically to harm a cis woman (Lily) and a child (Harry). This scene ends with the cis woman brutally murdering the trans woman, which the narrative frames as very positive and the readers are supposed to agree with.
Notice how Peter then eventually also betrayed Voldemort, which is an allegory for detransitioning. JKR believes trans people's "true selves" are their original selves/assigned gender, and that everyone is always going to detransition. Peter ended up on the same side he started because JKR believes trans women are always still men deep down.
Peter living as a "Rat" is a metaphor for living as a "woman" after he transitioned. Notice how the narrative frames it as if Peter was never "truly" a rat, just a person pretending to be a rat (like how JKR believes trans women are not truly women just men pretending to be women).
Peter was never given the opportunity to tell the reader whether he was a rat or a human, the text decides for us that his "real" identity is always human no matter how long he lives as a rat and passes as a rat. The choice of a rat to represent a trans person shows how JKR believes trans people to be animals/inhuman. And also a rat represents sneakiness and dishonesty so that's obvious.
When Peter talks about being a rat in the Shrieking Shack in PoA, he is met with disgust and revulsion from Ron. We're supposed to read this as Ron being rightfully disgusted and distrusting of a person he just found out was trans.
Peter lived as a rat for 13 years (a notoriously evil number), concealing his "true" identity (which was seen negatively by the text because JKR is saying that Trans people's "true" identities are evil) in order to sleep in Ron's bed. This is meant to be read as a child molester allegory because JKR believes all trans women are child molesters.
Peter was barely taller than 13 year old Harry because he's not being a man properly (not a "Real man") according to JKR's bigoted and cisheterosexist worldviews. What other reason does JKR have for specifying how short Peter was?
He was also shown to be balding at a very young age as another reference to not being "man enough" for JKR.
Since wands are used as a phallic symbol in the series, we can further see Peter doesn't have a penis anymore because in GoF he uses Voldemort's wand rather than one of his own.
Peter cut off his own finger, which is an allegory for gender reassignment surgery/vaginoplasty. Peter not having a finger anymore is a metaphor for a trans woman not having a penis.
He later cuts off his own hand, just furthering and cementing the reference to bottom surgery.
Peter then gets a human-made bodypart in place of his "biological" hand, a silver hand made by Voldemort. This is just like how trans people will get human-made bodyparts installed after they get their other ones removed. Of course JKR makes it the evil villain (Voldemort) who plays the role of the evil doctor who provides gender-affirming care. JKR believes gender-affirming surgeries are evil. And notice how Peter was coerced by Voldemort into getting the surgery when he really didn't want to deep down, which is very telling.
As we know, Peter's silver hand (his vagina) eventually killed him. And he died by suicide, which feels in very bad taste given the symbolism JKR is working with here, but knowing her that was probably intentional.