This is a test version of Biostars. For the public version, visit https://www.biostars.org.
#String operation#protein-protein interaction #R platform

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?

r assembly gene protein-protein interaction

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

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++.

1 answer

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.

Log in to answer this question.