Skip to content

Instantly share code, notes, and snippets.

@gatoravi
Created March 20, 2012 16:00
Show Gist options
  • Save gatoravi/c6d3f7f96b3892f55368 to your computer and use it in GitHub Desktop.
Save gatoravi/c6d3f7f96b3892f55368 to your computer and use it in GitHub Desktop.
The cutoff file contains the number of DeNovoGear calls for a particular posterior probability cutoff. Extract the same number of SamTools calls. If there is a tie in the last Likelihood Ratio value then pick all calls with that CLR value
#Avinash Ramu, WUSTL
#! /bin/bash
#The cutoff file contains the number of DeNovoGear calls for a particular posterior probability cutoff. Extract the same number of SamTools calls. If there is a tie in the last Likelihood Ratio value then pick all calls with that CLR value
cutoff_f=1e-8Cutoffs
STop=STop_nonX_sorted
for cutoff in `cat $cutoff_f`
do
echo $cutoff
awk -v cutoff=$cutoff 'BEGIN { count=0; pc=0;} {count++; if(count<=cutoff || pc==$3) {print; pc=$3}}' $STop > ${STop}_$cutoff
done
@gpcr
Copy link

gpcr commented May 2, 2016

is there a quick parser for filtering Denovogear outputs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment