de.charite.compbio.jannovar.pedigree.PedFileContents Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jannovar-core Show documentation
Show all versions of jannovar-core Show documentation
jannovar-core is a library for the functional annotation of genomic variants
package de.charite.compbio.jannovar.pedigree;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import de.charite.compbio.jannovar.Immutable;
/**
* Represents the contents of a pedigree file.
*
* @author Manuel Holtgrewe
*/
@Immutable
public class PedFileContents {
/** headers for extra columns (column 7 and beyond) */
private final ImmutableList extraColumnHeaders;
/** the individuals in the PED file */
private final ImmutableList individuals;
/** mapping of name to PedPerson */
private final ImmutableMap nameToPerson; // TODO(holtgrew): Test this!
public PedFileContents(ImmutableList extraColumnHeaders, ImmutableList individuals) {
this.extraColumnHeaders = extraColumnHeaders;
this.individuals = individuals;
ImmutableMap.Builder builder = new ImmutableMap.Builder();
for (PedPerson p : individuals)
builder.put(p.getName(), p);
this.nameToPerson = builder.build();
}
/** @return headers for extra columns (column 7 and beyond) */
public ImmutableList getExtraColumnHeaders() {
return extraColumnHeaders;
}
/** @return the individuals in the PED file */
public ImmutableList getIndividuals() {
return individuals;
}
/** @return mapping of name to PedPerson */
public ImmutableMap getNameToPerson() {
return nameToPerson;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy