Hi there I have generated a counts table of samples I need to compare by differential expression analysis.
The layout of the counts table is as follows:
Gene_id | Sample_A_r1 | Sample_A_r2 | Sample_B_r1 | Sample_B_r2 | Sample_AB_r1 | Sample_AB_r2 |
---|---|---|---|---|---|---|
KLTH001 | 0 | 0 | 2 | 5 | 8 | 3 |
KLTH002 | 0 | 0 | 5 | 3 | 9 | 7 |
YL99812 | 6 | 4 | 0 | 0 | 12 | 14 |
YL99813 | 9 | 7 | 0 | 0 | 15 | 19 |
So here, for the differential expression analysis, I only want to compare for example the genes starting with "YL-". So in a new file I want the rows including the first row which is "Gene_id" and the sample names e.g. "Sample_A_r1" and then only the rows with genes starting with "YL-" in their names. This will allow me to only compare the changes between Sample_A alone versus when it was combined with Sample_B, or in the table Sample_AB.
If anyone can please give me an indication of how to do this in linux I would really appreciate it. I have seen other similar posts, involving grep
and awk
I am just not sure of exactly how to do this. I am still quite new to linux. Any help will be appreciated.
awk ' $1 YL* ' counts_table.tsv > edited_counts_table.tsv
$\endgroup$