Sha256: fab46efe5dc18d190bf0cf07d80890dfc4aba927aa40bcf08b8fc01287ce1951

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

#!/usr/bin/env ruby

Signal.trap("PIPE", "EXIT")

require "matr"

require "set"
require "trollop"

opts = Trollop.options do
  banner <<-EOS

  Take a three-column matrix file and ensure that it is symmetric for input into R.

  *Note* -- I ALWAYS enforce symmetry of the output.

  Option details
  --------------

  --self-scores: I will add a self score of this value if one is not already specified.
  --ensure-self-scores: I will ensure all self scores equal the value set in --self-scores even if a self-score is present but set to something else.

  Things I do
  ------------------

    - Raise error if a source-target pair is specified twice with a different score
    - Raise error if source-target and target-source are both specified and they don't match.

  Options:
  EOS

  opt(:infile, "Input file", type: :string)

  opt(:missing_score, "Score for missing connections (unless they are already put in because of symmetry)", default: 0)

  # opt(:ensure_symmetry, "This flag will ensure that your output will be a symmetric matrix.", default: true)

  opt(:self_score, "Score for self connections", default: 100)
  opt(:ensure_self_scores, "This flag will ensure that self hit scores all match the value of --self-score option", default: true)

  opt(:output_style, "Output style [wide,long]", default: "wide")
end

Matr.main opts

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
matr-0.1.0 exe/matr