Extracting selected gene interaction from an interanction file
1
0
Entering edit mode
6.7 years ago

I have a text file "Interaction" with gene gene interactions in this format

a1cf    apobec1
a1cf    ep300
a2m     actb
a2m     ambp
a2m     apoa1
a2m     app
a2m     bmp1
a2m     cdc42
a2m     f2
a2m     ep300

The first column is the source and the second column is the target. Now I have another text file "SelectedGenes" with some selected genes, in it, in this form

a2m
ep300 
apao1
alcf

I want to find the interaction of the genes present in the SelectedGenes file in the Interaction file in a way that interactions should have genes from SelectedGenes file in both the columns. The result should be

a2m     ep300
a2m     apoa1
a1cf    ep300
RNA-Seq gene R • 1.1k views
ADD COMMENT
2
Entering edit mode

This is a programming question. You put the R tag there so I assume you want a solution in R so go and learn about subsetting data frames in R.

ADD REPLY
0
Entering edit mode
6.7 years ago

Among other things:

help("%in%")
ADD COMMENT

Login before adding your answer.

Traffic: 1478 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