Data processing with BioNERO
1
0
Entering edit mode
zxd95 • 0
@478f802a
Last seen 21 months ago
China

Hi, experts! In data loading and preprocessing with BioNERO, I use a .csv file or .txt file with gene names in rows and sample names in columns. From Step 2 to Step 5 (http://www.bioconductor.org/packages/release/bioc/vignettes/BioNERO/inst/doc/vignette_01_GCN_inference.html), only the numeric data are used to process, however, how can I find my gene name in Step 2 to Step 5? Thank you!

BioNERO Pviz • 997 views
ADD COMMENT
0
Entering edit mode
@fabricio_almeidasilva-14890
Last seen 8 months ago
Ghent, Belgium

Hi,

As you didn't include a reproducible example in your question, it is a bit hard to understand what you mean. By "only the numeric data are used to process", you mean a numeric matrix, right?

As far as I understood your question, you have a numeric matrix, but you can't find which genes correspond to which rows in the matrix, probably because you had to remove a column containing gene names. If that is your case, you can assign gene names to the row.names element of your matrix, so you can still see which genes correspond to which rows.

For example, suppose you have a data frame with gene names in the first column and expression values for each sample in all other columns. To create a numeric matrix with gene names in row.names, you would do:

# Simulate a data frame with gene names in the first column, and samples in subsequent columns
exp_df <- data.frame(Gene = paste0("Gene", 1:5), S1 = rnorm(5), S2 = rnorm(5), S3 = rnorm(5))

# Create a numeric matrix from the data frame by removing the first column
exp_matrix <- as.matrix(exp_df[, -1])

# Add genes names (first column of `exp_df` as row names of `exp_matrix`)
rownames(exp_matrix) <- exp_df$Gene

Does that answer your question?

Best,

Fabricio

ADD COMMENT
0
Entering edit mode

Good answer, Fabricio, Thank you very much!

ADD REPLY

Login before adding your answer.

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