Entering edit mode
5.1 years ago
felipead66
▴
120
I am trying to run WGCNA analysis for human expression data. Specifically I want to do the module annotation. How do I get an annotation .csv file (like the one in the tutorials) for human data?
Could you tell me the steps on how to do this?
Creating metadata for your data is one thing that you will have to do time and time again (i.e., a lot) in your career. It can technically be created within the coding environment itself, but is more commonly stored as an external TXT, CSV, TSV, or other file. In the worst case scenario, a collaborator will send you a 'crazy' Excel spreadsheet that has a wide range of colours, formulae, and is inconsistent (in its formatting).
In your specific case, your best option is to study the WGCNA-provided clinical trait metadata file, and then use that as a template. Here is a portion of the WGCNA-provided file (available through your link):
So, each row relates to a single sample. There will usually be an identifier that matches the sample names in your core / main data to this metadata, but it's not always that easy. NEVER expect that the rows in the metadata file will be ordered as per the columns in your main data.
There can be any number of traits / columns in this metadata file.
Surely you can work from here and create your own file. For other related issues, like reading a CSV file into R, the answer to those can be easily found via a search in your search engine of choice.
Yes, I understand the metadata column. What I need is (1) a file to start with i.e. a human annotation file and (2) which column(s) of this file is necessary for creating the metadata.
My expression file includes gene name as an identifier.
My apologies for it is not entirely clear what you need. You need sample (e.g. clinical traits) or gene annotation (e.g. gene biotype, position, chromosome, GO term, KEGG pathway, etc)?
Are you not referring to this part of the tutorial: https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/Consensus-RelateModsToTraits.pdf ?
No, I am referring to this turorial. My concern is how to make the GeneAnnotation.csv file for human data. Otherwise which human annotation file (a link) should I use.
I see... You can generate your own gene annotation via biomaRt. There are quite a few examples on the online forums.