public class VcfUtils extends Object
| Constructor and Description |
|---|
VcfUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkPreviouslyAnnotatedAndAddMetadata(File inputVcfFile,
PrintWriter outputVCFWriter,
List<AttributeMetaData> infoFields) |
static boolean |
checkPreviouslyAnnotatedAndAddMetadata(File inputVcfFile,
PrintWriter outputVCFWriter,
List<AttributeMetaData> infoFields,
List<String> attributesToInclude)
Checks for previous annotations
|
static String |
convertToVCF(Entity vcfEntity) |
static String |
convertToVCF(Entity vcfEntity,
List<String> attributesToInclude)
Convert an vcfEntity to a VCF line Only output attributes that are in the attributesToInclude list, or all if
attributesToInclude is empty
|
static String |
createId(Entity vcfEntity)
Creates a internal molgenis id from a vcf entity
|
static List<AttributeMetaData> |
getAtomicAttributesFromList(Iterable<AttributeMetaData> outputAttrs) |
static HashMap<String,Trio> |
getPedigree(File inputVcfFile)
Get pedigree data from VCF Now only support child, father, mother No fancy data structure either Output:
result.put(childID, Arrays.asList(new String[]{motherID, fatherID}));
|
public static final String TAB
public static String createId(Entity vcfEntity)
vcfEntity - public static String convertToVCF(Entity vcfEntity) throws MolgenisDataException
MolgenisDataExceptionpublic static String convertToVCF(Entity vcfEntity, List<String> attributesToInclude) throws MolgenisDataException
vcfEntity - attributesToInclude - ExceptionMolgenisDataExceptionpublic static boolean checkPreviouslyAnnotatedAndAddMetadata(File inputVcfFile, PrintWriter outputVCFWriter, List<AttributeMetaData> infoFields) throws FileNotFoundException, MolgenisInvalidFormatException
public static boolean checkPreviouslyAnnotatedAndAddMetadata(File inputVcfFile, PrintWriter outputVCFWriter, List<AttributeMetaData> infoFields, List<String> attributesToInclude) throws MolgenisInvalidFormatException, FileNotFoundException
inputVcfFile - outputVCFWriter - infoFields - attributesToInclude - , the AttributeMetaData to write to the VCF file, if empty writes all attributesExceptionMolgenisInvalidFormatExceptionFileNotFoundExceptionpublic static List<AttributeMetaData> getAtomicAttributesFromList(Iterable<AttributeMetaData> outputAttrs)
public static HashMap<String,Trio> getPedigree(File inputVcfFile) throws FileNotFoundException
inputVcfFile - FileNotFoundExceptionCopyright © 2015. All Rights Reserved.