Entering edit mode
9.0 years ago
M K
▴
660
Dear All,
I created a contingency table between gene names and repeats count in each gene as shown below:
"(CA)n" "(TG)n" "AT_rich" "B1_Mm" "B1_Mur1" "B1_Mur2"
"0610005C13Rik" 0 0 1 0 0 0
"0610007N19Rik" 0 0 0 0 0 0
"0610007P14Rik" 0 0 1 0 1 0
"0610008F07Rik" 0 0 0 0 0 0
"0610009B14Rik" 0 1 0 0 1 0
Now I need to merge this file with another file (data frame) using the gene name as a reference in both files.In the other file which is as data frame I have the gene name in the first column but in the file above which is a contingency table, I couldn't use the gene name because it doesn't appear as a separate column. so how can I convert this contingency table to normal count table with gene names in the first column and repeats counts in the other columns.
Thanks for helping me, but there is one problem which is in the R code above the gene name will treated as a character while in my other file it is treated as a factor, so is there any way to convert it to be a factor.