Question: select of genes
0
gravatar for mlemusfuentes
5 weeks ago by
mlemusfuentes10 wrote:

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 • 145 views
ADD COMMENTlink modified 10 days ago by Biostar ♦♦ 20 • written 5 weeks ago by mlemusfuentes10

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 REPLYlink written 5 weeks ago by WouterDeCoster40k

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 REPLYlink modified 4 weeks ago by WouterDeCoster40k • written 4 weeks ago by mlemusfuentes10
1
gravatar for WouterDeCoster
4 weeks ago by
Belgium
WouterDeCoster40k wrote:

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 COMMENTlink written 4 weeks ago by WouterDeCoster40k

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 REPLYlink written 4 weeks ago by mlemusfuentes10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1605 users visited in the last hour