if (!File.Format.VCF.equals(file.getFormat()) && !File.Format.GVCF.equals(file.getFormat())) { throw new CatalogException("The file " + file.getName() + " is not a VCF file."); if (!File.Format.BAM.equals(file.getFormat()) && !File.Format.SAM.equals(file.getFormat())) { throw new CatalogException("The file " + file.getName() + " is not a SAM/BAM file.");
if (format != File.Format.UNKNOWN && !format.equals(file.getFormat())) { modifyParams.put(FileDBAdaptor.QueryParams.FORMAT.key(), format); file.setFormat(format);
public QueryResult<Sample> loadSampleAnnotations(File pedFile, String variableSetId, String sessionId) throws CatalogException { if (!pedFile.getFormat().equals(File.Format.PED)) { throw new CatalogException(pedFile.getUid() + " is not a pedigree file");
fileSolrModel.setType(file.getType().name()); if (file.getFormat() != null) { fileSolrModel.setFormat(file.getFormat().name());
if (file.getStatus().getName().equals(File.FileStatus.READY) && file.getFormat().equals(File.Format.VCF)) { String indexStatus; if (file.getIndex() != null && file.getIndex().getStatus() != null && file.getIndex().getStatus().getName() != null) {
assert (fileSolrModel.getName().equals(file.getName())); assert (fileSolrModel.getType().equals(file.getType().name())); assert (fileSolrModel.getFormat().equals(file.getFormat().name())); assert (fileSolrModel.getBioformat().equals(file.getBioformat().name())); assert (fileSolrModel.getRelease() == file.getRelease());
private void checkAlignmentFormat(File file) throws CatalogException { if (!file.getFormat().equals(File.Format.BAM)) { throw new CatalogException("File " + file.getName() + " not supported. Expecting a BAM file."); } }