select of genes
1
0
Entering edit mode
4.9 years ago

hello everyone

I'm working on an RNA-SEQ analysis and I want to select the genes that have a fold change between 1.25 and 0.75 from a data.frame, this it locates the genes in the rows and the statistics in the columns, so the data I want get are from the same column.

How can I do this?

thank you

RNA-Seq • 904 views
ADD COMMENT
0
Entering edit mode

It would be useful to show us how your dataframe looks like. But this looks like a standard R dataframe slicing question, so googling will give you some ideas.

ADD REPLY
0
Entering edit mode

dear, my data.frame looks like this, I have searched how to do the selection of the genes that have a range of Fold Chage, but when I observe the data.frame filtered they are not what I want.

I used this command

genes_select = my_dataframe%>%
select (Foldchage> 0.75 | Foldchage> 1.25)
head (genes_select)


id.         ctrl1 ctrl2 trt1 trt2  Foldchage  log2FC      pvalue               padj
gene1.    3     5     20   30     1.5             0.6           0.05                   0.3
gene2.    2     4     40   50.     2.               1.2          0.05x10^-7       0.04x10^-6
gene3     10   15    3    2.       0.4            -1.301      0.006                3.2x10^-3
gene NÂș  n      n1   n2  n3.     0.092        -3.449.     1.23x10^-10     4.5x10^-9
ADD REPLY
1
Entering edit mode
4.9 years ago

Since you said

a fold change between 1.25 and 0.75

I think your command should be

select (Foldchage> 0.75 | Foldchage < 1.25)

Does that help?

I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

ADD COMMENT
0
Entering edit mode

Thanks for the tips, I use the filter function and the range you suggested and I got what I needed. thanks again.

filter (Foldchage> 0.75 | Foldchage < 1.25)

ADD REPLY

Login before adding your answer.

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