(check-variant validator variant)
Checks if the given variant data is in the format cljam expects, and throws an error if it doesn't conform to the format. Otherwise returns the input variant data. Also, if any validation warning is found, it will be reported to stderr.
Checks if the given variant data is in the format cljam expects, and throws an error if it doesn't conform to the format. Otherwise returns the input variant data. Also, if any validation warning is found, it will be reported to stderr.
(check-variants validator)
(check-variants validator variants)
Applies check-variant
to each element of the given sequence.
Returns a lazy sequence of the same elements of the input if there are no
invalid variant. The validation is evaluated lazily and throws an exception
at the first invalid variant.
Returns a transducer if variants
is not specified.
Applies `check-variant` to each element of the given sequence. Returns a lazy sequence of the same elements of the input if there are no invalid variant. The validation is evaluated lazily and throws an exception at the first invalid variant. Returns a transducer if `variants` is not specified.
(make-validator meta-info header)
(make-validator {:keys [contig info] format' :format filter' :filter}
header
{:keys [file-type ploidy] :or {file-type :vcf ploidy 2}})
Creates a vcf validator that is necessary for variant validation. Takes the following three arguments:
Creates a vcf validator that is necessary for variant validation. Takes the following three arguments: - meta-info: VCF's meta info - header: VCF's header columns (including mandatory columns) - options: Validation options The available validation options are: - :file-type Specify the file type (either of :vcf and :bcf). Defaults to :vcf. - :ploidy Specify the ploidy of sample genotypes
(validate-variant validator variant)
Checks if the given variant data is in the format cljam expects, and returns a validation result map pointing out the problematic portion of data that does not conform to the format. Otherwise returns nil. The validation result map looks like: {:errors {[:chr] ["..."] :warnings {[:pos] ["..."]} :variant { ... variant data ...}}}
Checks if the given variant data is in the format cljam expects, and returns a validation result map pointing out the problematic portion of data that does not conform to the format. Otherwise returns nil. The validation result map looks like: {:errors {[:chr] ["..."] :warnings {[:pos] ["..."]} :variant { ... variant data ...}}}
(validate-variants validator)
(validate-variants validator variants)
Applies validation-variant
to each element of the given sequence and collects
non-nil validation results into a lazy sequence.
Returns a transducer if variants
is not specified.
Applies `validation-variant` to each element of the given sequence and collects non-nil validation results into a lazy sequence. Returns a transducer if `variants` is not specified.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close