Entering edit mode
6.5 years ago
f20130821
•
0
I am trying to use a perl script to extract enyamatic and non-enzymatic cysteines from CSA database. As I am not familiar with the programming languages I need help with understanding the perl script. Anyone's help would be apperciated.
#!/usr/bin/env perl
open $out_fh, ">", "cat-cys-sh-enz-unk.txt"; #output file
print "enter the name of file that contains the pdb id's\n";
$pdb_name=<STDIN>;
chomp $pdb_name;
open(FH,$pdb_name);
while (my $pdb_name = <FH>)
{
chomp $pdb_name;
push @indices, $pdb_name;
}
open my $fh, '<', 'CSA-database.txt'; #catalytic site atlas database
while (<$fh>) {
($f1,$f2,$f3,$f4)=split ' ', $_;
print "$f1\n";
foreach (@indices)
{
if( $f1 eq $_)
{
if ($f2 eq 'CYS')
{ print $out_fh "$f1\t$f2\t$f3\t$f4\n";
}
}
}
}
That question is a bit open-ended. If you don't know perl then it may be hard for someone to explain (and for you to understand the technical explanation of) what this script is doing. Are you more interested in how to use this script? Can you post the link of where you got the script from?