code: def _parse_novel(csv_file, sps="new"):
      
      read = 0
      seen = set()
      safe_makedir("novel")
      with open("novel/hairpin.fa", "w") as fa_handle, open("novel/miRNA.str", "w") as str_handle:
          with open(csv_file) as in_handle:
              for line in in_handle:
                  if line.startswith("mature miRBase miRNAs detected by miRDeep2"):
                      break
                  if line.startswith("novel miRNAs predicted"):
                      read = 1
                      line = next(in_handle)
                      continue
                  if read and line.strip():
                      cols = line.strip().split("\t")
                      name, start, score = cols[0], cols[16], cols[1]
                      if float(score) < 1:
                          continue
                      m5p, m3p, pre = cols[13], cols[14], cols[15].replace('u', 't').upper()
                      m5p_start = cols[15].find(m5p) + 1
                      m3p_start = cols[15].find(m3p) + 1
                      m5p_end = m5p_start + len(m5p) - 1
                      m3p_end = m3p_start + len(m3p) - 1
                      if m5p in seen:
                          continue
                      fa_handle.write(">{sps}-{name} {start}\n{pre}\n".format(**locals()))
                      str_handle.write(">{sps}-{name} ({score}) [{sps}-{name}-5p:{m5p_start}-{m5p_end}] [{sps}-{name}-3p:{m3p_start}-{m3p_end}]\n".format(**locals()))
                      seen.add(m5p)
      return op.abspath("novel")
docs: Create input of novel miRNAs from miRDeep2