Separate table by diferent string patterns.
1
0
Entering edit mode
6.2 years ago

Hello community

I hope you can help me with this problem I have the following data frame obtained form StarkLab lines of enhancer construction reporters.

Lines <- data.frame(VTID = c("VT0006", "VT0007", "VT0112") , Chr = c("chr2L", "chr3R", "chr3L"), pattern = c("ubitquitous;4", "procephalic_ectoderm_AISN;4|posterior;3", "dorsal ectoderm anlage; 4|posterior_endoderm_AISN;2|posterior_endoderm_AISN;2" )

I want to obtain from the column "pattern" just the string that has the higher value after ";", i dont know how to do it given some strings are also divided by | some by two "|" other by 3 "|". If you have a best idea of how tu classify all the strings im open to suggestion. How would you solve it on R?

Thank you very much.

ChIP-Seq strings • 863 views
ADD COMMENT
0
Entering edit mode
6.2 years ago

Not sure about R, but pattern searching and matching is a common Unix pattern. Read up on grep and regular expressions.

ADD COMMENT

Login before adding your answer.

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