Tabnine Logo
StudyEntry.getAttributes
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.opencb.biodata/biodata-models

@Deprecated
public String getAttribute(String key) {
  Map<String, String> attributes = getAttributes();
  return attributes == null ? null : attributes.get(key);
}
origin: org.opencb.biodata/biodata-models

@Deprecated
public void addAttribute(String key, String value) {
  getAttributes().put(key, value);
}
origin: org.opencb.biodata/biodata-models

@Deprecated
public boolean hasAttribute(String key) {
  return getAttributes().containsKey(key);
}
origin: org.opencb.biodata/biodata-formats

public static String getInfoColumn(StudyEntry file) {
  StringBuilder info = new StringBuilder();
  for (Map.Entry<String, String> entry : file.getAttributes().entrySet()) {
    String key = entry.getKey();
    if (!key.equalsIgnoreCase("QUAL") && !key.equalsIgnoreCase("FILTER")) {
      info.append(key);
      String value = entry.getValue();
      if (value.length() > 0) {
        info.append("=");
        info.append(value);
      }
      info.append(";");
    }
  }
  return info.toString().isEmpty() ? "." : info.toString();
}
origin: org.opencb.biodata/biodata-tools

@Override
protected void parseStats(Variant variant, StudyEntry study, int numAllele, String reference, String[] alternateAlleles, Map<String, String> info) {
  FileEntry fileEntry = study.getFiles().get(0);
  // EVS params are not rearranged when normalizing. Use original call
  if (fileEntry.getCall() != null && !fileEntry.getCall().isEmpty()) {
    String[] ori = fileEntry.getCall().split(":");
    numAllele = Integer.parseInt(ori[3]);
    alternateAlleles = ori[2].split(",");
    reference = ori[1];
  }
  VariantStats stats = new VariantStats();
  if (info.containsKey("MAF")) {
    String splitsMAF[] = info.get("MAF").split(",");
    if (splitsMAF.length == 3) {
      float maf = Float.parseFloat(splitsMAF[2]) / 100;
      stats.setMaf(maf);
    }
  }
  if (info.containsKey("GTS") && info.containsKey("GTC")) {
    String splitsGTC[] = info.get("GTC").split(",");
    addGenotypeWithGTS(study.getAttributes(), splitsGTC, reference, alternateAlleles, numAllele, stats);
  }
  study.setStats(StudyEntry.DEFAULT_COHORT, stats);
}
origin: org.opencb.biodata/biodata-formats

sb.append(generateInfo(file.getAttributes())).append("\t");
sb.append(Joiner.on(":").join(format)).append("\t");
sb.append(generateSampleInfo(elem, file, format));
origin: opencb/cellbase

private Variant getGenomicVariant(Variant variant) {
  if (variant.getAlternate().equals(".")) {  // reference positions are not variants
    return null;
  } else {
    String ref;
    // large deletion
    if (variant.getAlternate().equals("<DEL>")) {
      // .get("_") because studyId and fileId are empty strings when VariantSource is initialized at readInputFile
      int end = Integer.valueOf(variant.getSourceEntries().get("_").getAttributes().get("END"));
      ref = StringUtils.repeat("N", end - variant.getStart());
      return new Variant(variant.getChromosome(), variant.getStart(),
          ref, variant.getAlternate().equals("") ? "-" : variant.getAlternate());
      // TODO: structural variants are not yet properly handled. Implement and remove this patch asap
    } else if (variant.getAlternate().startsWith("<")
        || (variant.getAlternate().length() > 1 && variant.getReference().length() > 1)) {
      return null;
    } else {
      ref = variant.getReference().equals("") ? "-" : variant.getReference();
      return new Variant(variant.getChromosome(), variant.getStart(),
          ref, variant.getAlternate().equals("") ? "-" : variant.getAlternate());
    }
  }
}
origin: org.opencb.biodata/biodata-tools

  addGenotypeWithGTS(studyEntry.getAttributes(), values, reference, alternateAlleles, numAllele, cohortStats);
  break;
default:
origin: org.opencb.biodata/biodata-tools

Map<String, String> attr = study.getAttributes();
org.opencb.biodata.models.variantStudyEntrygetAttributes

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

  • Finding current android device location
  • getSystemService (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • CodeWhisperer alternatives
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