up-down regulated using log2FC
1
0
Entering edit mode
3.3 years ago

Hello,

I used Data Wrangling in R to write commands to find the number of FC>1 and FC<-1. But R recognizes the column "log2FC" as null.


library(tidyverse)
library(lubridate)
library(stringr)
targets <- read.csv("FilteredGenes1.csv")

glimpse(targets)

targets <- tibble('log2FC '=targets$log2FC)
glimpse(targets)

summary (targets)
targets<- tibble('log2FC'=targets$ log2FC)


Upregulated <- subset(targets, targets$log2FC>1)


 Filtered-target <- subset(targets, targets$log2FC>1)

Error: Must subset rows with a valid subscript vector.
i Logical subscripts must match the size of the indexed input.
x Input has size 13796 but subscript `r` has size 0.
Run `rlang::last_error()` to see where the error occurred.
In addition: Warning message:
Unknown or uninitialised column: `log2FC`.
RNA-Seq • 1.1k views
ADD COMMENT
0
Entering edit mode
3.3 years ago
seidel 11k

You should show the output of: glimpse(targets), or head(targets), or simply typing targets, so we can see the structure and data types of your table. Your tibble() assignment has some oddities. Why are there spaces after the column specifier ($)? Is the output of targets$log2FC>1 a boolean vector of TRUE or FALSE? Can you access any other columns of your tibble in a predictable way?

ADD COMMENT
0
Entering edit mode

Problem solved. It was because of space after column. Thanks Seidel

P-value of less than 0.05. So I only selected the log2FC column

ADD REPLY

Login before adding your answer.

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