title: My venn diagrams dont intersect - what's missing/wrong with my code
body: <p>I have two lists of genes and i want to represent the overlap between the lists in a venn diagram. Could anybody suggest what I am missing in the code below? I'm using the VennDiagram package and the result i get is two non intersecting circles. I have also used Venny <a href="https://bioinfogp.cnb.csic.es/tools/venny/index2.0.2.html" rel="nofollow noreferrer">https://bioinfogp.cnb.csic.es/tools/venny/index2.0.2.html</a> to draw the venn and confirmed there is an overlap. </p>
  
  <pre><code>library(VennDiagram)
  
  #select the data
  dataset1 &lt;- data.frame(as.character(v7$HGNC_Symbol)) #567 genes
  dataset2 &lt;- data.frame(as.character(test$toupper.v13.HGNC_Symbol.)) #476 genes
  
  #rename the columns so I know the source
  names(dataset1)[1] &lt;- "Progenesis"
  names(dataset2)[1] &lt;- "BiomaRt"
  
  #sort the dataframes alphabetically 
  dataset1 &lt;- dataset1 %&gt;% arrange(Progenesis)
  dataset2 &lt;- dataset2 %&gt;% arrange(BiomaRt)
  
  #create a list of numbers and join it to dataframe1
  mylist &lt;- c(1:592)
  dataset1 &lt;- data.frame(mylist, dataset1)
  
  #create a list of numbers and join it to dataframe2
  mylist &lt;- c(1:494)
  dataset2 &lt;- data.frame(mylist, dataset2)
  
  #join the two dataframes
  v &lt;- plyr::join(dataset1, dataset2, type='full')
  
  #draw the Venn Diagram
  
  Dataset1 &lt;- as.vector(v$Progenesis)
  Dataset2 &lt;- as.vector(v$BiomaRt)
  Dataset2 &lt;- na.omit(Dataset2)
  
      #first 20 rows of each dataset 
      dput(Dataset1)
          c("AACS ", "AARS ", "ABCF1 ", "ACAD11 ", "ACIN1 ", "ACO1 ", "ACOX3 ", 
          "ACP1 ", "ACSL3 ", "ACY1A ", "ACYP1 ", "ADA ", "ADI1 ", "ADK ", 
          "ADSL ", "ADSS ", "AGPAT3 ", "AHSA2 ", "AK4 ", "AKAP1 ")
          dput(Dataset2)
          structure(c("AACS", "AARS", "AARS", "ABCF1", "ACAD11", "ACIN1", 
          "ACO1", "ACOX3", "ACSL3", "ACYP1", "ADA", "ADI1", "ADK", "ADSL", 
          "AGPAT3", "AHSA2", "AKAP1", "AKAP12", "AKR1A1", "AKR1A1"),
          na.action = structure(495:592, class = "omit"))
  
  venn.diagram(
    x = list(Dataset1, Dataset2),
    category.names = c("Set1" , "Set2"),
    filename = 'venn_diagram.png',
    output=TRUE
    )
  </code></pre>
  
  <p>All suggestions welcome.</p>
  
  <p>Thanks</p>
  
  <p><a href="https://i.stack.imgur.com/oZ5yi.png" rel="nofollow noreferrer">The result of my code is this</a></p>
  
  <p><a href="https://i.stack.imgur.com/v5XAZ.png" rel="nofollow noreferrer">What I want is here</a></p>