Skip to content

Instantly share code, notes, and snippets.

@cldotdev
Created July 10, 2013 02:43
Show Gist options
  • Select an option

  • Save cldotdev/5963067 to your computer and use it in GitHub Desktop.

Select an option

Save cldotdev/5963067 to your computer and use it in GitHub Desktop.
Command for selecting the best hit in the blast results
# input.txt: blastlist format
# https://github.com/jlhg/bdorpy/blob/master/docs/format/blastlist.txt
awk -F'\t' '$1 ~ /^[0-9]/ { print $0 }' input.txt |sort -t$'\t' -k4d,4 -k18g,18 -k22gr,22 -k19gr,19 -k26gr,26 -k6gr |sort -t$'\t' -k4,4 -u >output.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment