182 | 182 |
|
183 | 183 |
START_TEST (valid_genome_length)
|
184 | 184 |
{
|
185 | |
detect_snps("../tests/data/alignment_file_one_line_per_sequence.aln",0,0);
|
|
185 |
detect_snps("../tests/data/alignment_file_one_line_per_sequence.aln",0,0,0);
|
186 | 186 |
fail_unless( get_length_of_genome() == 2000 );
|
187 | 187 |
}
|
188 | 188 |
END_TEST
|
189 | 189 |
|
190 | 190 |
START_TEST (valid_genome_length_with_multiple_lines_per_sequence)
|
191 | 191 |
{
|
192 | |
detect_snps("../tests/data/alignment_file_multiple_lines_per_sequence.aln",0,0);
|
|
192 |
detect_snps("../tests/data/alignment_file_multiple_lines_per_sequence.aln",0,0,0);
|
193 | 193 |
fail_unless( get_length_of_genome() == 2000 );
|
194 | 194 |
}
|
195 | 195 |
END_TEST
|
196 | 196 |
|
197 | 197 |
START_TEST (valid_number_of_sequences_in_file)
|
198 | 198 |
{
|
199 | |
detect_snps("../tests/data/alignment_file_one_line_per_sequence.aln",0,0);
|
|
199 |
detect_snps("../tests/data/alignment_file_one_line_per_sequence.aln",0,0,0);
|
200 | 200 |
fail_unless( get_number_of_samples() == 109 );
|
201 | 201 |
}
|
202 | 202 |
END_TEST
|
203 | 203 |
|
204 | 204 |
START_TEST (valid_number_of_sequences_in_file_with_multiple_lines_per_sequence)
|
205 | 205 |
{
|
206 | |
detect_snps("../tests/data/alignment_file_multiple_lines_per_sequence.aln",0,0);
|
|
206 |
detect_snps("../tests/data/alignment_file_multiple_lines_per_sequence.aln",0,0,0);
|
207 | 207 |
fail_unless( get_number_of_samples() == 109 );
|
208 | 208 |
}
|
209 | 209 |
END_TEST
|
210 | 210 |
|
211 | 211 |
START_TEST (number_of_snps_detected)
|
212 | 212 |
{
|
213 | |
detect_snps("../tests/data/alignment_file_multiple_lines_per_sequence.aln",0,0);
|
|
213 |
detect_snps("../tests/data/alignment_file_multiple_lines_per_sequence.aln",0,0,0);
|
214 | 214 |
fail_unless( get_number_of_snps() == 5);
|
215 | 215 |
}
|
216 | 216 |
END_TEST
|
217 | 217 |
|
218 | 218 |
START_TEST (number_of_snps_detected_small)
|
219 | 219 |
{
|
220 | |
detect_snps("../tests/data/small_alignment.aln",0,0);
|
|
220 |
detect_snps("../tests/data/small_alignment.aln",0,0,0);
|
221 | 221 |
fail_unless( get_number_of_snps() == 1);
|
222 | 222 |
}
|
223 | 223 |
END_TEST
|
224 | 224 |
|
225 | 225 |
START_TEST (detect_snps_pure_mode)
|
226 | 226 |
{
|
227 | |
detect_snps("../tests/data/pure_mode_alignment.aln",1,0);
|
|
227 |
detect_snps("../tests/data/pure_mode_alignment.aln",1,0,0);
|
228 | 228 |
fail_unless( get_number_of_snps() == 2);
|
229 | 229 |
}
|
230 | 230 |
END_TEST
|
|
232 | 232 |
|
233 | 233 |
START_TEST (detect_snps_pure_mode_monomorphic)
|
234 | 234 |
{
|
235 | |
detect_snps("../tests/data/pure_mode_monomorphic_alignment.aln",1,1);
|
|
235 |
detect_snps("../tests/data/pure_mode_monomorphic_alignment.aln",1,1,0);
|
236 | 236 |
fail_unless( get_number_of_snps() == 3);
|
237 | 237 |
}
|
238 | 238 |
END_TEST
|
239 | 239 |
|
240 | 240 |
START_TEST (sample_names_from_alignment_file)
|
241 | 241 |
{
|
242 | |
detect_snps("../tests/data/small_alignment.aln",0,0);
|
|
242 |
detect_snps("../tests/data/small_alignment.aln",0,0,0);
|
243 | 243 |
char ** current_sequence_names = get_sequence_names();
|
244 | 244 |
|
245 | 245 |
fail_unless(strcmp(current_sequence_names[0],"reference_sequence") == 0);
|