Codota Logo
File$RelatedFile.getFileId
Code IndexAdd Codota to your IDE (free)

How to use
getFileId
method
in
org.opencb.opencga.core.models.File$RelatedFile

Best Java code snippets using org.opencb.opencga.core.models.File$RelatedFile.getFileId (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: opencb/opencga

for (File.RelatedFile relatedFile : file.getRelatedFiles()) {
  if (File.RelatedFile.Relation.PRODUCED_FROM.equals(relatedFile.getRelation())) {
    Query query = new Query(FileDBAdaptor.QueryParams.UID.key(), relatedFile.getFileId());
    file = get(studyStr, query, null, sessionId).first();
    break;
origin: opencb/opencga

private File getOriginalFromTransformed(String study, File file, String sessionId)
    throws URISyntaxException, CatalogException {
  // Look for the vcf file
  String vcfId = null;
  // Matchup variant files, if missing
  if (file.getRelatedFiles() == null || file.getRelatedFiles().isEmpty()) {
    catalogManager.getFileManager().matchUpVariantFiles(null, Collections.singletonList(file), sessionId);
  }
  for (File.RelatedFile relatedFile : file.getRelatedFiles()) {
    if (File.RelatedFile.Relation.PRODUCED_FROM.equals(relatedFile.getRelation())) {
      long fileUid = relatedFile.getFileId();
      // FIXME!!!
      vcfId = catalogManager.getFileManager().get(study,
          new Query(UID.key(), fileUid),
          new QueryOptions(QueryOptions.INCLUDE, ID.key()), sessionId).first().getId();
      break;
    }
  }
  if (vcfId == null) {
    logger.error("This code should never be executed. Every transformed avro file should come from a registered vcf file");
    throw new CatalogException("Internal error. No vcf file could be found for file " + file.getPath());
  }
  QueryResult<File> vcfQueryResult = fileManager.get(study, vcfId, FILE_GET_QUERY_OPTIONS, sessionId);
  if (vcfQueryResult.getNumResults() != 1) {
    logger.error("This code should never be executed. No vcf file could be found for vcf id " + vcfId);
    throw new CatalogException("Internal error. No vcf file could be found under id " + vcfId);
  }
  file = vcfQueryResult.first();
  return file;
}
origin: opencb/opencga

    .collect(Collectors.toList());
assertEquals(1, relatedFiles.size());
assertEquals(inputFile.getUid(), relatedFiles.get(0).getFileId());
origin: opencb/opencga

protected void checkEtlResults(String studyId, List<StoragePipelineResult> etlResults, String expectedStatus) throws CatalogException {
  for (StoragePipelineResult etlResult : etlResults) {
    File input = catalogManager.getFileManager().get(studyId, new Query(FileDBAdaptor.QueryParams.URI.key(),
        etlResult.getInput()), null, sessionId).first();
    String indexedFileId;
    if (input.getRelatedFiles().isEmpty()) {
      indexedFileId = input.getId();
    } else {
      long indexedFileUid = input.getRelatedFiles().get(0).getFileId();
      indexedFileId = catalogManager.getFileManager().get(studyId, new Query(FileDBAdaptor.QueryParams.UID.key(),
          indexedFileUid), new QueryOptions(), sessionId).first().getId();
    }
    assertEquals(expectedStatus, catalogManager.getFileManager().get(studyId, indexedFileId, null, sessionId).first().getIndex().getStatus().getName());
    System.out.println("etlResult = " + etlResult);
  }
}
origin: opencb/opencga

    .collect(Collectors.toList());
assertEquals(1, relatedFiles.size());
assertEquals(inputFile.getUid(), relatedFiles.get(0).getFileId());
org.opencb.opencga.core.modelsFile$RelatedFilegetFileId

Popular methods of File$RelatedFile

  • getRelation
  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • runOnUiThread (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • ImageIO (javax.imageio)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now