congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
StudyEntry.setStudyId
Code IndexAdd Tabnine to your IDE (free)

How to use
setStudyId
method
in
org.opencb.biodata.models.variant.StudyEntry

Best Java code snippets using org.opencb.biodata.models.variant.StudyEntry.setStudyId (Showing top 7 results out of 315)

origin: opencb/opencga

  @Override
  public List<Variant> apply(List<Variant> batch) throws Exception {
    batch.forEach(variant -> variant.getStudies()
        .forEach((StudyEntry studyEntry) -> {
          studyEntry.setStudyId(studyIdStr);
          studyEntry.getFiles().forEach((FileEntry fileEntry) -> fileEntry.setFileId(fileIdStr));
        }));
    return batch;
  }
}
origin: opencb/opencga

private void addVariant(Variant variant) {
  String chromosome = variant.getChromosome();
  // Remap studyId and fileId
  StudyEntry studyEntry = variant.getStudies().get(0);
  studyEntry.setStudyId(studyId);
  studyEntry.getFiles().get(0).setFileId(fileId);
  long[] coveredSlicePositions = getCoveredSlicePositions(variant);
  for (long slicePos : coveredSlicePositions) {
    addVariant(variant, chromosome, slicePos);
  }
}
origin: opencb/opencga

  @Override
  public List<Document> apply(List<Variant> batch) {
    progressLogger.increment(batch.size(), () -> "up to position " + batch.get(batch.size() - 1));
    return batch.stream().map(variant -> {
      for (StudyEntry studyEntry : variant.getStudies()) {
        studyEntry.setStudyId(studiesIdRemap.getOrDefault(studyEntry.getStudyId(), studyEntry.getStudyId()));
        for (FileEntry file : studyEntry.getFiles()) {
          if (file.getFileId().isEmpty()) {
            file.setFileId("-1");
          } else if (fileIdRemap.containsKey(file.getFileId())) {
            file.setFileId(fileIdRemap.get(file.getFileId()));
          }
        }
        if (studyEntry.getSamplesData() == null) {
          studyEntry.setSamplesData(Collections.emptyList());
        }
      }
      return variant;
    }).map(variantConverter::convertToStorageType).collect(Collectors.toList());
  }
}
origin: org.opencb.biodata/biodata-tools

/**
 * @param n
 * @return studyEntryList
 */
public List<StudyEntry> getStudies(int n) {
  int studyID = 2;
  int fieldID = 3;
  List<StudyEntry> studyEntryList = new ArrayList<>();
  StudyEntry studyEntry = new StudyEntry();
  studyEntry.setStudyId(Integer.toString(studyID));
  studyEntry.setFileId(Integer.toString(fieldID));
  Map<String, String> attributes = genAttributes();
  studyEntry.setAttributes(attributes);
  studyEntry.setFormat(getFormat());
  List<List<String>> sampleList = new ArrayList<>(getFormat().size());
  for (int i = 0; i < n; i++) {
    sampleList.add(getRandomample());
  }
  studyEntry.setSamplesData(sampleList);
  studyEntryList.add(studyEntry);
  return studyEntryList;
}
origin: opencb/opencga

se.setStudyId(vse.getStudyId());
if (null != vse.getSamplesPosition()) {
  se.setSamplesPosition(new HashMap<>(vse.getSamplesPosition()));
origin: org.opencb.biodata/biodata-tools

normalizedEntry.setStudyId(entry.getStudyId());
normalizedEntry.setSamplesPosition(entry.getSamplesPosition());
normalizedEntry.setFormat(entry.getFormat());
origin: opencb/opencga

for (Variant variant : reader.read(999)) {
  StudyEntry studyEntry = variant.getStudies().get(0);
  studyEntry.setStudyId(STUDY_NAME);
  studyEntry.getFiles().get(0).setFileId(fileId);
  variant.setStudies(Collections.singletonList(studyEntry));
org.opencb.biodata.models.variantStudyEntrysetStudyId

Popular methods of StudyEntry

  • getSamplesData
  • getFiles
  • <init>
  • getSampleData
  • getFile
  • getStudyId
  • getOrderedSamplesName
  • getSamplesName
  • setFiles
  • setFormat
  • setSamplesData
  • setSamplesPosition
  • setSamplesData,
  • setSamplesPosition,
  • getFormat,
  • getFormatPositions,
  • getStats,
  • setStats,
  • addSampleData,
  • getSamplesPosition,
  • getSecondaryAlternates,
  • setSecondaryAlternates

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • compareTo (BigDecimal)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now