code: def read_sj_out_tab(filename):
      
      def int_to_intron_motif(n):
          if n == 0:
              return 'non-canonical'
          if n == 1:
              return 'GT/AG'
          if n == 2:
              return 'CT/AC'
          if n == 3:
              return 'GC/AG'
          if n == 4:
              return 'CT/GC'
          if n == 5:
              return 'AT/AC'
          if n == 6:
              return 'GT/AT'
  
      sj = pd.read_table(filename, header=None, names=COLUMN_NAMES,
                         low_memory=False)
      sj.intron_motif = sj.intron_motif.map(int_to_intron_motif)
      sj.annotated = sj.annotated.map(bool)
      sj.strand.astype('object')
      sj.strand = sj.strand.apply(lambda x: ['unk','+','-'][x])
      # See https://groups.google.com/d/msg/rna-star/B0Y4oH8ZSOY/NO4OJbbUU4cJ for
      # definition of strand in SJout files.
      sj = sj.sort_values(by=['chrom', 'start', 'end'])
      return sj
docs: Read an SJ.out.tab file as produced by the RNA-STAR aligner into a
      pandas Dataframe.
  
      Parameters
      ----------
      filename : str of filename or file handle
          Filename of the SJ.out.tab file you want to read in
  
      Returns
      -------
      sj : pandas.DataFrame
          Dataframe of splice junctions