Skip to content

Commit

Permalink
ready to stage files
Browse files Browse the repository at this point in the history
  • Loading branch information
epaule committed May 8, 2024
1 parent 6869da4 commit f6ea5bc
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
6 changes: 2 additions & 4 deletions src/curation_tool.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/env crystal

require "option_parser"
require "./lib/curation_tool"

Expand All @@ -19,7 +17,7 @@ OptionParser.parse do |parser|
parser.on("-w", "--setup_working_dir", "create initial curation files and directory") { tol = true }
parser.on("-r", "--build_release", "create pretext and release files") { release = true }
parser.on("-q", "--copy_qc", "copy from DIR to curation for QC") { qc = true }
parser.on("-m", "--merged", "build files based on a merged map") {merged = true}
parser.on("-m", "--merged", "build files based on a merged map") { merged = true }
parser.on("-g", "--highres", "build a highres pretext") { highres = true }

parser.on("-h", "--help", "show this help") do
Expand All @@ -40,7 +38,7 @@ OptionParser.parse do |parser|
end
end

y = GritJiraIssue.new(issue,merged)
y = GritJiraIssue.new(issue, merged)

# puts y.json.to_pretty_json

Expand Down
2 changes: 1 addition & 1 deletion src/get_assc_stats.cr
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ puts ["tolID", "fasta file", "average gc", "average length", "average repeat", "
"false negatives", "average gc fn", "average len fn", "average repeat fn", "average stops dn"].join("\t")

ARGV.each { |jira_id|
y = StatIssue.new(jira_id)
y = StatIssue.new(jira_id, false)

Dir.glob("#{y.decon_dir}/*.contamination").each { |file|
contamination_ids = parse_decon_file(file)
Expand Down
4 changes: 3 additions & 1 deletion src/lib/curation_tool.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ module CurationTool
fasta_gz = y.decon_file.sub(/contamination.*/, "decontaminated.fa.gz")

if y.merged
fasta_gz = # largestdna.ref in the assembly/draft/treeval directory
# largest dna.ref in the assembly/draft/treeval directory
treeval_dir = y.decon_file.sub(/draft.*/, "/draft/treeval/")
fasta_gz = Dir["#{treeval_dir}/*/data/ref.fa"].sort_by { |file| File.info(file).size }[-1]
end

raise Exception.new("scaffolds.tpf in working #{wd} already exists") if File.exists?(wd + "/scaffolds.tpf")
Expand Down
11 changes: 3 additions & 8 deletions src/lib/grit_jira_issue.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/env crystal

require "http/client"
require "html"
require "json"
Expand All @@ -9,12 +7,12 @@ require "file_utils"
class GritJiraIssue
@@url = "jira.sanger.ac.uk"
@token : String?
property merged : Bool

def initialize(name : String, merged : Bool)
getter merged

def initialize(name : String, @merged : Bool = false)
@id = name
@token = self.get_token
@merged = merged
end

def json
Expand Down Expand Up @@ -60,14 +58,11 @@ class GritJiraIssue
# in the form of tol_id _ version
def sample_version
"#{self.tol_id}_#{self.release_version}"
<<<<<<< HEAD:src/lib/GritJiraIssue.cr
=======
end

# in the form of tol_id . version
def sample_dot_version
"#{self.tol_id}.#{self.release_version}"
>>>>>>> main:src/lib/grit_jira_issue.cr
end

# curation working directory
Expand Down
2 changes: 1 addition & 1 deletion src/submit_btk.cr
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ __HERE__
end
end

y = BTKIssue.new(issue)
y = BTKIssue.new(issue, false)
y.submit_to_lsf
2 changes: 1 addition & 1 deletion src/submit_fcs.cr
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ OptionParser.parse do |parser|
end

issues.each { |issue|
y = FCSIssue.new(issue)
y = FCSIssue.new(issue, false)
y.submit_to_lsf
}

0 comments on commit f6ea5bc

Please sign in to comment.