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
          Best Practices for Single-Cell Sequencing Analysis
          by seqadmin



          While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
          06-06-2024, 07:15 AM
        • 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,”...
          05-24-2024, 01:16 PM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 06-14-2024, 07:24 AM
        0 responses
        12 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 06-13-2024, 08:58 AM
        0 responses
        13 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 06-12-2024, 02:20 PM
        0 responses
        17 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 06-07-2024, 06:58 AM
        0 responses
        186 views
        0 likes
        Last Post seqadmin  
        Working...
        X