code: def report(data):
      
      work_dir = dd.get_work_dir(data[0][0])
      out_dir = op.join(work_dir, "report")
      safe_makedir(out_dir)
      summary_file = op.join(out_dir, "summary.csv")
      with file_transaction(summary_file) as out_tx:
          with open(out_tx, 'w') as out_handle:
              out_handle.write("sample_id,%s\n" % _guess_header(data[0][0]))
              for sample in data:
                  info = sample[0]
                  group = _guess_group(info)
                  files = info["seqbuster"] if "seqbuster" in info else "None"
                  out_handle.write(",".join([dd.get_sample_name(info),
                                             group]) + "\n")
      _modify_report(work_dir, out_dir)
      return summary_file
docs: Create a Rmd report for small RNAseq analysis