use of uk.ac.ebi.ena.webin.cli.validator.response.ReadsValidationResponse in project webin-cli by enasequence.
the class ReadsValidationTest method validFastq.
@Test
public void validFastq() {
File manifestFile = manifestBuilder().file(FileType.FASTQ, "valid.fastq.gz").build();
WebinCliExecutor<ReadsManifest, ReadsValidationResponse> executor = executorBuilder.build(manifestFile, RESOURCE_DIR);
executor.readManifest();
SubmissionFiles submissionFiles = executor.getManifestReader().getManifest().files();
assertThat(submissionFiles.get().size()).isEqualTo(1);
assertThat(submissionFiles.get(FileType.FASTQ).size()).isOne();
executor.validateSubmission();
}
use of uk.ac.ebi.ena.webin.cli.validator.response.ReadsValidationResponse in project webin-cli by enasequence.
the class ReadsValidationTest method sameFilePairedFastq.
@Test
public void sameFilePairedFastq() {
File manifestFile = manifestBuilder().file(FileType.FASTQ, "valid.fastq.gz").file(FileType.FASTQ, "valid.fastq.gz").build();
WebinCliExecutor<ReadsManifest, ReadsValidationResponse> executor = executorBuilder.build(manifestFile, RESOURCE_DIR);
executor.readManifest();
SubmissionFiles submissionFiles = executor.getManifestReader().getManifest().files();
assertThat(submissionFiles.get().size()).isEqualTo(2);
assertThat(submissionFiles.get(FileType.FASTQ).size()).isEqualTo(2);
assertThatThrownBy(() -> executor.validateSubmission()).isInstanceOf(WebinCliException.class).hasMessage("");
System.out.println(executor.getValidationDir().getAbsolutePath());
new ReportTester(executor).textInSubmissionReport("Multiple (1) occurrences of read name");
}
use of uk.ac.ebi.ena.webin.cli.validator.response.ReadsValidationResponse in project webin-cli by enasequence.
the class ReadsValidationTest method validPairedFastqOneFile.
@Test
public void validPairedFastqOneFile() {
File manifestFile = manifestBuilder().file(FileType.FASTQ, "valid_paired_single_fastq.gz").build();
WebinCliExecutor<ReadsManifest, ReadsValidationResponse> executor = executorBuilder.build(manifestFile, RESOURCE_DIR);
executor.readManifest();
SubmissionFiles submissionFiles = executor.getManifestReader().getManifest().files();
assertThat(submissionFiles.get().size()).isEqualTo(1);
assertThat(submissionFiles.get(FileType.FASTQ).size()).isOne();
executor.validateSubmission();
assertThat(executor.getValidationResponse().isPaired());
}
use of uk.ac.ebi.ena.webin.cli.validator.response.ReadsValidationResponse in project webin-cli by enasequence.
the class ReadsValidationTest method validPairedFastqTwoFiles.
@Test
public void validPairedFastqTwoFiles() {
File manifestFile = manifestBuilder().file(FileType.FASTQ, "valid_paired_1.fastq.gz").file(FileType.FASTQ, "valid_paired_2.fastq.gz").build();
WebinCliExecutor<ReadsManifest, ReadsValidationResponse> executor = executorBuilder.build(manifestFile, RESOURCE_DIR);
executor.readManifest();
SubmissionFiles submissionFiles = executor.getManifestReader().getManifest().files();
assertThat(submissionFiles.get().size()).isEqualTo(2);
assertThat(submissionFiles.get(FileType.FASTQ).size()).isEqualTo(2);
executor.validateSubmission();
assertThat(executor.getValidationResponse().isPaired());
}
use of uk.ac.ebi.ena.webin.cli.validator.response.ReadsValidationResponse in project webin-cli by enasequence.
the class ReadsValidationTest method invalidBAM.
@Test
public void invalidBAM() {
File manifestFile = manifestBuilder().file(FileType.BAM, "invalid.bam").build();
WebinCliExecutor<ReadsManifest, ReadsValidationResponse> executor = executorBuilder.build(manifestFile, RESOURCE_DIR);
executor.readManifest();
SubmissionFiles submissionFiles = executor.getManifestReader().getManifest().files();
assertThat(submissionFiles.get().size()).isEqualTo(1);
assertThat(submissionFiles.get(FileType.BAM).size()).isOne();
assertThatThrownBy(() -> executor.validateSubmission()).isInstanceOf(WebinCliException.class).hasMessage("");
new ReportTester(executor).textInFileReport("invalid.bam", "File contains no valid reads");
}
Aggregations