Thanks, I has worked out.
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?
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.
Please do not use
#in the title (as hashtags) - it makes no sense and adds no value. Also, please use the formatting bar (especially thecodeoption) to present your post better. You can use backticks for inline code (`text` becomestext), 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.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++.Thanks, it is working