cgdata.core
category-field
(category-field parse {:keys [name i]} in)
column-map-file
(column-map-file file args columns types)
columns-from-header
(columns-from-header patterns header fixed-columns)
detect-cgdata
(detect-cgdata file)
Detect cgdata files by presence of json metadata. If no type
is given, assume genomicMatrix
detect-tsv
(detect-tsv file)
Return ::tsv if the file is tsv, or nil
drop-hash
(drop-hash s)
Drop leading hash, e.g. in tsv header
drop-indexes
(drop-indexes indxs coll)
Drop elements from coll by index.
dup-indexes
(dup-indexes coll)
Find indexes of duplicate values in coll.
enforce-mutation-fields
(enforce-mutation-fields fields)
find-position-field
(find-position-field columns)
find-position-fields
(find-position-fields columns start-index)
Rewrite a list of column objects having a :header attribute,
collating chrom position columns into position fields, having
:chrom :chromStart :chromEnd and optional :strand. :chrom and
:strand are reused if necessary.
fix-json
(fix-json root)
Utility for rewriting references in cgdata metadata, so
they refer to file paths, not abstract identifiers.
gene-pred-file
(gene-pred-file file & args)
Return a map describing a genePred(Ext) file. This will read
any associated json.
genomic-segment-file
(genomic-segment-file file & args)
Return a map describing a cgData genomicSegment file. This will read
any associated json.
guess-column-type
(guess-column-type in i)
intern-coll
(intern-coll s)
Intern values of a collection, returning the original collection
as a list of indices, and a map from values to the indices. Invert
the map to perform lookups by index.
intern-csv-coll
(intern-csv-coll s)
Intern values of a collection of csv, returning the original collection
as a list of arrays of indices, and a map from indices to values.
map-file
(map-file file {docroot :docroot, :or {docroot fs/unix-root}} data-fn)
map-invert
(map-invert m)
Invert the keys/values of a map
matrix-data-parse
(matrix-data-parse metadata features lines parse)
matrix-file
(matrix-file file & {docroot :docroot, :or {docroot fs/unix-root}})
Return a map describing a cgData matrix file. This will read
any assoicated json or clinicalFeature file.
mutation-file
(mutation-file file & args)
Return a map describing a cgData mutation file. This will read
any associated json.
mutation-required-columns
normalize-chrom
(normalize-chrom s)
normalize-column-name
(normalize-column-name patterns col fixed)
probemap-file
(probemap-file file & args)
Return a map describing a cgData probemap file. This will read
any associated json.
references
(references docroot referrer md)
Return map of any references in md to their paths relative to the document root.