I have a file like this:
sample chr start end ref alt gene effect
AADA-01 chr1 12336579 12336579 C T VPS13D Silent
AADA-02 chr1 20009838 20009838 - CCA TMCO4 Missense
AADA-03 chr1 76397825 76397825 GTCA T ASB17 Missense
AADA-03 chr1 94548954 94548954 C A ABCA4 Missense
AADA-04 chr1 176762782 176762782 TCG C PAPPA2 Missense
AADA-04 chr1 183942764 183942764 - T COLGAL Missense
AADA-05 chr1 186076063 186076063 A TGC HMCN1 Silent
AADA-05 chr1 186076063 186076063 A T HM1 Silent
I need all the lines where the 5th and 6th columns contain only one character.
And the result should look like:
sample chr start end ref alt gene effect
AADA-01 chr1 12336579 12336579 C T VPS13D Silent
AADA-03 chr1 94548954 94548954 C A ABCA4 Missense
AADA-05 chr1 186076063 186076063 A T HM1 Silent
I tried using this.
awk -F'\t' '$5' filename | awk -F'\t' '$6' filename | wc -l
I know this is wrong but can anyone correct my mistake please.
awk
syntax:awk 'OFS="\t" {print $5,$6}' dataframe_file
, but you haven't provided enough information about how you want to filter based on these fields.T
and the alt is-
, for example? BothT
and-
are single characters, should that line be printed?