title: AttributeError: Python
body: <p>Hey I am using python script to create ".json" file and getting following error</p>
  
  <pre><code>Traceback (most recent call last):
    File "ngs_rawdata_config_creator.py", line 104, in &lt;module&gt;
      per_lib = parse_per_lib(pd.read_csv(args.per_lib_input, dtype=str))
    File "ngs_rawdata_config_creator.py", line 32, in parse_per_lib
      per_lib_dict['lib_paths'] = assign_libpaths(lib_basepaths)
    File "ngs_rawdata_config_creator.py", line 53, in assign_libpaths
      libpaths_dict[lib] = basepath_to_filepathsdict(path, "*.fastq.gz", ".*_L(\d+)_R(\d+).*\.fastq\.gz")
    File "ngs_rawdata_config_creator.py", line 73, in basepath_to_filepathsdict
      if rmatch.group(0) == basename:
  AttributeError: 'NoneType' object has no attribute 'group
  </code></pre>
  
  <p>'</p>
  
  <p>this is the part of the code</p>
  
  <pre><code>for fq in all_fastqs:
          basename = os.path.basename(fq)
          rmatch = re.match(capture_regex, basename)
          if rmatch.group(0) == basename:
              lane = rmatch.group(1)
              read = rmatch.group(2)
              readgroups[lane][read] = fq
  </code></pre>