>2LY4_1|Chain A|High mobility group protein B1|Homo sapiens (9606) GKGDPKKPRGKMSSYAFFVQTCREEHKKKHPDASVNFSEFSKKCSERWKTMSAKEKGKFEDMAKADKARYEREMKTYIPPKGE >2LY4_2|Chain B|Cellular tumor antigen p53|Homo sapiens (9606) MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEAPRMPEAAPPVAPAPAAPTPAAPAPAPSWPL
And the PDB format file can be downloaded here (1.7MB). The entire is to large to be pasted here.
What I want to do is to extract the subset of PDB format based on the subsequence in fasta above.
Chain A starting from 1st residue to 30th residue.
How can I do that in R or Python?