public class CovariateInfo extends Object
| sample-id | Gender | Type | Kind-Of-Sample | Tissue |
| S1 | Male | Father | Germline | Blood |
| S2 | Female | Mother | Germline | Blood |
| S3 | Male | Patient | Somatic | Blood |
| S4 | Male | Patient | Germline | Skin |
| Constructor and Description |
|---|
CovariateInfo() |
| Modifier and Type | Method and Description |
|---|---|
void |
defineSample(String sampleId) |
it.unimi.dsi.fastutil.objects.ObjectSet<String> |
getCovariateKeys() |
String |
getCovariateValue(String sampleId,
String covariateKey)
Return the value associated to a sample for a given covariate.
|
boolean |
hasCovariateValue(String sampleId,
String covariateKey,
String value)
Returns true iff the sample has the specific value of the covariate.
|
static CovariateInfo |
parse(String covInfoFilename)
Parse a covariate information file.
|
it.unimi.dsi.fastutil.objects.ObjectArraySet<String> |
samplesContainCovariate(String key,
String value)
Retrieve the set of samples that satisfy the covariate relation key.contains(value).
|
it.unimi.dsi.fastutil.objects.ObjectArraySet<String> |
samplesWithExactCovariate(String key,
String value)
Retrieve the set of samples that satisfy the covariate relation key=value.
|
public void defineSample(String sampleId)
public it.unimi.dsi.fastutil.objects.ObjectArraySet<String> samplesWithExactCovariate(String key, String value)
key - Covariate/Key that sample must have to be returned.value - CovariateValue that sample must have to be returned.public it.unimi.dsi.fastutil.objects.ObjectArraySet<String> samplesContainCovariate(String key, String value)
| sample-id | Gender | Type | Kind-Of-Sample | Tissue | Parents | Offspring |
| S1 | Male | Father | Germline | Blood | N/A | S3|S4 |
| S2 | Female | Mother | Germline | Blood | N/A | S3|S4 |
| S3 | Male | Patient | Somatic | Blood | S1|S2 | N/A |
| S4 | Male | Patient | Germline | Skin | S1|S2 | N/A |
key - Covariate/Key that sample must have to be returned.value - CovariateValue that sample must include to be returned.public static CovariateInfo parse(String covInfoFilename) throws IOException
covInfoFilename - IOExceptionpublic String getCovariateValue(String sampleId, String covariateKey)
sampleId - sample of interest.covariateKey - Key of the covariate for which the value is sought.public boolean hasCovariateValue(String sampleId, String covariateKey, String value)
sampleId - covariateKey - value - public it.unimi.dsi.fastutil.objects.ObjectSet<String> getCovariateKeys()
Copyright © 2018 Campagne Laboratory. All rights reserved.