@Test public void testChromosome1() throws VCFParseException { byte chr5 = 5; Variant v = new Variant(chr5,13,"A","A",null,dummyPhred); String c= v.get_chromosome_as_string(); Assert.assertEquals("chr5",c); }
public String get_chromosome_as_string() { if (this.chromosome == X_CHROMOSOME) return "chrX"; else if (this.chromosome == Y_CHROMOSOME) return "chrY"; else if (this.chromosome == M_CHROMOSOME) return "chrM"; else return String.format("chr%d",this.chromosome); }
Variant implements Comparable<Variant>, Constants { public String get_chromosome_as_string() { if (this.chromosome == X_CHROMOSOME) return "chrX"; else if (this.chromosome == Y_CHROMOSOME) return "chrY"; else if (this.chromosome == M_CHROMOSOME) return "chrM"; else return String.format("chr%d",this.chromosome); } }
Variant implements Comparable<Variant>, Constants { public String get_chromosome_as_string() { if (this.chromosome == X_CHROMOSOME) return "chrX"; else if (this.chromosome == Y_CHROMOSOME) return "chrY"; else if (this.chromosome == M_CHROMOSOME) return "chrM"; else return String.format("chr%d",this.chromosome); } Variant(byte c, int p, String r, String alternate, GenotypeCall gtype, float qual); }
Variant implements Comparable<Variant>, Constants { public String get_chromosome_as_string() { if (this.chromosome == X_CHROMOSOME) return "chrX"; else if (this.chromosome == Y_CHROMOSOME) return "chrY"; else if (this.chromosome == M_CHROMOSOME) return "chrM"; else return String.format("chr%d",this.chromosome); } Variant(byte c, int p, String r, String alternate, GenotypeCall gtype, float qual); void annotate(Chromosome c); void setChromosome(byte chr); void setPosition(int p); void setRef(String s); void setGenotype(GenotypeCall gtype); void setVar(String s); void setAnnotation(AnnotationList a); boolean affectsMultipleGenes(); int get_position(); String get_ref(); String get_alt(); String getGeneSymbol(); int getEntrezGeneID(); boolean is_missense_variant(); boolean isSynonymousVariant(); boolean isTransition(); boolean isTransversion(); boolean is_single_nucleotide_variant(); int get_chromosome(); byte getChromosomeAsByte(); String get_chromosome_as_string(); boolean is_X_chromosomal(); boolean is_Y_chromosomal(); boolean is_mitochondrial(); float getVariantPhredScore(); float getVariantGenotypeQualityIndividualN(int n); int getVariantReadDepth(); int getVariantReadDepthIndividualN(int n); boolean isHomozygousAlt(); boolean isHomozygousAltInIndividualN(int n); boolean isHeterozygous(); boolean isHeterozygousInIndividualN(int n); boolean isOffExomeTarget(); boolean isMissingInIndividualN(int n); GenotypeCall getGenotype(); Genotype getGenotypeInIndividualN(int n); String getGenotypeAsString(); ArrayList<String> getGenotypeList(); String get_position_as_string(); String get_chromosomal_variant(); String getAnnotation(); String getRepresentativeAnnotation(); ArrayList<String> getAnnotationList(); ArrayList<Annotation> getAnnotationObjectList(); ArrayList<String> getAnnotationListWithGeneSymbol(); ArrayList<String> getAnnotationListWithAnnotationClass(); ArrayList<String> getTranscriptAnnotations(); Annotation getMostPathogenicAnnotation(); String getVariantType(); VariantType getVariantTypeConstant(); String getChromosomalVariant(); String toString(); String get_variant_type_as_string(); int getDistanceFromExon(); @Override int compareTo(Variant other); }
Variant implements Comparable<Variant>, Constants { public String get_chromosome_as_string() { if (this.chromosome == X_CHROMOSOME) return "chrX"; else if (this.chromosome == Y_CHROMOSOME) return "chrY"; else if (this.chromosome == M_CHROMOSOME) return "chrM"; else return String.format("chr%d",this.chromosome); } Variant(byte c, int p, String r, String alternate, GenotypeCall gtype, float qual); void annotate(Chromosome c); void setChromosome(byte chr); void setPosition(int p); void setRef(String s); void setGenotype(GenotypeCall gtype); void setVar(String s); void setAnnotation(AnnotationList a); boolean affectsMultipleGenes(); int get_position(); String get_ref(); String get_alt(); String getGeneSymbol(); int getEntrezGeneID(); boolean is_missense_variant(); boolean isSynonymousVariant(); boolean isTransition(); boolean isTransversion(); boolean is_single_nucleotide_variant(); int get_chromosome(); byte getChromosomeAsByte(); String get_chromosome_as_string(); boolean is_X_chromosomal(); boolean is_Y_chromosomal(); boolean is_mitochondrial(); float getVariantPhredScore(); float getVariantGenotypeQualityIndividualN(int n); int getVariantReadDepth(); int getVariantReadDepthIndividualN(int n); boolean isHomozygousAlt(); boolean isHomozygousAltInIndividualN(int n); boolean isHeterozygous(); boolean isHeterozygousInIndividualN(int n); boolean isOffExomeTarget(); boolean isMissingInIndividualN(int n); GenotypeCall getGenotype(); Genotype getGenotypeInIndividualN(int n); String getGenotypeAsString(); ArrayList<String> getGenotypeList(); String get_position_as_string(); String get_chromosomal_variant(); String getAnnotation(); String getRepresentativeAnnotation(); ArrayList<String> getAnnotationList(); ArrayList<Annotation> getAnnotationObjectList(); ArrayList<String> getAnnotationListWithGeneSymbol(); ArrayList<String> getAnnotationListWithAnnotationClass(); ArrayList<String> getTranscriptAnnotations(); Annotation getMostPathogenicAnnotation(); String getVariantType(); VariantType getVariantTypeConstant(); String getChromosomalVariant(); String toString(); String get_variant_type_as_string(); int getDistanceFromExon(); @Override int compareTo(Variant other);  }