Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • One density plots for multiple samples

    Hello everyone,

    Basically I have done normalization on my microarry 450k data using Lumi package followed by BMIQ beta mixture quantile normalization. It was easy to generate some plots when I was using the lumi library because I was basically following the manual but as I finished BMIQ I found it really hard to generate the plots because it's a different package and doesn't have a manual.

    My file consist of 57 columns, first column is probes ID and the rest of the columns are beta values for each sample in my data, and about 12000 rows.

    I'm fairly new to R and coding on general so after following some of the online source i could generate one plot for only one sample and it gets complicated and tedious to do the same thing over 50 times.

    Can any one please help me writing this code so I can overlay multiple densities in one plot?

    It would be much appreciated.

  • #2
    To draw into an existing canvas, you can use the following commands:
    lines(), points(), polygon(), box()

    Comment


    • #3
      Originally posted by TiborNagy View Post
      To draw into an existing canvas, you can use the following commands:
      lines(), points(), polygon(), box()
      I need more explanation please. I also have another issue! the error I keep getting is that argument X is not a numeric, so I used "as.numeric" function but it's not working properly. I followed some tutorials online but just failed to treat my data as numeric.

      Comment


      • #4
        First of all, check your input data:
        Code:
        str(data)
        This command will show you the class of every column. If you find any discrepancy, fix it.
        Drawing more than one density:
        Code:
        plot(density(data$V1), xlim=c(min(data), max(data)), ylim=c(0,1))
        lines(density(data$V2))
        lines(density(data$V3))
        Or you can use sm.density.compare.

        Comment

        Latest Articles

        Collapse

        • seqadmin
          Latest Developments in Precision Medicine
          by seqadmin



          Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

          Somatic Genomics
          “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
          Today, 01:16 PM
        • seqadmin
          Recent Advances in Sequencing Analysis Tools
          by seqadmin


          The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
          05-06-2024, 07:48 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, Today, 07:15 AM
        0 responses
        10 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, Yesterday, 10:28 AM
        0 responses
        15 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, Yesterday, 07:35 AM
        0 responses
        16 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 05-22-2024, 02:06 PM
        0 responses
        8 views
        0 likes
        Last Post seqadmin  
        Working...
        X