title: Groovy - 'no signature of method' error when calling method in main
body: <p>I'm new to Groovy and I'm trying to fill a hash map with strain names and corresponding N50 values of bacteria obtained from a JSON-file. First, I want to fill the hash with the strain names as keys.</p>
  
  <p>My method for doing so looks like this: </p>
  
  <pre><code>    def getStrains() {
  
              //create Slurper to get content from JSON file
              def slurper = new JsonSlurper()
              def inputFile = new File("-path to JSON file-")
              def inputJSON = slurper.parseText(inputFile.text)
  
              InputJSON.strains.each{
  
                  //get strain names from JSON file
                  def genus = it.genus
                  def species = it.species
                  def strain = it.strain
                  def folderName = "${genus}_${species}_${strain}"
  
                  //save folder name in hash
                  n50Values[folderName]
  
              }
      }
  </code></pre>
  
  <p>Now when I want to call my method in my main method (just to see if the strain names are correct) like this</p>
  
  <pre><code>    public static void main (String[] args){
          getStrains() 
      }
  </code></pre>
  
  <p>I get the following Error: </p>
  
  <pre><code>Exception in thread "main" groovy.lang.MissingMethodException: No signature of method: static scaffolds.ReadJSON.getStrains() is applicable for argument types: () values: []
  </code></pre>
  
  <p>I defined the hash in the beginning of my class.</p>
  
  <p>I feel like I'm missing something obvious here, but I don't know what the error message wants to tell me. I've looked through other people having the same error but they are all very subjective. Any help is appreciated, thanks in advance.</p>