File: checkchains.rb

package info (click to toggle)
genometools 1.6.6%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 50,576 kB
  • sloc: ansic: 271,876; ruby: 29,930; python: 5,106; sh: 3,083; makefile: 1,213; perl: 219; pascal: 159; haskell: 37; sed: 5
file content (46 lines) | stat: -rwxr-xr-x 1,181 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env ruby

def runchain2dimvschain2dim(args,matchfile)
  system "cat #{matchfile} | ../scripts/rf2of.rb > tmp.of"
  system "../bin/gt chain2dim " + args + " -m tmp.of > gtchain.out"
  system "chain2dim.x " + args + " tmp.of > vschain.out"
  system "cmp -s gtchain.out vschain.out"
end

params = ["-global",
	  "-silent -global",
	  "-local -wf 1.8",
	  "-local -wf 0.5",
	  "-local -maxgap 20",
	  "-local 2b",
	  "-local 55p -silent",
	  "-global gc",
	  "-global ov",
	  "-global gc -wf 1.5",
	  "-global ov -wf 1.8",
	  "-global -maxgap 10",
	  "-global gc -wf 1.5 -maxgap 10",
	  "-global ov -wf 1.8 -maxgap 10",
	  "-local",
	  "-local 2p",
	  "-local 20",
	  "-local 2p -wf 1.8",
	  "-local 2b -wf 1.8",
	  "-local 20 -wf 1.8",
	  "-local -wf 1.8 -maxgap 20",
	  "-local 2p -wf 1.8 -maxgap 10",
	  "-local 2b -wf 1.8 -maxgap 10",
	  "-local 20 -wf 1.8 -maxgap 10"]


resultdir="#{ENV['GTTESTDATA']}/repfind-result"

Dir.foreach("#{resultdir}") do |matchfile|
  if matchfile.match(/^\S+\.fna-\S+\.fna.result$/)
    params.each do |args|
      runchain2dimvschain2dim(args,"#{resultdir}/#{matchfile}")
    end
  end
end

system "rm -f tmp.of gtchain.out vschain.out"