text: user4595: I have a data frame
  Response_TO_CHEMOTHERAPY    Gene    CCF
  Responders                  POLQ    1
  Responders                 CDKN2A   1
  Responders                  TP53    1
  Responders              CCDC102B    0.906729075
  Non-responders           CCDC102B   1
  Non-responders           CCDC102B   1
  Non-responders           CCDC102B   1
  Non-responders             TSHZ3    1
  Non-responders             PIK3CA   1
  Responders                 SLIT2    1
  Non-responders              SLIT2   1
  
  I have two groups of patients; Responders to chemotherapy and non-responders. For each group I have calculated cancer cell faction (CCF) for a fixed set of genes so that an individual gene has several reads in each group
  If CCF = 1 the gene clonal and if CCF < 1 gene is sub clonal, for a given gene for each group, I therefore would have the number of clonal and sub clonal for this gene, for example 2 clonal 7 sub clonal which would be 2/7 something like the below figure
  
  This is another potential example which reveals what is in my mind
  
  Which show the clonal frequency for each group
  I don't know how to use dput() but this is my complete data
  https://www.dropbox.com/s/ol7m4nlkuyuy85a/c1.txt?dl=0
  
  user8575: I've used some dummy data for simplicity. It's fairly easy to do this with ggplot, but you have to format your matrix-like data for ggplot input.
  eg :
  # make data
  set.seed(1)
  ngenes <- 20
  nsamps <- 10
  my_dat <- matrix(rnorm(ngenes*nsamps), ncol = nsamps, nrow = ngenes)
  colnames(my_dat) <- paste("samp", seq_len(nsamps))
  rownames(my_dat) <- paste("gene", seq_len(ngenes))
  
  library(ggplot2)
  library(reshape2) # for melt
  
  # format data for plotting
  dat_toplot <- melt(my_dat)
  
  #plot
  ggplot(dat_toplot, aes(x = Var1, y = Var2, fill = value)) + geom_tile()
  
  plots
  
  If you need specifics on plot tweaking, google's your friend. There are plenty of tutorials on how to use ggplot for heatmaps. (eg. here, or here)
  EDIT
  I loaded your data into the dat object.
  library(tidyverse)
  dat <- as_tibble(dat)
  
  dat_counts <- dat %>% group_by(Sample, Gene) %>% summarise(count_subclonal = sum(CCF<1), count_clonal = sum(CCF>=1))
  dat_counts$ratio <- dat_counts$count_subclonal/dat_counts$count_clonal
  
  # set infinite values (/0) to NA
  dat_counts$ratio[is.infinite(dat_counts$ratio)] <- NA
  
  
  ggplot(dat_counts, aes(x = Sample, y = Gene, fill = ratio)) + geom_tile() + 
    geom_text(aes(label = paste(count_subclonal, "/", count_clonal)), col = 'white') # add ratio text
  
  Outputs :
  
  
original_text: 4595: <p>I have a data frame</p>
  
  <pre><code>Response_TO_CHEMOTHERAPY    Gene    CCF
  Responders                  POLQ    1
  Responders                 CDKN2A   1
  Responders                  TP53    1
  Responders              CCDC102B    0.906729075
  Non-responders           CCDC102B   1
  Non-responders           CCDC102B   1
  Non-responders           CCDC102B   1
  Non-responders             TSHZ3    1
  Non-responders             PIK3CA   1
  Responders                 SLIT2    1
  Non-responders              SLIT2   1
  </code></pre>
  
  <p>I have <code>two groups of patients</code>; <code>Responders to chemotherapy and non-responders</code>. For each group I have calculated <code>cancer cell faction (CCF)</code> for a fixed set of genes so that an individual gene has several reads in each group</p>
  
  <p>If <code>CCF = 1</code> the gene clonal and if CCF &lt; 1 gene is sub clonal, for a given gene for each group, I therefore would have the number of clonal and sub clonal for this gene, for example 2 clonal 7 sub clonal which would be 2/7 something like the below figure</p>
  
  <p><a href="https://i.stack.imgur.com/6DzE8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6DzE8.png" alt="enter image description here"></a></p>
  
  <p>This is another potential example which reveals what is in my mind</p>
  
  <p><a href="https://i.stack.imgur.com/HeabT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HeabT.png" alt="enter image description here"></a></p>
  
  <p>Which show the clonal frequency for each group</p>
  
  <p>I don't know how to use <code>dput()</code> but this is my complete data</p>
  
  <p><a href="https://www.dropbox.com/s/ol7m4nlkuyuy85a/c1.txt?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/ol7m4nlkuyuy85a/c1.txt?dl=0</a></p>
   8575: <p>I've used some dummy data for simplicity. It's fairly easy to do this with ggplot, but you have to format your matrix-like data for ggplot input.</p>
  
  <p>eg :</p>
  
  <pre><code># make data
  set.seed(1)
  ngenes &lt;- 20
  nsamps &lt;- 10
  my_dat &lt;- matrix(rnorm(ngenes*nsamps), ncol = nsamps, nrow = ngenes)
  colnames(my_dat) &lt;- paste("samp", seq_len(nsamps))
  rownames(my_dat) &lt;- paste("gene", seq_len(ngenes))
  
  library(ggplot2)
  library(reshape2) # for melt
  
  # format data for plotting
  dat_toplot &lt;- melt(my_dat)
  
  #plot
  ggplot(dat_toplot, aes(x = Var1, y = Var2, fill = value)) + geom_tile()
  </code></pre>
  
  <p>plots</p>
  
  <p><a href="https://i.stack.imgur.com/uNLW0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uNLW0.png" alt="enter image description here"></a></p>
  
  <p>If you need specifics on plot tweaking, google's your friend. There are plenty of tutorials on how to use ggplot for heatmaps. (eg. <a href="https://learnr.wordpress.com/2010/01/26/ggplot2-quick-heatmap-plotting/" rel="nofollow noreferrer">here</a>, or <a href="https://jcoliver.github.io/learn-r/006-heatmaps.html" rel="nofollow noreferrer">here</a>)</p>
  
  <h1>EDIT</h1>
  
  <p>I loaded your data into the <code>dat</code> object.</p>
  
  <pre><code>library(tidyverse)
  dat &lt;- as_tibble(dat)
  
  dat_counts &lt;- dat %&gt;% group_by(Sample, Gene) %&gt;% summarise(count_subclonal = sum(CCF&lt;1), count_clonal = sum(CCF&gt;=1))
  dat_counts<span class="math-container">$ratio &lt;- dat_counts$</span>count_subclonal/dat_counts$count_clonal
  
  # set infinite values (/0) to NA
  dat_counts<span class="math-container">$ratio[is.infinite(dat_counts$</span>ratio)] &lt;- NA
  
  
  ggplot(dat_counts, aes(x = Sample, y = Gene, fill = ratio)) + geom_tile() + 
    geom_text(aes(label = paste(count_subclonal, "/", count_clonal)), col = 'white') # add ratio text
  </code></pre>
  
  <p>Outputs :</p>
  
  <p><a href="https://i.stack.imgur.com/fjKie.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fjKie.png" alt="enter image description here"></a></p>
  