class GritJiraIssue
- GritJiraIssue
- Reference
- Object
Overview
Represents a GRIT JIRA curation issue and provides access to all specimen metadata needed by the curation workflow tools.
Authentication uses a Bearer token read from ~/.netrc (entry for
jira.sanger.ac.uk). Per-specimen metadata is loaded from a YAML file
whose path is stored in JIRA custom field customfield_13408. If the
file is not accessible locally it is fetched via scp from tol22, and
as a last resort downloaded as a JIRA attachment.
The #merged flag indicates that both haplotypes should be treated as a
single merged assembly (hap1/hap2 or maternal/paternal dual-output mode).
Direct Known Subclasses
Defined in:
lib/grit_jira_issue.crConstructors
-
.new(name : String, merged : Bool = false)
Creates a new issue handle for name (e.g.
Instance Method Summary
-
#curated_dir : String
Returns the target directory for curated output files.
-
#curation_pretext(fasta, output, no_email = false) : String
Builds and returns the shell command string to invoke the
curationpretext.shNextflow pipeline for fasta (must exist), writing output to output. -
#decon_file : String
Returns the decontamination file path from JIRA custom field
customfield_11677. -
#get_json : JSON::Any
Fetches the JIRA issue JSON via the REST API (
/rest/api/2/issue/<id>). -
#get_token : String
Reads the Bearer token for
jira.sanger.ac.ukfrom~/.netrc. -
#get_yaml : YAML::Any
Loads and parses the per-specimen YAML.
-
#geval_db : String
Returns the geval database name from JIRA custom field
customfield_11643, or an empty string if not set. -
#hic_read_dir : Array(YAML::Any) | Array(String)
Returns the Hi-C read directory (or directories) as an array of strings.
-
#json : JSON::Any
Returns the parsed JIRA issue JSON, fetching it on first access.
- #merged : Bool
-
#ont_read_dir : String | Nil
Returns the ONT read directory, or
nilif not present in the YAML. -
#pacbio_read_dir : String | Nil
Returns the PacBio read directory, or
nilif not present in the YAML. -
#pretext_dir : String
Returns the curated pretext map directory for this specimen under
/nfs/treeoflife-01/teams/grit/data/curated_pretext_maps. -
#projects : Array(YAML::Any)
Returns the list of project names associated with this specimen (e.g.
-
#release_version : Int32
Returns the integer release version from JIRA custom field
customfield_11609. -
#sample_dot_version : String
Returns the specimen identifier in dot form:
<tol_id>.<release_version>. -
#sample_version : String
Returns the specimen identifier in underscore form:
<tol_id>_<release_version>. -
#scientific_name : String
Returns the scientific name of the specimen from the YAML
specieskey. -
#taxonomy : String
Looks up the NCBI taxonomy ID for this specimen via the EBI taxonomy REST API.
-
#telomer : String
Returns the telomere sequence from JIRA custom field
customfield_11650, or an empty string if not set. -
#tol_id : String
Returns the ToL specimen ID (e.g.
-
#working_dir : String
Returns the curation working directory on the HPC.
-
#yaml : YAML::Any
Returns the parsed per-specimen YAML, fetching it on first access.
Constructor Detail
Creates a new issue handle for name (e.g. "RC-1234").
Set merged to true for dual-haplotype assemblies.
Instance Method Detail
Returns the target directory for curated output files.
Derived from the decon file path; appended with .genomeark.<version>
for GenomeArk specimens, or .<version> otherwise.
Builds and returns the shell command string to invoke the curationpretext.sh
Nextflow pipeline for fasta (must exist), writing output to output.
Writes a YAML params file next to fasta and assembles the command with
the correct read files, Hi-C CRAMs, telomere sequence, and email flag.
Pass no_email: true to suppress the LSF completion notification.
Returns the decontamination file path from JIRA custom field customfield_11677.
May be a .bed file (contamination intervals) or a .fa.gz decontaminated FASTA.
Fetches the JIRA issue JSON via the REST API (/rest/api/2/issue/<id>).
Raises if the request fails.
Reads the Bearer token for jira.sanger.ac.uk from ~/.netrc.
Raises if no matching entry is found.
Loads and parses the per-specimen YAML.
Resolution order:
- Path stored in JIRA custom field
customfield_13408, read directly if it exists locally. - Same path fetched via
scpfromtol22into/tmp/. - YAML attachment downloaded directly from the JIRA issue.
Raises if no YAML can be obtained.
Returns the geval database name from JIRA custom field customfield_11643,
or an empty string if not set.
Returns the Hi-C read directory (or directories) as an array of strings. Handles both scalar and list values in the YAML.
Returns the ONT read directory, or nil if not present in the YAML.
Returns the PacBio read directory, or nil if not present in the YAML.
Returns the curated pretext map directory for this specimen under
/nfs/treeoflife-01/teams/grit/data/curated_pretext_maps.
For invertebrate/other prefixes (i, d, q, t, c) a two-level
subdirectory lookup is used. Raises if no matching directory is found.
Returns the list of project names associated with this specimen (e.g. ["DToL", "GenomeArk"]).
Returns the integer release version from JIRA custom field customfield_11609.
Returns the specimen identifier in dot form: <tol_id>.<release_version>.
Returns the specimen identifier in underscore form: <tol_id>_<release_version>.
Returns the scientific name of the specimen from the YAML species key.
Looks up the NCBI taxonomy ID for this specimen via the EBI taxonomy REST API. First tries an exact scientific-name lookup, then falls back to an any-name search. Returns the taxon ID as a string. Raises if no result is found.
Returns the telomere sequence from JIRA custom field customfield_11650,
or an empty string if not set.
Returns the curation working directory on the HPC.
Derived from #pacbio_read_dir or #ont_read_dir by replacing the
genomic_data/... suffix with working/<tol_id>_<user>_curation.