Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9002891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:38:00+00:00 2026-06-16T00:38:00+00:00

let me quickly explain the problem. picture a dataset like this data<- data.frame(Amino.acid =

  • 0

let me quickly explain the problem. picture a dataset like this

data<- data.frame("Amino.acid" = c("TRPPS;PNSTED", "ERDDS", "PSRND", "SDEEN", "GSRTN"), 
                   "log2.ratio"=c(2.4,0,-1,-2,-1))

In real my list is much longer lets say 12000 rows. What i really wanna do is to get the frequency for a specific amino acid pattern, and then plot the density vs the log2ratio. So for example the Pattern R-X-X-S should be detected in the amino acid column AND sometimes the sequence is separated by a “;” and the pattern analysis should be done for both.

I can just think about something ugly like gsub and subset function for a lots of log2 ratios but there should be an elegant solution. (maybe with the density function??)

In the end I would like to get a plot for density (y) vs log2raito (x) for a specific pattern AND for all other but this specific amino acid sequence pattern.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:38:01+00:00Added an answer on June 16, 2026 at 12:38 am

    I have an aversion to naming dataframes “data” so instead named it “pdat”:

     barplot( table(pdat[ grep("R[A-Z]{2}S", pdat$Amino.acid), "log2.ratio"] ))
    

    That’s about as specific as I can get with that tiny dataset. The grepping pattern would not register with “AARP;SNORE”:

    > grep("R[A-Z]{2}S","AARP;SNORE")
    integer(0)
    

    This is the plot for the complementary rows (just as a minus sign):

    barplot( table(pdat[ -grep("R[A-Z]{2}S", pdat$Amino.acid), "log2.ratio"] ))
    

    It’s not a density, so reaching for hte density function will doom your efforts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, let me quickly explain why I brought this up despite similar
Let's say I have a sortable list like this: $(.song-list).sortable({ handle : '.pos_handle', axis
Let me quickly explain. I have an application to manage visitors. We have a
I have a problem with js menu code. first let me explain what I
Let me preface this problem with the following: I've only tested this using the
Let us say I have a table called animals that looks like this: 1
I'm trying to write a short function that will let me quickly read in
Let's have an example like below: package xliiv.sandbox; import android.app.Activity; import android.os.Bundle; import android.util.Log;
Let me explain best with an example. Say you have node class that can
Let me try to explain by example. Say website is hosted at example.com (NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.