Codota Logo
VariantWriterFactory$VariantOutputFormat.valueOf
Code IndexAdd Codota to your IDE (free)

How to use
valueOf
method
in
org.opencb.opencga.storage.core.variant.io.VariantWriterFactory$VariantOutputFormat

Best Java code snippets using org.opencb.opencga.storage.core.variant.io.VariantWriterFactory$VariantOutputFormat.valueOf (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: opencb/opencga

/**
 * Transform the string to a valid output format.
 * If none, VCF by default.
 *
 * @param outputFormatStr   Output format as String
 * @param output            Output file
 * @return                  Valid VariantOutputFormat
 * @throws                  IllegalArgumentException if the outputFormatStr is not valid
 */
public static VariantOutputFormat toOutputFormat(String outputFormatStr, String output) {
  if (!StringUtils.isEmpty(outputFormatStr)) {
    outputFormatStr = outputFormatStr.replace('.', '_');
    return VariantOutputFormat.valueOf(outputFormatStr.toUpperCase());
  } else if (isStandardOutput(output)) {
    return VCF;
  } else {
    return VCF_GZ;
  }
}
origin: opencb/opencga

@Override
protected void parseAndValidateParameters() throws IOException {
  super.parseAndValidateParameters();
  outputFormat = VariantOutputFormat.valueOf(getConf().get(OUTPUT_FORMAT_PARAM, "avro").toUpperCase());
  outFile = getConf().get(OUTPUT_PARAM);
  if (outFile == null || outFile.isEmpty()) {
    throw new IllegalArgumentException(outFile);
  }
  getQueryFromConfig(query, getConf());
  getQueryOptionsFromConfig(options, getConf());
}
origin: opencb/opencga

  private DataWriter<Variant> configureWriter(final TaskAttemptContext job, OutputStream fileOut) throws IOException {
//        job.getCounter(VcfDataWriter.class.getName(), "failed").increment(0); // init
    final Configuration conf = job.getConfiguration();
    VariantOutputFormat outputFormat = VariantOutputFormat.valueOf(conf.get(OUTPUT_FORMAT_PARAM));

    DataWriter<Variant> dataWriter;
    VariantTableHelper helper = new VariantTableHelper(conf);
    try (StudyConfigurationManager scm = new StudyConfigurationManager(new HBaseVariantStorageMetadataDBAdaptorFactory(helper))) {
      VariantWriterFactory writerFactory = new VariantWriterFactory(scm);
      Query query = VariantMapReduceUtil.getQueryFromConfig(conf);
      QueryOptions options = VariantMapReduceUtil.getQueryOptionsFromConfig(conf);
      dataWriter = writerFactory.newDataWriter(outputFormat, fileOut, query, options);

//            dataWriter.setConverterErrorListener((v, e) ->
//                    job.getCounter(VcfDataWriter.class.getName(), "failed").increment(1));

      dataWriter.open();
      dataWriter.pre();
      return dataWriter;
    }
  }

org.opencb.opencga.storage.core.variant.ioVariantWriterFactory$VariantOutputFormatvalueOf

Popular methods of VariantWriterFactory$VariantOutputFormat

  • isGzip
  • isSnappy
  • toString
  • getExtension
  • isMultiStudyOutput

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • orElseThrow (Optional)
  • getExternalFilesDir (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • JTable (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
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