This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to create matrix for larger data set?

Dear All, I have an excel file containing two attributes genesA and genesB , the entity in the first attribute interacts with the second. attribute. the attribute size 10000 rows, I want to create a matrix contain the boolean values [0,1] genesA as rows and genesB as a column. please hit the link below

enter image description here enter image description here

matrix rna-seq

This can be done in R.

library(readxl)
library(dplyr)

df <- read_excel('data.xlsx') # reading in your data

df %>%
  gather(key = 'genesB', value, -c(genesA)) %>%
  filter(value > 0) %>%
  select(genesA, genesB) %>%
  rename(Protein.B = genesB)

0 answers

No answers yet.

Log in to answer this question.