Codota Logo
AmbiguityDNACompoundSet.getDNACompoundSet
Code IndexAdd Codota to your IDE (free)

How to use
getDNACompoundSet
method
in
org.biojava.nbio.core.sequence.compound.AmbiguityDNACompoundSet

Best Java code snippets using org.biojava.nbio.core.sequence.compound.AmbiguityDNACompoundSet.getDNACompoundSet (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: biojava/biojava

private CompoundSet<NucleotideCompound> getDnaCompounds() {
  if (dnaCompounds != null) {
    return dnaCompounds;
  }
  return AmbiguityDNACompoundSet.getDNACompoundSet();
}
origin: org.biojava/biojava-core

private CompoundSet<NucleotideCompound> getDnaCompounds() {
  if (dnaCompounds != null) {
    return dnaCompounds;
  }
  return AmbiguityDNACompoundSet.getDNACompoundSet();
}
origin: biojava/biojava

private static SubstitutionMatrix<NucleotideCompound> getNucleotideMatrix(String file) {
  if (!nucleotideMatrices.containsKey(file)) {
    nucleotideMatrices.put(file, new SimpleSubstitutionMatrix<NucleotideCompound>(
        AmbiguityDNACompoundSet.getDNACompoundSet(), getReader(file), file));
  }
  return nucleotideMatrices.get(file);
}
origin: org.biojava/biojava-core

private static SubstitutionMatrix<NucleotideCompound> getNucleotideMatrix(String file) {
  if (!nucleotideMatrices.containsKey(file)) {
    nucleotideMatrices.put(file, new SimpleSubstitutionMatrix<NucleotideCompound>(
        AmbiguityDNACompoundSet.getDNACompoundSet(), getReader(file), file));
  }
  return nucleotideMatrices.get(file);
}
origin: biojava/biojava

private DNASequence getRawParentSequence(String accessId) throws IOException {
  String seqUrlTemplate = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=%s&rettype=fasta&retmode=text";
  URL url = new URL(String.format(seqUrlTemplate, accessId));
  logger.trace("Getting parent DNA sequence from URL: {}", url.toString());
  InputStream is = url.openConnection().getInputStream();
  FastaReader<DNASequence, NucleotideCompound> parentReader
      = new FastaReader<DNASequence, NucleotideCompound>(is,
          new PlainFastaHeaderParser<DNASequence, NucleotideCompound>(),
          new DNASequenceCreator(AmbiguityDNACompoundSet.getDNACompoundSet()));
  LinkedHashMap<String, DNASequence> seq = parentReader.process();
  DNASequence parentSeq = null;
  if (seq.size() == 1) {
    parentSeq = seq.values().iterator().next();
  }
  is.close();
  return parentSeq;
}
origin: org.biojava/biojava-core

private DNASequence getRawParentSequence(String accessId) throws IOException {
  String seqUrlTemplate = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=%s&rettype=fasta&retmode=text";
  URL url = new URL(String.format(seqUrlTemplate, accessId));
  logger.trace("Getting parent DNA sequence from URL: {}", url.toString());
  InputStream is = url.openConnection().getInputStream();
  FastaReader<DNASequence, NucleotideCompound> parentReader
      = new FastaReader<DNASequence, NucleotideCompound>(is,
          new PlainFastaHeaderParser<DNASequence, NucleotideCompound>(),
          new DNASequenceCreator(AmbiguityDNACompoundSet.getDNACompoundSet()));
  LinkedHashMap<String, DNASequence> seq = parentReader.process();
  DNASequence parentSeq = null;
  if (seq.size() == 1) {
    parentSeq = seq.values().iterator().next();
  }
  is.close();
  return parentSeq;
}
origin: biojava/biojava

/**
 * Determines GCG type
 * @param cs compound set of sequences
 * @return GCG type
 */
public static <C extends Compound> String getGCGType(CompoundSet<C> cs) {
  return (cs == DNACompoundSet.getDNACompoundSet() || cs == AmbiguityDNACompoundSet.getDNACompoundSet()) ? "D" :
    (cs == RNACompoundSet.getRNACompoundSet() || cs == AmbiguityRNACompoundSet.getRNACompoundSet()) ? "R" : "P";
}
origin: org.biojava/biojava-core

/**
 * Determines GCG type
 * @param cs compound set of sequences
 * @return GCG type
 */
public static <C extends Compound> String getGCGType(CompoundSet<C> cs) {
  return (cs == DNACompoundSet.getDNACompoundSet() || cs == AmbiguityDNACompoundSet.getDNACompoundSet()) ? "D" :
    (cs == RNACompoundSet.getRNACompoundSet() || cs == AmbiguityRNACompoundSet.getRNACompoundSet()) ? "R" : "P";
}
origin: biojava/biojava

private Sequence<NucleotideCompound> getNucleotideSequence(String seq) {
  Sequence<NucleotideCompound> s = null;
  // first we try DNA, then RNA, them hybrid
  try {
    s = new DNASequence(seq, AmbiguityDNACompoundSet.getDNACompoundSet());
  } catch (CompoundNotFoundException e){
    try {
      s= new RNASequence(seq, AmbiguityRNACompoundSet.getRNACompoundSet());
    } catch (CompoundNotFoundException ex) {
      try {
        // it could still be a hybrid, e.g. 3hoz, chain T, what to do in that case?
        s = new DNASequence(seq, AmbiguityDNARNAHybridCompoundSet.getDNARNAHybridCompoundSet());
        logger.warn("Hybrid RNA/DNA sequence detected for sequence {}", seq);
      } catch (CompoundNotFoundException exc) {
        // not DNA, nor RNA, nor hybrid
        logger.warn("Could not determine compound set (neither DNA, RNA nor hybrid) for nucleotide sequence " + seq);
        return null;
      }
    }
  }
  return s;
}
origin: org.opencb.biodata/biodata-tools

private SequencePair<DNASequence, NucleotideCompound> getPairwiseAlignment(String seq1, String seq2) {
  DNASequence target = null;
  DNASequence query = null;
  try {
    target = new DNASequence(seq1, AmbiguityDNACompoundSet.getDNACompoundSet());
    query = new DNASequence(seq2, AmbiguityDNACompoundSet.getDNACompoundSet());
  } catch (CompoundNotFoundException e) {
    String msg = "Error when creating DNASequence objects for " + seq1 + " and " + seq2 + " prior to pairwise "
        + "sequence alignment";
    logger.error(msg, e);
    throw new VariantNormalizerException(msg, e);
  }
  SubstitutionMatrix<NucleotideCompound> substitutionMatrix = SubstitutionMatrixHelper.getNuc4_4();
  SimpleGapPenalty gapP = new SimpleGapPenalty();
  gapP.setOpenPenalty((short)5);
  gapP.setExtensionPenalty((short)2);
  SequencePair<DNASequence, NucleotideCompound> psa = Alignments.getPairwiseAlignment(query, target,
      Alignments.PairwiseSequenceAlignerType.GLOBAL, gapP, substitutionMatrix);
  return psa;
}
origin: biojava/biojava

  subMatrix = temp;
} else if (cs == AmbiguityDNACompoundSet.getDNACompoundSet()) {
  @SuppressWarnings("unchecked") // compound types must be equal since compound sets are equal
  SubstitutionMatrix<C> temp = (SubstitutionMatrix<C>) SubstitutionMatrixHelper.getNuc4_4();
origin: org.biojava/biojava-alignment

  subMatrix = temp;
} else if (cs == AmbiguityDNACompoundSet.getDNACompoundSet()) {
  @SuppressWarnings("unchecked") // compound types must be equal since compound sets are equal
  SubstitutionMatrix<C> temp = (SubstitutionMatrix<C>) SubstitutionMatrixHelper.getNuc4_4();
org.biojava.nbio.core.sequence.compoundAmbiguityDNACompoundSetgetDNACompoundSet

Popular methods of AmbiguityDNACompoundSet

  • addNucleotideCompound
  • calculateIndirectAmbiguities

Popular in Java

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • 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