bash/awk code to comapre tables
2
0
Entering edit mode
23 months ago
Sam ▴ 150

Dear Biostars

I want to compare two tables, if the data of 1st table is matched with 5th column of table2 then that line print in output.

any help?

table 1

ESR1
SLC45A3
MAP3K8

table 2

ID  Species(miRNA)  Species(Target) miRNA   Target  Reporter assay  Western blot    qPCR    Microarray  NGS pSILAC  Other   CLIP-Seq    Sum Number of paper
MIRT000480  hsa hsa hsa-miR-193b-3p CCND1   1   1   1   1   1   0   1   0   6   5
MIRT000493  hsa hsa hsa-miR-138-5p  ARHGEF3 1   1   1   0   0   0   1   0   4   1
MIRT000494  hsa hsa hsa-miR-138-5p  ROCK2   1   1   1   0   0   0   1   0   4   1
MIRT000495  hsa hsa hsa-miR-138-5p  RHOC    1   1   1   0   1   0   1   1   6   5
MIRT000701  hsa hsa hsa-miR-193b-3p ESR1    1   0   0   1   0   0   1   0   3   1

output

MIRT000701  hsa hsa hsa-miR-193b-3p ESR1    1   0   0   1   0   0   1   0   3   1
bash awk • 766 views
ADD COMMENT
2
Entering edit mode
23 months ago

try csvtk grep:

csvtk grep -t -f 5 -P genes.txt  table.sv -o result.tsv
ADD COMMENT
1
Entering edit mode
23 months ago
5heikki 11k
man join
ADD COMMENT

Login before adding your answer.

Traffic: 2604 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6