Created
June 7, 2016 09:45
-
-
Save viklund/f78b4432489bde1276d32289942a2835 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ awk '$4>50 && $3>90 && F[$1]++ < 1{print}' blast_result | |
$4 is column 4 i.e. length, larger than 50bp | |
$3 percent identity bigger than 90 | |
F[$1]++ < 1 is the tricky part. We count upwards for each query we find and as long as the number | |
is less than 1 it is true, since the ++ is after the F[$1] the value will be zero the first time | |
and 1 the second time and so on. | |
&& is just standard and |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment