lsand039 wrote:Can you please post where in the code I can specify a column for the gene name?
This can be done in two different ways.
The first is by changing the appropriate function in the Necessary Functions section near the top of the code.The steps for this are as follows:
- Go to the Necessary Functions section near the top of the code.
- In this section head to the comment that reads #5#Function for adjusting the gene names. Here you will see a function named gcnames.
- Inside the parentheses next to the word function there is a variable titled usecol. By default this variable is set to 1 meaning that it will use the first name in the list of names given for each gene.
- Change the default from 1 to any number you wish to use as the default for the gene names. If a particular gene does not have that many gene names the code will use the first gene name it reads for that particular gene.
This second method is the one that I recommend for specifying the gene name that you want to use. The steps are as follows:
- Scroll to the bottom of the code.
- Go to the comment that reads Adjusting the column names aka the gene names.
- Right under the comment you will find the function gcnames with ALZDAT in parentheses.
- Inside the parentheses and to the right of ALZDAT insert the following ,usecol =
- Now to the right of = place the number associated with the position of the gene name that you wish to use
Example: If for gene ID 12345670 I have several gene names they will usually be displayed as follows GeneName1///GeneName2///GeneName3. So if I want to use the second gene name which in this case is GeneName2 I will have to change the usecol value to 2 and so I will have gcnames(ALZDAT,usecol = 2). For the third gene name the idea is the same and so I will have gcnames(ALZDAT,usecol = 3).
I hope this solves your problem and gives you some more understanding of how the code works.