Question: How to create matrix for larger data set?
gravatar for mathavanbioinfo
9 months ago by
mathavanbioinfo50 wrote:

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

rna-seq matrix • 177 views
ADD COMMENTlink modified 9 months ago by ATpoint36k • written 9 months ago by mathavanbioinfo50

This can be done in R.


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)
ADD REPLYlink modified 9 months ago • written 9 months ago by patelk26120
Please log in to add an answer.


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