[Tex/LaTex] cell colour overlaps cell borders

colortables

This is a question that seems to be asked quite often so I apologise for the repetition. I looked in the answers already given and tried out several of them, but none seems to be the solution to my problem. As you see the colour of the cells makes random cell borders disappear, but not all of them. And if you zoom in, some more borders appear, but then again not all of them. I am very new to LaTeX and don't know a lot about it, so I would really appreciate some help.

\documentclass{scrreprt}

\def\widesplit#1{%
\cleardoublepage
\def\row##1##2{##1}%
#1%
\clearpage
\def\row##1##2{##2}%
#1%
\clearpage
}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{longtable}
\usepackage{color}
\usepackage[table]{xcolor}

\begin{document}

\widesplit{
\begin{tabular}{|>{\bfseries}l|l|l|l|l|l|l|l|l|l|l|l|}
\hline
Gene
\row{ & \cellcolor{red!50} \textbf{10015-1-A1} & \cellcolor{red!50}
\textbf{10015-4-A1}  & \cellcolor{red!50} \textbf{10015-5-A1} & \cellcolor{cyan!50} \textbf{10015-6-K} & \cellcolor{cyan!50} \textbf{10015-7-K} }{& \cellcolor{cyan!50}\textbf{10015-8-K}& \cellcolor{cyan!50} \textbf{10015-9-K}& \cellcolor{red!50} \textbf{10015-10-A1} & \cellcolor{cyan!50} \textbf{10015-11-K} & \textbf{Score}}\\ \hline
CRCP
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 8/9}\\ \hline
GGN
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 9/9}\\ \hline
LRP3
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 9/9}\\ \hline
GAD2
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 8/9}\\ \hline
PRKCG
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 7/9}\\ \hline
IFT122
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het & 7/9}\\ \hline
SLC7A6OS
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het & 7/9}\\ \hline
KNTC1
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 8/9}\\ \hline
TMPRSS11F
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het & 7/9}\\ \hline
NAALAD2
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 8/9}\\ \hline
PION
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 8/9}\\ \hline
DDX18
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het & 6/9}\\ \hline
TMEM87B
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het & 6/9}\\ \hline
PRR14L
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het & 7/9}\\ \hline
RPAP3
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het & 6/9}\\ \hline
FRMD4A
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het & 7/9}\\ \hline
CARD6
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 7/9}\\ \hline
SLC38A4
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het & 6/9}\\ \hline
TIGIT
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het & 7/9}\\ \hline
CSMD2
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}hom&\cellcolor{red!15}het}{&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 6/9}\\ \hline
BMP8B
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 6/9}\\ \hline
ZNF643
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 7/9}\\ \hline
HIVEP3
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 7/9}\\ \hline
SZT2
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 7/9} \\ \hline
DYSF
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 7/9} \\ \hline
DIRC1
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom}{&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het & 7/9}\\ \hline
FGD5
\row{&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{red!15}het&\cellcolor{cyan!15}hom}{&\cellcolor{cyan!15}hom&\cellcolor{cyan!15}hom&\cellcolor{red!15}het&\cellcolor{cyan!15}hom & 8/9} \\ \hline
\end{tabular}%
}

\end{document}

enter image description here
enter image description here

Also and since I am already asking for help, the traditional \caption does not work here. I don't really mind it only appearing at the end of the table, but it won't happen.
Thanx a lot in advanced.

Best Answer

there isn't a problem with the rules really if you print or zoom in they are all there, some pdf viewers are better than others at showing them.

enter image description here

If it bothers you that they come and go in a viewer one option is not to use them they don't really add a lot to the understanding of the table really.

the only problem is the table is too wide

 Overfull \hbox (57.0684pt too wide) in paragraph at lines 81--81

All the width is from the heading, I don't know can you split 10015-A-A1 over two lines or show it in a smaller font or something.

In fact with a more compressed format you could probably get both halves of the table on to the same page as it just seems to be a binary list het/hom ?

for a caption you either need to wrap each tabular in a table environment so you can use

\caption{.,....}

Or use the capt-of package which lets you use captions outside table and figure` with the syntax

\captionof{table}{my caption goes here}