Question: #String operation#protein-protein interaction #R platform
0
gravatar for slg.manti
5 months ago by
slg.manti0
slg.manti0 wrote:

I want to create an excel file where there are three columns

proteinA  pp  protein B

I have acquired the word file as follow from biogrid:

"ETG18033   ETG19698    Nfkb1 Relb  NF-KB1|NF-kappaB|NF-kappaB1|p105|p50|p50/p105   shep    Two-hybrid  Ravasi T (2010) 20211142    10090   10090"

I want to process the file such that only proteins names are taken.

I am not so familiar on working with string. I wanted only protein which are Nfkb1 RelB i.e. the first two protein. How could I proceed with R platform?

ADD COMMENTlink modified 5 months ago by RamRS22k • written 5 months ago by slg.manti0
1

Looks like tab separated file, myData <- read.table("myfile.txt") should work fine, then subset relevant column. Avoid Word/Excel, use plain text editors like Notepad++.

ADD REPLYlink written 5 months ago by zx87547.8k

Thanks, it is working

ADD REPLYlink written 5 months ago by slg.manti0

Please do not use # in the title (as hashtags) - it makes no sense and adds no value. Also, please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.
code_formatting

ADD REPLYlink modified 5 months ago • written 5 months ago by RamRS22k
1
gravatar for RamRS
5 months ago by
RamRS22k
Houston, TX
RamRS22k wrote:

Do not use Word or Excel - create a tab separated file and view it with a plain text editor. Excel can wreak havoc on gene names, and Word adds unnecessary metadata to plain text content.

You should really read up on R tutorials for string processing, especially functions like strsplit, paste and gsub. I am choosing to not provide exact code as it will help your learning process to use these pointers get to your end goal yourself.

ADD COMMENTlink modified 5 months ago • written 5 months ago by RamRS22k

Thanks, I has worked out.

ADD REPLYlink written 5 months ago by slg.manti0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1128 users visited in the last hour