Example #1
0
function makeBadRamaKinNMR($infile, $outfile, $rama, $color = 'red')
{
    foreach ($rama as $res) {
        if ($res['eval'] == 'OUTLIER') {
            $worst[] = $res['resName'];
        }
    }
    $mc = resGroupsForPrekin(groupAdjacentRes($worst));
    $h = fopen($outfile, 'a');
    //changed to @subgroup, added @vectorlist, and changed color to red for rama outliers
    fwrite($h, "@subgroup {Rama outliers} \n@vectorlist {Rama outliers} color= red \n");
    fclose($h);
    foreach ($mc as $mcRange) {
        exec("prekin -append -nogroup -listmaster 'Rama Outliers' -scope {$mcRange} -show 'mc({$color})' {$infile} >> {$outfile}");
    }
}
Example #2
0
/**
* rota is the data from loadRotamer(),
* or null to have it generated on the fly.
*/
function makeBadRotamerKin($infile, $outfile, $rota = null, $color = 'gold', $cutoff = 1.0)
{
    if (!$rota) {
        $tmp = mpTempfile("tmp_rota_");
        runRotamer($infile, $tmp);
        $rota = loadRotamer($tmp);
        unlink($tmp);
    }
    foreach ($rota as $res) {
        //if($res['scorePct'] <= $cutoff)
        if ($res['eval'] == 'OUTLIER') {
            //top8000 update uses favored-allowed-outlier eval categories
            $worst[] = $res['resName'];
        }
    }
    $sc = resGroupsForPrekin(groupAdjacentRes($worst));
    $h = fopen($outfile, 'a');
    fwrite($h, "@subgroup {rotamer outliers} dominant\n");
    fclose($h);
    foreach ($sc as $chainID => $scRange) {
        if (!$_SESSION['useSEGID']) {
            $opt = "-quiet";
        } else {
            $opt = "-quiet -segid";
        }
        //echo("prekin $opt -append -nogroup -nosubgroup -listname 'chain $chainID' -listmaster 'rotamer outliers' -bval -scope $scRange -show 'sc($color)' $infile >> $outfile\n");
        /*if( ($chainID[0] == ' ' || $chainID[0] == '_') && $chainID[1] != '_')
          {
            exec("prekin $opt -append -nogroup -nosubgroup -listname 'chain $chainID[1]' -listmaster 'rotamer outliers' -bval -scope $scRange -show 'sc($color)' $infile >> $outfile");
          }
          else
          {
            exec("prekin $opt -append -nogroup -nosubgroup -listname 'chain $chainID' -listmaster 'rotamer outliers' -bval -scope $scRange -show 'sc($color)' $infile >> $outfile");
          }*/
        exec("prekin {$opt} -append -nogroup -nosubgroup -listname 'chain {$chainID}' -listmaster 'rotamer outliers' -bval -scope {$scRange} -show 'sc({$color})' {$infile} >> {$outfile}");
    }
}