method2testcases stringlengths 118 6.63k |
|---|
### Question:
MapCache implements Cache<K, V> { @Override public MapCache<K, V> set(K key, V value) { if (value == null) { return this; } validateKey(key); mCache.put(key, value); return this; } <O extends MapCache.Options> MapCache(O opts); @Override V get(K key); @Override MapCache<K, V> set(K key, V value); static f... |
### Question:
AzureFunctionsPlugin implements Plugin<Project> { public void apply(Project project) { AzureFunctionsExtension azureFunctionsExtension = new AzureFunctionsExtension(); project.getExtensions().add(AZURE_FUNCTIONS, azureFunctionsExtension); } void apply(Project project); static final String AZURE_FUNCTIONS... |
### Question:
AzureWebappPlugin implements Plugin<Project> { public void apply(Project project) { AzureWebAppExtension azureWebAppExtension = new AzureWebAppExtension(project); project.getExtensions().add(WEBAPP_EXTENSION_NAME, azureWebAppExtension); project.getTasks().create(DeployTask.TASK_NAME, DeployTask.class, (ta... |
### Question:
ProteinSubstitution extends ProteinChange { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ProteinSubstitution other = (ProteinSubstitution) obj; if (location == null) { if (other.location != null) ... |
### Question:
ProteinExtension extends ProteinChange { public static ProteinExtension buildWithoutTerminal(boolean onlyPredicted, String wtAA, int pos, String targetAA) { return new ProteinExtension(onlyPredicted, ProteinPointLocation.build(wtAA, pos), targetAA, LEN_NO_TER); } ProteinExtension(boolean onlyPredicted, Pr... |
### Question:
ProteinExtension extends ProteinChange { @Override public String toHGVSString(AminoAcidCode code) { String targetAA = this.targetAA; if (code == AminoAcidCode.THREE_LETTER) targetAA = Translator.getTranslator().toLong(targetAA); if (isNoTerminalExtension()) return wrapIfOnlyPredicted(Joiner.on("").join(po... |
### Question:
ProteinRange implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ProteinRange other = (ProteinRange) obj; if (first == null) { if (other.first != null) return false; ... |
### Question:
ProteinRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { return toHGVSString(AminoAcidCode.THREE_LETTER); } ProteinRange(ProteinPointLocation first, ProteinPointLocation last); static ProteinRange build(String firstAA, int first, String lastAA, int last); static ProteinRa... |
### Question:
GenomicNucleotideChangeBuilder { public NucleotideChange build() { final String ref; final String alt; if (variant.getGenomeInterval().getStrand() == Strand.FWD) { ref = variant.getRef(); alt = variant.getAlt(); } else { ref = DNAUtils.reverseComplement(variant.getRef()); alt = DNAUtils.reverseComplement(... |
### Question:
PedPerson { public boolean isFounder() { return ("0".equals(father) && "0".equals(mother)); } PedPerson(String pedigree, String name, String father, String mother, Sex sex, Disease disease,
Collection<String> extraFields); PedPerson(String pedigree, String name, String father, String mother, Sex se... |
### Question:
PedFileWriter { public void write(PedFileContents contents) throws IOException { FileOutputStream fos = new FileOutputStream(file); BufferedOutputStream stream = new BufferedOutputStream(fos); write(contents, stream); stream.close(); fos.close(); } PedFileWriter(File file); void write(PedFileContents cont... |
### Question:
PedigreeQueryDecorator { public boolean isParentOfAffected(Person person) { for (Person member : pedigree.getMembers()) if (member.getFather() == person || member.getMother() == person) return true; return false; } PedigreeQueryDecorator(Pedigree pedigree); Pedigree getPedigree(); boolean isParentOfAffect... |
### Question:
PedigreeQueryDecorator { public ImmutableSet<String> getUnaffectedNames() { ImmutableSet.Builder<String> resultNames = new ImmutableSet.Builder<String>(); for (Person member : pedigree.getMembers()) if (member.getDisease() == Disease.UNAFFECTED) resultNames.add(member.getName()); return resultNames.build(... |
### Question:
PedigreeQueryDecorator { public ImmutableSet<String> getParentNames() { ImmutableSet.Builder<String> parentNames = new ImmutableSet.Builder<String>(); for (Person member : pedigree.getMembers()) { if (member.getFather() != null) parentNames.add(member.getFather().getName()); if (member.getMother() != null... |
### Question:
PedigreeQueryDecorator { public ImmutableList<Person> getParents() { ImmutableSet<String> parentNames = getParentNames(); ImmutableList.Builder<Person> builder = new ImmutableList.Builder<Person>(); for (Person member : pedigree.getMembers()) if (parentNames.contains(member.getName())) builder.add(member)... |
### Question:
PedigreeQueryDecorator { public int getNumberOfParents() { HashSet<String> parentNames = new HashSet<String>(); for (Person member : pedigree.getMembers()) { if (member.getFather() != null) parentNames.add(member.getFather().getName()); if (member.getMother() != null) parentNames.add(member.getMother().ge... |
### Question:
ProteinPointLocation implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ProteinPointLocation other = (ProteinPointLocation) obj; if (aa == null) { if (other.aa != nu... |
### Question:
PedigreeQueryDecorator { public int getNumberOfAffecteds() { int result = 0; for (Person member : pedigree.getMembers()) if (member.getDisease() == Disease.AFFECTED) result += 1; return result; } PedigreeQueryDecorator(Pedigree pedigree); Pedigree getPedigree(); boolean isParentOfAffected(Person person); ... |
### Question:
PedigreeQueryDecorator { public int getNumberOfUnaffecteds() { int result = 0; for (Person member : pedigree.getMembers()) if (member.getDisease() == Disease.UNAFFECTED) result += 1; return result; } PedigreeQueryDecorator(Pedigree pedigree); Pedigree getPedigree(); boolean isParentOfAffected(Person perso... |
### Question:
Person { public boolean isFounder() { return (father == null && mother == null); } Person(String name, Person father, Person mother, Sex sex, Disease disease, Collection<String> extraFields); Person(String name, Person father, Person mother, Sex sex, Disease disease); Person(PedPerson pedPerson, PedFil... |
### Question:
GenotypeList { public boolean namesEqual(Pedigree pedigree) { return (pedigree.getNames().equals(names)); } GenotypeList(String geneID, List<String> names, boolean isXChromosomal,
ImmutableList<ImmutableList<Genotype>> calls); String getGeneName(); ImmutableList<String> getNames(); boolean isXChromo... |
### Question:
PedFileReader { public PedFileContents read() throws IOException, PedParseException { return read(new FileInputStream(file)); } PedFileReader(File file); PedFileContents read(); static PedFileContents read(InputStream stream); }### Answer:
@Test public void testParseWithHeader() throws PedParseException,... |
### Question:
Genotype { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((alleleNumbers == null) ? 0 : alleleNumbers.hashCode()); return result; } Genotype(Collection<Integer> alleleNumbers); ImmutableList<Integer> getAlleleNumbers(); int getPloidy(); boolean isDiploid... |
### Question:
Genotype { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Genotype other = (Genotype) obj; if (alleleNumbers == null) { if (other.alleleNumbers != null) return false; } else if (!alleleNumbers.equal... |
### Question:
TranscriptSequenceOntologyDecorator { public boolean overlapsWithTranslationalStartSite(GenomeInterval interval) { return interval.overlapsWith(getStartCodonInterval()); } TranscriptSequenceOntologyDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); GenomeInterval getStartCodonInterval... |
### Question:
ProteinPointLocation implements ConvertibleToHGVSString { @Override public String toHGVSString() { return toHGVSString(AminoAcidCode.THREE_LETTER); } ProteinPointLocation(String aa, int pos, int offset, boolean downstreamOfTerminal); static ProteinPointLocation build(String aa, int pos); static ProteinPoi... |
### Question:
TranscriptSequenceOntologyDecorator { public boolean overlapsWithTranslationalStopSite(GenomeInterval interval) { return interval.overlapsWith(getStopCodonInterval()); } TranscriptSequenceOntologyDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); GenomeInterval getStartCodonInterval()... |
### Question:
TranscriptSequenceOntologyDecorator { public boolean liesInExon(GenomeInterval interval) { TranscriptProjectionDecorator projector = new TranscriptProjectionDecorator(transcript); final int exonNo = projector.locateExon(interval.getGenomeBeginPos()); if (exonNo == TranscriptProjectionDecorator.INVALID_EXO... |
### Question:
TranscriptSequenceOntologyDecorator { public boolean liesInCDSExon(GenomeInterval interval) { return (transcript.getCDSRegion().contains(interval) && liesInExon(interval)); } TranscriptSequenceOntologyDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); GenomeInterval getStartCodonInter... |
### Question:
TranscriptSequenceOntologyDecorator { public boolean liesInIntron(GenomePosition pos) { for (int i = 0; i + 1 < transcript.getExonRegions().size(); ++i) { GenomeInterval intronRegion = transcript.intronRegion(i); if (intronRegion.contains(pos)) return true; } return false; } TranscriptSequenceOntologyDeco... |
### Question:
ProteinChangeAllele implements ConvertibleToHGVSString, List<ProteinChange> { public static ProteinChangeAllele build(VariantConfiguration varConfig, ProteinChange... changes) { return new ProteinChangeAllele(varConfig, ImmutableList.copyOf(changes)); } ProteinChangeAllele(VariantConfiguration varConfig, ... |
### Question:
TranscriptSequenceOntologyDecorator { public boolean overlapsWithUpstreamRegion(GenomeInterval interval) { GenomeInterval upstream = getUpstreamInterval(); return interval.overlapsWith(upstream); } TranscriptSequenceOntologyDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); GenomeInte... |
### Question:
TranscriptSequenceOntologyDecorator { public boolean overlapsWithDownstreamRegion(GenomeInterval interval) { GenomeInterval downstream = getDownstreamInterval(); return interval.overlapsWith(downstream); } TranscriptSequenceOntologyDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); Ge... |
### Question:
TranscriptSequenceDecorator { public String getCodonAt(TranscriptPosition txPos, CDSPosition cdsPos) throws InvalidCodonException { int frameShift = cdsPos.getPos() % 3; int codonStart = txPos.getPos() - frameShift; int endPos = codonStart + 3; if (transcript.getTrimmedSequence().length() < endPos) throw ... |
### Question:
TranscriptSequenceDecorator { public String getCodonsStartingFrom(TranscriptPosition txPos, CDSPosition cdsPos, int count) { int frameShift = cdsPos.getPos() % 3; int codonStart = txPos.getPos() - frameShift; int endPos = codonStart + 3 * count; if (endPos > transcript.getTrimmedSequence().length()) endPo... |
### Question:
ProteinChangeAllele implements ConvertibleToHGVSString, List<ProteinChange> { @Override public String toHGVSString() { return toHGVSString(AminoAcidCode.THREE_LETTER); } ProteinChangeAllele(VariantConfiguration varConfig, Collection<? extends ProteinChange> changes); static ProteinChangeAllele singleChang... |
### Question:
ProteinSubstitution extends ProteinChange { @Override public String toHGVSString(AminoAcidCode code) { if (code == AminoAcidCode.THREE_LETTER) return wrapIfOnlyPredicted(location.toHGVSString(code) + Translator.getTranslator().toLong(targetAA)); else return wrapIfOnlyPredicted(location.toHGVSString(code) ... |
### Question:
TranscriptProjectionDecorator { public int exonIDInReferenceOrder(int exonID) { if (transcript.getStrand().isForward()) return exonID; else return transcript.getExonRegions().size() - exonID - 1; } TranscriptProjectionDecorator(TranscriptModel transcript); TranscriptModel getTranscript(); String getCDSTra... |
### Question:
TranscriptProjectionDecorator { public TranscriptPosition cdsToTranscriptPos(CDSPosition pos) { final GenomePosition cdsBeginPos = transcript.getCDSRegion().getGenomeBeginPos(); int currPos = 0; for (GenomeInterval region : transcript.getExonRegions()) { if (region.getGenomeEndPos().isLeq(cdsBeginPos)) { ... |
### Question:
Anchors { public static int gapLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getGapPos(); } static int gapLength(List<Anchor> anchors); static int seqLength(List<Anchor> anchors); static int... |
### Question:
Anchors { public static int seqLength(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } return anchors.get(anchors.size() - 1).getSeqPos(); } static int gapLength(List<Anchor> anchors); static int seqLength(List<Anchor> anchors); static int... |
### Question:
SingleAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":p.", getChange().toHGVSString(code)); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String> pa... |
### Question:
Anchors { public static int countLeadingGaps(List<Anchor> anchors) { if (anchors.size() < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if (anchors.size() < 2 || (anchors.get(0).getSeqPos() != anchors.get(1) .getSeqPos())) { return 0; } else { assert anchors.get(0).getSeqPos()... |
### Question:
Anchors { public static int countTrailingGaps(List<Anchor> anchors) { final int len = anchors.size(); if (len < 2) { throw new RuntimeException("Must have at least two anchors!"); } else if ((anchors.get(len - 1).getSeqPos() != anchors.get(len - 2).getSeqPos())) { return 0; } else { return anchors.get(len... |
### Question:
Alignment implements Serializable { public int refLeadingGapLength() { return Anchors.countLeadingGaps(refAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchor... |
### Question:
Alignment implements Serializable { public int refTrailingGapLength() { return Anchors.countTrailingGaps(refAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnch... |
### Question:
Alignment implements Serializable { public int qryLeadingGapLength() { return Anchors.countLeadingGaps(qryAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnchor... |
### Question:
Alignment implements Serializable { public int qryTrailingGapLength() { return Anchors.countTrailingGaps(qryAnchors); } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment createUngappedAlignment(int length); ImmutableList<Anchor> getRefAnchors(); ImmutableList<Anchor> getQryAnch... |
### Question:
Alignment implements Serializable { public int projectRefToQry(int refPos) { final int aliPos = Anchors.projectSeqToGapPos(refAnchors, refPos); final int qryPos = Anchors.projectGapToSeqPos(qryAnchors, aliPos); return qryPos; } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment ... |
### Question:
Alignment implements Serializable { public int projectQryToRef(int qryPos) { final int aliPos = Anchors.projectSeqToGapPos(qryAnchors, qryPos); final int refPos = Anchors.projectGapToSeqPos(refAnchors, aliPos); return refPos; } Alignment(List<Anchor> refAnchors, List<Anchor> qryAnchors); static Alignment ... |
### Question:
GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean isLeftOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beginPos, int en... |
### Question:
GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean isRightOf(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() < beginPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, int chr, int beginPos, int ... |
### Question:
GenomeInterval implements Serializable, Comparable<GenomeInterval> { public boolean contains(GenomePosition pos) { if (chr != pos.getChr()) return false; pos = ensureSameStrand(pos); return (pos.getPos() >= beginPos && pos.getPos() < endPos); } GenomeInterval(ReferenceDictionary refDict, Strand strand, in... |
### Question:
GenomeInterval implements Serializable, Comparable<GenomeInterval> { public GenomeInterval intersection(GenomeInterval other) { if (chr != other.chr) return new GenomeInterval(refDict, strand, chr, beginPos, beginPos, PositionType.ZERO_BASED); other = other.withStrand(strand); int beginPos = Math.max(this... |
### Question:
GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isLt(GenomePosition other) { if (other.strand != strand) other = other.withStrand(strand); return (pos < other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr, int pos); GenomePosition(Reference... |
### Question:
GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isLeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos <= other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int ch... |
### Question:
GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isGt(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos > other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr,... |
### Question:
GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isGeq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos >= other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int ch... |
### Question:
GenomePosition implements Serializable, Comparable<GenomePosition> { public boolean isEq(GenomePosition other) { if (other.chr != chr) return false; if (other.strand != strand) other = other.withStrand(strand); return (pos == other.pos); } GenomePosition(ReferenceDictionary refDict, Strand strand, int chr... |
### Question:
MultiAlleleProteinVariant extends ProteinVariant { @Override public String toHGVSString(AminoAcidCode code) { ArrayList<String> parts = new ArrayList<>(); parts.add(getSequenceNamePrefix()); parts.add(":p."); boolean first = true; for (ProteinChangeAllele allele : alleles) { if (first) first = false; else... |
### Question:
GenomePosition implements Serializable, Comparable<GenomePosition> { public int differenceTo(GenomePosition pos) { if (chr != pos.chr) throw new InvalidCoordinateException("Coordinates are on different chromosomes " + this + " vs. " + pos); if (pos.strand != strand) pos = pos.withStrand(strand); return (t... |
### Question:
NucleotideRange implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotideRange other = (NucleotideRange) obj; if (firstPos == null) { if (other.firstPos != null)... |
### Question:
NucleotideRange implements ConvertibleToHGVSString { @Override public String toHGVSString() { if (firstPos.equals(lastPos)) return firstPos.toHGVSString(); else return Joiner.on("").join(firstPos.toHGVSString(), "_", lastPos.toHGVSString()); } NucleotideRange(NucleotidePointLocation firstPos, NucleotidePo... |
### Question:
GenomeVariant implements VariantDescription { public GenomeInterval getGenomeInterval() { return new GenomeInterval(pos, ref.length()); } GenomeVariant(GenomePosition pos, String ref, String alt); GenomeVariant(GenomePosition pos, String ref, String alt, Strand strand); static boolean wouldBeSymbolicAlle... |
### Question:
Translator { public String translateDNA(String dnaseq) { return translateDNA(dnaseq, this.codon1); } private Translator(); static Translator getTranslator(); String translateDNA(String dnaseq); String translateDNA3(String dnaseq); String toLong(String shortAASeq); String toLong(char c); }### Answer:
@Te... |
### Question:
NucleotidePointLocation implements ConvertibleToHGVSString { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; NucleotidePointLocation other = (NucleotidePointLocation) obj; if (basePos != other.basePo... |
### Question:
Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean allLeftOf(int point) { return (maxEnd <= point); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(int p... |
### Question:
Interval implements java.io.Serializable, Comparable<Interval<T>> { public int compareTo(Interval<T> o) { final int result = (begin - o.begin); if (result == 0) return (end - o.end); return result; } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); in... |
### Question:
Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean contains(int point) { return ((begin <= point) && (point < end)); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolea... |
### Question:
Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean isLeftOf(int point) { return (end <= point); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(int point... |
### Question:
Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean isRightOf(int point) { return (point < begin); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int getMaxEnd(); boolean allLeftOf(int poi... |
### Question:
Interval implements java.io.Serializable, Comparable<Interval<T>> { public boolean overlapsWith(int begin, int end) { return ((begin < this.end) && (this.begin < end)); } Interval(MutableInterval<T> other); Interval(int begin, int end, T value, int maxEnd); int getBegin(); int getEnd(); T getValue(); int... |
### Question:
FASTAParser { public FASTARecord next() throws IOException { if (lastLine == null) return null; assert lastLine.startsWith(">"); while (true) { if (lastLine != null && !lastLine.isEmpty()) recordBuffer.add(lastLine); lastLine = reader.readLine(); if (lastLine == null || lastLine.startsWith(">")) break; } ... |
### Question:
RefSeqParser implements TranscriptParser { private boolean onlyCurated() { return checkFlagInSection(iniSection.fetch("onlyCurated")); } RefSeqParser(ReferenceDictionary refDict, String basePath, List<String> geneIdentifiers,
Section iniSection); @Override ImmutableList<TranscriptModel> run(); }###... |
### Question:
NucleotidePointLocation implements ConvertibleToHGVSString { @Override public String toHGVSString() { final int shift = (this.basePos >= 0) ? 1 : 0; final String prefix = downstreamOfCDS ? "*" : ""; if (offset == 0) return prefix + Integer.toString(this.basePos + shift); else if (offset > 0) return prefix... |
### Question:
ProteinSubstitution extends ProteinChange { public static ProteinSubstitution build(boolean onlyPredicted, String sourceAA, int pos, String targetAA) { return new ProteinSubstitution(onlyPredicted, ProteinPointLocation.build(sourceAA, pos), targetAA); } ProteinSubstitution(boolean onlyPredicted, ProteinPo... |
### Question:
GFFParser { public FeatureRecord next() throws IOException { if (lastLine == null) return null; FeatureRecord result = recordParser.parseLine(lastLine); do { lastLine = reader.readLine(); } while (lastLine != null && lastLine.startsWith("#")); return result; } GFFParser(File file); GFFParser(InputStream ... |
### Question:
NucleotideDeletion extends NucleotideChange { @Override public String toString() { return "NucleotideDeletion [range=" + range + ", seq=" + seq + "]"; } NucleotideDeletion(boolean onlyPredicted, NucleotideRange range, NucleotideSeqDescription seq); static NucleotideDeletion buildWithOffset(boolean onlyPre... |
### Question:
NucleotideShortSequenceRepeatVariability extends NucleotideChange { @Override public String toHGVSString() { return wrapIfOnlyPredicted(Joiner.on("").join(range.toHGVSString(), "(", minCount, "_", maxCount, ")")); } NucleotideShortSequenceRepeatVariability(boolean onlyPredicted, NucleotideRange range, int... |
### Question:
NucleotideSubstitution extends NucleotideChange { public static NucleotideSubstitution buildWithOffset(boolean onlyPredicted, int basePos, int posOffset, String fromNT, String toNT) { return new NucleotideSubstitution(onlyPredicted, NucleotidePointLocation.buildWithOffset(basePos, posOffset), fromNT, toNT... |
### Question:
NucleotideSubstitution extends NucleotideChange { @Override public String toHGVSString() { return wrapIfOnlyPredicted(Joiner.on("").join(position.toHGVSString(), fromNT, ">", toNT)); } NucleotideSubstitution(boolean onlyPredicted, NucleotidePointLocation position, String fromNT, String toNT); static Nucle... |
### Question:
MultiAlleleNucleotideVariant extends NucleotideVariant { @Override public String toHGVSString() { ArrayList<String> parts = new ArrayList<>(); parts.add(getRefIDWithVersion()); parts.add(":"); parts.add(seqType.getPrefix()); boolean first = true; for (NucleotideChangeAllele allele : alleles) { if (first) ... |
### Question:
NucleotideChangeAllele implements ConvertibleToHGVSString, List<NucleotideChange> { public static NucleotideChangeAllele build(VariantConfiguration varConfig, NucleotideChange... changes) { return new NucleotideChangeAllele(varConfig, ImmutableList.copyOf(changes)); } NucleotideChangeAllele(VariantConfigu... |
### Question:
NucleotideChangeAllele implements ConvertibleToHGVSString, List<NucleotideChange> { @Override public String toHGVSString() { return toHGVSString(AminoAcidCode.THREE_LETTER); } NucleotideChangeAllele(VariantConfiguration varConfig, Collection<? extends NucleotideChange> changes); static NucleotideChangeAll... |
### Question:
ProteinFrameshift extends ProteinChange { public static ProteinFrameshift build(boolean onlyPredicted, String wtAA, int position, String targetAA, int shiftLength) { return new ProteinFrameshift(onlyPredicted, ProteinPointLocation.build(wtAA, position), targetAA, shiftLength); } ProteinFrameshift(boolean ... |
### Question:
SingleAlleleNucleotideVariant extends NucleotideVariant { @Override public String toHGVSString() { if (hasOnlyOneChange()) return Joiner.on("").join(getSequenceNamePrefix(), ":", seqType.getPrefix(), getChange().toHGVSString()); final String sep = allele.getVarConfig().toHGVSSeparator(); ArrayList<String>... |
### Question:
ClinVarVCFHeaderExtender extends VCFHeaderExtender { @Override public void addHeaders(VCFHeader header, String prefix) { addHeaders(header, prefix, "", ""); final String note = " (requiring no genotype match, only position overlap)"; if (options.isReportOverlapping() && !options.isReportOverlappingAsMatch... |
### Question:
CosmicVariantContextToRecordConverter implements VariantContextToRecordConverter<CosmicRecord> { @Override public CosmicRecord convert(VariantContext vc) { CosmicRecordBuilder builder = new CosmicRecordBuilder(); builder.setContig(vc.getContig()); builder.setPos(vc.getStart() - 1); builder.setID(vc.getID(... |
### Question:
CosmicVCFHeaderExtender extends VCFHeaderExtender { @Override public void addHeaders(VCFHeader header, String prefix) { addHeadersInfixes(header, prefix, "", ""); if (options.isReportOverlapping() && !options.isReportOverlappingAsMatching()) addHeadersInfixes(header, prefix, "OVL_", " (requiring no genoty... |
### Question:
ProteinFrameshift extends ProteinChange { public static ProteinFrameshift buildWithoutTerminal(boolean onlyPredicted, String wtAA, int position, String targetAA) { return new ProteinFrameshift(onlyPredicted, ProteinPointLocation.build(wtAA, position), targetAA, LEN_NO_TER); } ProteinFrameshift(boolean onl... |
### Question:
UK10KVariantContextToRecordConverter implements VariantContextToRecordConverter<UK10KRecord> { @Override public UK10KRecord convert(VariantContext vc) { UK10KRecordBuilder builder = new UK10KRecordBuilder(); builder.setContig(vc.getContig()); builder.setPos(vc.getStart() - 1); builder.setID(vc.getID()); b... |
### Question:
UK10KVCFHeaderExtender extends VCFHeaderExtender { @Override public void addHeaders(VCFHeader header, String prefix) { addHeadersInfixes(header, prefix, "", ""); if (options.isReportOverlapping() && !options.isReportOverlappingAsMatching()) addHeadersInfixes(header, prefix, "OVL_", " (requiring no genotyp... |
### Question:
DBSNPVCFHeaderExtender extends VCFHeaderExtender { @Override public void addHeaders(VCFHeader header, String prefix) { addHeadersInfixes(header, prefix, "", ""); if (options.isReportOverlapping() && !options.isReportOverlappingAsMatching()) addHeadersInfixes(header, prefix, "OVL_", " (requiring no genotyp... |
### Question:
DBSNPInfoFactory { public DBSNPInfo build(VCFHeader vcfHeader) { String fileDate = vcfHeader.getMetaDataLine("fileDate").getValue(); String source = vcfHeader.getMetaDataLine("source").getValue(); int dbSNPBuildID = Integer.parseInt(vcfHeader.getMetaDataLine("dbSNP_BUILD_ID").getValue()); String reference... |
### Question:
AlleleMatcher { public Collection<GenotypeMatch> matchGenotypes(VariantContext obsVC, VariantContext dbVC) { List<GenotypeMatch> result = new ArrayList<>(); Collection<VariantDescription> obsVars = ctxToVariants(obsVC); Collection<VariantDescription> dbVars = ctxToVariants(dbVC); int i = 1; for (VariantDe... |
### Question:
ProteinFrameshift extends ProteinChange { public static ProteinFrameshift buildShort(boolean onlyPredicted, String wtAA, int position) { return new ProteinFrameshift(onlyPredicted, ProteinPointLocation.build(wtAA, position), null, LEN_SHORT); } ProteinFrameshift(boolean onlyPredicted, ProteinPointLocation... |
### Question:
VariantNormalizer { public VariantDescription normalizeVariant(VariantDescription desc) { final VariantDescription shifted = shiftLeft(desc); return trimBasesLeft(shifted, 0); } VariantNormalizer(String fastaPath); VariantDescription normalizeVariant(VariantDescription desc); VariantDescription normalizeI... |
### Question:
GenomeRegionSequenceExtractor { public String load(GenomeInterval region) { region = region.withStrand(Strand.FWD); String contigName = region.getRefDict().getContigIDToName().get(region.getChr()); contigName = mapContigToFasta(contigName); ReferenceSequence seq = indexedFile.getSubsequenceAt(contigName, ... |
### Question:
ProteinFrameshift extends ProteinChange { @Override public String toHGVSString(AminoAcidCode code) { String targetAA = this.targetAA; if (!isShort() && code == AminoAcidCode.THREE_LETTER) targetAA = Translator.getTranslator().toLong(targetAA); if (isShort()) return wrapIfOnlyPredicted(Joiner.on("").join(p... |
### Question:
ProteinExtension extends ProteinChange { public static ProteinExtension build(boolean onlyPredicted, String wtAA, int pos, String targetAA, int shift) { return build(onlyPredicted, ProteinPointLocation.build(wtAA, pos), targetAA, shift); } ProteinExtension(boolean onlyPredicted, ProteinPointLocation posit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.