#!/usr/bin/perl # prot_unfold # Francis Peterson 12/14/02 # unalias 13C shifts in xeasy/dyana shift list (.prot file) # 13C spectral width (in ppm) of spectrum in which aliased # chemical shift values were generated is hardcoded below. # # syntax: noe_weeder sorted_upl_file noesy_peaklist > output_file # $file1 = $ARGV[0]; $file2 = $ARGV[1]; # Search sorted upl files for bad sequential NOEs open (FILE1, "$file1") || die "Couldn't open file: $!\n"; while () { @fld = split; #delimits by whitespace # print "$fld[0] $fld[1] $fld[2] $fld[3] $fld[4] $fld[5] $fld[6] $fld[7] $fld[8] $fld[9] \n"; # print "$fld[3] $fld[0] $fld[5] \n"; # Selects subset of NOE to evaluate for violations unless(($fld[5] eq "HN") || ($fld[4] eq "PRO" && ($fld[5] eq "HD2" || $fld[5] eq "HD3" || $fld[5] eq "QD"))){ $res_diff=$fld[3]-$fld[0]; # print "$res_diff \n"; # Finds violations and stores peak number in an array if(($res_diff > 0 ) && ($res_diff < 3 )){ print "$fld[0] $fld[1] $fld[2] $fld[3] $fld[4] $fld[5] $fld[6] $fld[7] $fld[8] $fld[9] \n"; # print " \n"; push @peak, $fld[8]; # print "@peak \n"; } } } close(FILE1);