@Test(expected = VCFParseException.class) public void testBadChromosomeLine2() throws VCFParseException { String chrlin = "#CHROM POS ID RE ALT QUAL FILTER INFO FORMAT Mentalist02 "+ "Mentalist02_dup Mentalist02_dup2 Mentalist02_dup3 Mentalist02_dup4 Mentalist02_dup5\n"; reader.parse_chrom_line(chrlin); }
public void parse_chrom_line(String line) throws VCFParseException { String A[] = line.split("\t"); if (! A[0].equals("#CHROM") ) { throw new VCFParseException("[parse_chrom_line]: Malformed #CHROM field in #CHROM line: " + line); } if (! A[1].equals("POS") ) { throw new VCFParseException("[parse_chrom_line]: Malformed POS field in #CHROM line:" + line); } if (! A[2].equals("ID") ) { throw new VCFParseException("[parse_chrom_line]: Malformed ID field in #CHROM line:" + line); } if (! A[3].equals("REF") ) { throw new VCFParseException("[parse_chrom_line]: Malformed REF field in #CHROM line:" + line); } if (! A[4].equals("ALT") ) { throw new VCFParseException("[parse_chrom_line]: Malformed ALT field in #CHROM line:" + line); } if (! A[5].equals("QUAL") ) { throw new VCFParseException("[parse_chrom_line]: Malformed QUAL field in #CHROM line:" + line); } if (! A[6].equals("FILTER") ) { throw new VCFParseException("[parse_chrom_line]: Malformed FILTER field in #CHROM line:" + line); } if (! A[7].equals("INFO") ) { throw new VCFParseException("[parse_chrom_line]: Malformed INFO field in #CHROM line:" + line); } if (! A[8].equals("FORMAT") ) { String s = String.format("[parse_chrom_line]: Malformed FORMAT field in #CHROM line: %s",line); throw new VCFParseException(s); } if (A.length<10) { String s = String.format("Error: Did not find sufficient number fields in the #CHROM line" + " (need to be at least 10, but found %d): %s",A.length,line); throw new VCFParseException(s); } for (int i=9; i< A.length; ++i) { sample_name_list.add(A[i]); } }
VCFReader { public void parse_chrom_line(String line) throws VCFParseException { String A[] = line.split("\t"); if (! A[0].equals("#CHROM") ) { throw new VCFParseException("[parse_chrom_line]: Malformed #CHROM field in #CHROM line: " + line); } if (! A[1].equals("POS") ) { throw new VCFParseException("[parse_chrom_line]: Malformed POS field in #CHROM line:" + line); } if (! A[2].equals("ID") ) { throw new VCFParseException("[parse_chrom_line]: Malformed ID field in #CHROM line:" + line); } if (! A[3].equals("REF") ) { throw new VCFParseException("[parse_chrom_line]: Malformed REF field in #CHROM line:" + line); } if (! A[4].equals("ALT") ) { throw new VCFParseException("[parse_chrom_line]: Malformed ALT field in #CHROM line:" + line); } if (! A[5].equals("QUAL") ) { throw new VCFParseException("[parse_chrom_line]: Malformed QUAL field in #CHROM line:" + line); } if (! A[6].equals("FILTER") ) { throw new VCFParseException("[parse_chrom_line]: Malformed FILTER field in #CHROM line:" + line); } if (! A[7].equals("INFO") ) { throw new VCFParseException("[parse_chrom_line]: Malformed INFO field in #CHROM line:" + line); } if (! A[8].equals("FORMAT") ) { String s = String.format("[parse_chrom_line]: Malformed FORMAT field in #CHROM line: %s",line); throw new VCFParseException(s); } if (A.length<10) { String s = String.format("Error: Did not find sufficient number fields in the #CHROM line" + " (need to be at least 10, but found %d): %s",A.length,line); throw new VCFParseException(s); } for (int i=9; i< A.length; ++i) { sample_name_list.add(A[i]); } } }
VCFReader { public void parse_chrom_line(String line) throws VCFParseException { String A[] = line.split("\t"); if (! A[0].equals("#CHROM") ) { throw new VCFParseException("[parse_chrom_line]: Malformed #CHROM field in #CHROM line: " + line); } if (! A[1].equals("POS") ) { throw new VCFParseException("[parse_chrom_line]: Malformed POS field in #CHROM line:" + line); } if (! A[2].equals("ID") ) { throw new VCFParseException("[parse_chrom_line]: Malformed ID field in #CHROM line:" + line); } if (! A[3].equals("REF") ) { throw new VCFParseException("[parse_chrom_line]: Malformed REF field in #CHROM line:" + line); } if (! A[4].equals("ALT") ) { throw new VCFParseException("[parse_chrom_line]: Malformed ALT field in #CHROM line:" + line); } if (! A[5].equals("QUAL") ) { throw new VCFParseException("[parse_chrom_line]: Malformed QUAL field in #CHROM line:" + line); } if (! A[6].equals("FILTER") ) { throw new VCFParseException("[parse_chrom_line]: Malformed FILTER field in #CHROM line:" + line); } if (! A[7].equals("INFO") ) { throw new VCFParseException("[parse_chrom_line]: Malformed INFO field in #CHROM line:" + line); } if (! A[8].equals("FORMAT") ) { String s = String.format("[parse_chrom_line]: Malformed FORMAT field in #CHROM line: %s",line); throw new VCFParseException(s); } if (A.length<10) { String s = String.format("Error: Did not find sufficient number fields in the #CHROM line" + " (need to be at least 10, but found %d): %s",A.length,line); throw new VCFParseException(s); } for (int i=9; i< A.length; ++i) { sample_name_list.add(A[i]); } } VCFReader(String vcfPath);  VCFReader(BufferedReader br); }
VCFReader { public void parse_chrom_line(String line) throws VCFParseException { String A[] = line.split("\t"); if (! A[0].equals("#CHROM") ) { throw new VCFParseException("[parse_chrom_line]: Malformed #CHROM field in #CHROM line: " + line); } if (! A[1].equals("POS") ) { throw new VCFParseException("[parse_chrom_line]: Malformed POS field in #CHROM line:" + line); } if (! A[2].equals("ID") ) { throw new VCFParseException("[parse_chrom_line]: Malformed ID field in #CHROM line:" + line); } if (! A[3].equals("REF") ) { throw new VCFParseException("[parse_chrom_line]: Malformed REF field in #CHROM line:" + line); } if (! A[4].equals("ALT") ) { throw new VCFParseException("[parse_chrom_line]: Malformed ALT field in #CHROM line:" + line); } if (! A[5].equals("QUAL") ) { throw new VCFParseException("[parse_chrom_line]: Malformed QUAL field in #CHROM line:" + line); } if (! A[6].equals("FILTER") ) { throw new VCFParseException("[parse_chrom_line]: Malformed FILTER field in #CHROM line:" + line); } if (! A[7].equals("INFO") ) { throw new VCFParseException("[parse_chrom_line]: Malformed INFO field in #CHROM line:" + line); } if (! A[8].equals("FORMAT") ) { String s = String.format("[parse_chrom_line]: Malformed FORMAT field in #CHROM line: %s",line); throw new VCFParseException(s); } if (A.length<10) { String s = String.format("Error: Did not find sufficient number fields in the #CHROM line" + " (need to be at least 10, but found %d): %s",A.length,line); throw new VCFParseException(s); } for (int i=9; i< A.length; ++i) { sample_name_list.add(A[i]); } } VCFReader(String vcfPath);  VCFReader(BufferedReader br); int get_total_number_of_variants(); int getNumberOfSamples(); String getVCFFileName(); Iterator<Variant> getVariantIterator(); Iterator<VCFLine> getVCFLineIterator(); ArrayList<Variant> getVariantList(); Variant VCFline2Variant(VCFLine line); ArrayList<String> getSampleNames(); ArrayList<String> getListOfUnparsableLines(); ArrayList<String> get_vcf_header(); ArrayList<String> getAnnotatedVCFHeader(); ArrayList<String> get_html_message(); void parseFile(); void parse_chrom_line(String line); void inputVCFheader(); void printWarnings(); }
VCFReader { public void parse_chrom_line(String line) throws VCFParseException { String A[] = line.split("\t"); if (! A[0].equals("#CHROM") ) { throw new VCFParseException("[parse_chrom_line]: Malformed #CHROM field in #CHROM line: " + line); } if (! A[1].equals("POS") ) { throw new VCFParseException("[parse_chrom_line]: Malformed POS field in #CHROM line:" + line); } if (! A[2].equals("ID") ) { throw new VCFParseException("[parse_chrom_line]: Malformed ID field in #CHROM line:" + line); } if (! A[3].equals("REF") ) { throw new VCFParseException("[parse_chrom_line]: Malformed REF field in #CHROM line:" + line); } if (! A[4].equals("ALT") ) { throw new VCFParseException("[parse_chrom_line]: Malformed ALT field in #CHROM line:" + line); } if (! A[5].equals("QUAL") ) { throw new VCFParseException("[parse_chrom_line]: Malformed QUAL field in #CHROM line:" + line); } if (! A[6].equals("FILTER") ) { throw new VCFParseException("[parse_chrom_line]: Malformed FILTER field in #CHROM line:" + line); } if (! A[7].equals("INFO") ) { throw new VCFParseException("[parse_chrom_line]: Malformed INFO field in #CHROM line:" + line); } if (! A[8].equals("FORMAT") ) { String s = String.format("[parse_chrom_line]: Malformed FORMAT field in #CHROM line: %s",line); throw new VCFParseException(s); } if (A.length<10) { String s = String.format("Error: Did not find sufficient number fields in the #CHROM line" + " (need to be at least 10, but found %d): %s",A.length,line); throw new VCFParseException(s); } for (int i=9; i< A.length; ++i) { sample_name_list.add(A[i]); } } VCFReader(String vcfPath);  VCFReader(BufferedReader br); int get_total_number_of_variants(); int getNumberOfSamples(); String getVCFFileName(); Iterator<Variant> getVariantIterator(); Iterator<VCFLine> getVCFLineIterator(); ArrayList<Variant> getVariantList(); Variant VCFline2Variant(VCFLine line); ArrayList<String> getSampleNames(); ArrayList<String> getListOfUnparsableLines(); ArrayList<String> get_vcf_header(); ArrayList<String> getAnnotatedVCFHeader(); ArrayList<String> get_html_message(); void parseFile(); void parse_chrom_line(String line); void inputVCFheader(); void printWarnings(); static final int FORMAT_GENOTYPE; static final int FORMAT_GENOTYPE_QUALITY; static final int FORMAT_LIKELIHOODS; static final int FORMAT_HIGH_QUALITY_BASES; static final int FORMAT_PHRED_STRAND_BIAS; static final int FORMAT_PHRED_GENOTYPE_LIKELIHOODS; }