Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize data merging and Statistics in R language

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

In this article, the editor introduces in detail "how to achieve data merging and statistics in R language". The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "how to achieve data merging and statistics in R language" can help you solve your doubts. Let's follow the editor's ideas slowly and deeply, together to learn new knowledge.

1. My data introduction:

I made a control and four treatment samples were taken for transcriptome analysis, each sample had 3 biological repeats, a total of 24 samples of gene expression data.

Stage1stage2stage3stage4

ControlDAF2DAF5DAF11DAF16

CaseGDAF2

GDAF5GDAF11GDAF16

The above is the input data. CK stands for DAF,T and represents GDAF. There are more than 24 samples, so change the line and change the name of the following analysis.

two。 The data processing I'm going to finish

1. To count the number of transcripts expressed in each sample, it is necessary to combine the gene expression of biological repetitive samples (take the average).

two。 Draw a histogram and give a histogram of gene expression in different ranges of each sample.

3. Draw the PCA distribution map between the samples, see the relationship between the samples, require different treatments to be distinguished by the shape of the phase diagram, different stage can be distinguished by different colors, and the same stage color is the same.

(4) draw Venn diagram to see the expression changes of different stage genes.

3. The following is a summary of code usage tips:

1. Pay attention to the use of factors. Order factors can specify the label order of histogram samples.

2.cowplot specifies the drawing theme, which can be directly used in the article publication theme, SCI theme

3.PCA diagram two legends merge, color and shape, easy to view groups and different periods

4. It is very convenient to use apply tapply to merge data and avoid using loops.

5 with the use of reshape2 package, melt converts wide data into long data to facilitate ggplot2 drawing.

Library (reshape2) local ({r 0.5], GDAF16=geneNames [meanFpkm$GDAF16 > 0.5]) data

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report