[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ccp4bb]: Deleting by Chain ID
*** For details on how to be removed from this list visit the ***
*** CCP4 home page http://www.ccp4.ac.uk ***
I noticed a bug already. I forgot to extract the chain from $ID_R. May I
blame this on my email program?
The pickhelix.pl file should be as follows (between the dashed lines):
---------------------------
#! /usr/bin/perl -w
# pickhelix.pl perl script
$atomfile = "helixatom.o" ;
open (ATOM, $atomfile) or die "Could not open file \"$atomfile\"" ;
<ATOM> ;
# Might as well save all the symbols to allow program to grow in
# in functionality later if we desire
$ID_M = <ATOM> ;
$ID_R = <ATOM> ;
$ID_A = <ATOM> ;
close (ATOM) ;
($RecordID, $ChainRes) = split (/\s+/, $ID_R) ;
$Chain = substr ($ChainRes, 0, 1) ;
# hack in Jeff Taylor's awk one liner to save doing the same in perl
system ("cat structure.pdb | awk \'{ if (\$5!=\"$Chain\") print \$0}\'\
> $ChainRes_structure.pdb) ;
#
# All you need to do is change the name of structure.pdb to whatever
# your file is called
#
# end of pickhelix.pl perl script
---------------------------
James