Unverified Commit 2e3ee7c9 authored by Senthilnathan Vijayaraja's avatar Senthilnathan Vijayaraja Committed by GitHub

Merge pull request #41 from enasequence/clinical_isolate_assembly

clinical isolate assembly type added
parents 0be382c0 7b0c87d2
......@@ -76,7 +76,7 @@ task printWebinTestCredentials {
dependencies {
implementation( 'uk.ac.ebi.ena.webin-cli:webin-cli-validator:1.2.0' )
implementation( 'uk.ac.ebi.ena.sequence:sequencetools:2.0.95' )
implementation( 'uk.ac.ebi.ena.sequence:sequencetools:2.1.0' )
implementation( 'uk.ac.ebi.ena.txmbtools:txmbtools:1.0.3' )
implementation( 'uk.ac.ebi.ena:readtools:1.11.0' )
implementation( 'org.springframework.boot:spring-boot-starter' )
......
......@@ -92,6 +92,7 @@ GenomeManifestReader extends ManifestReader<GenomeManifest> {
public static final String ASSEMBLY_TYPE_PRIMARY_CLONE_OR_ISOLATE = "clone or isolate";
public static final String ASSEMBLY_TYPE_PRIMARY_METAGENOME = "primary metagenome";
public static final String ASSEMBLY_TYPE_BINNED_METAGENOME = "binned metagenome";
public static final String ASSEMBLY_TYPE_CLINICAL_ISOLATE_ASSEMBLY = "clinical isolate assembly";
private static final ManifestCVList CV_MOLECULE_TYPE = new ManifestCVList(
"genomic DNA",
......@@ -105,10 +106,11 @@ GenomeManifestReader extends ManifestReader<GenomeManifest> {
ASSEMBLY_TYPE_BINNED_METAGENOME,
"Metagenome-Assembled Genome (MAG)",
"Environmental Single-Cell Amplified Genome (SAG)",
"COVID-19 outbreak"
"COVID-19 outbreak",
ASSEMBLY_TYPE_CLINICAL_ISOLATE_ASSEMBLY
);
public static final ArrayList<ManifestFileGroup> PRIMARY_AND_BINNED_METAGENOME_FILE_GROUPS = new ManifestFileCount.Builder()
public static final ArrayList<ManifestFileGroup> PRIMARY_AND_BINNED_METAGENOME_AND_CLINICAL_ISOLATE_ASSEMBLY_FILE_GROUPS = new ManifestFileCount.Builder()
.group("Sequences in a fasta file.")
.required(Field.FASTA)
.build();
......@@ -273,16 +275,18 @@ GenomeManifestReader extends ManifestReader<GenomeManifest> {
// "primary metagenome" and "binned metagenome" checks
if( ASSEMBLY_TYPE_PRIMARY_METAGENOME.equals( getManifestReaderResult().getValue( Field.ASSEMBLY_TYPE ) ) ||
ASSEMBLY_TYPE_BINNED_METAGENOME.equals( getManifestReaderResult().getValue( Field.ASSEMBLY_TYPE ) ) )
ASSEMBLY_TYPE_BINNED_METAGENOME.equals( getManifestReaderResult().getValue( Field.ASSEMBLY_TYPE ) ) ||
ASSEMBLY_TYPE_CLINICAL_ISOLATE_ASSEMBLY.equals( getManifestReaderResult().getValue( Field.ASSEMBLY_TYPE) ) )
{
if(submissionFiles.get()
.stream()
.anyMatch(file -> GenomeManifest.FileType.FASTA != file.getFileType() )) {
error(WebinCliMessage.MANIFEST_READER_INVALID_FILE_GROUP_ERROR,
getFileGroupText(PRIMARY_AND_BINNED_METAGENOME_FILE_GROUPS),
getFileGroupText(PRIMARY_AND_BINNED_METAGENOME_AND_CLINICAL_ISOLATE_ASSEMBLY_FILE_GROUPS),
" for assembly types: \"" +
ASSEMBLY_TYPE_PRIMARY_METAGENOME + "\" and \"" +
ASSEMBLY_TYPE_BINNED_METAGENOME + "\"");
ASSEMBLY_TYPE_PRIMARY_METAGENOME + "\" , \"" +
ASSEMBLY_TYPE_BINNED_METAGENOME + "\" and \"" +
ASSEMBLY_TYPE_CLINICAL_ISOLATE_ASSEMBLY + "\"");
}
}
}
......
......@@ -22,8 +22,8 @@ public enum SpreadsheetContext {
GENOME(
new ManifestReaderBuilder(GenomeManifestReader.class).build(),
"genome",
"Additionally, primary and binned metagenomes must have " +
ManifestReader.getFileGroupText( GenomeManifestReader.PRIMARY_AND_BINNED_METAGENOME_FILE_GROUPS ) + " files."
"Additionally, primary and binned metagenomes and clinical isolate assembly must have " +
ManifestReader.getFileGroupText( GenomeManifestReader.PRIMARY_AND_BINNED_METAGENOME_AND_CLINICAL_ISOLATE_ASSEMBLY_FILE_GROUPS ) + " files."
),
TRANSCRIPTOME(
new ManifestReaderBuilder(TranscriptomeManifestReader.class).build(),
......
......@@ -126,6 +126,7 @@ public class WebinCliTest {
"│ │ │* Environmental Single-Cell Amplified Genome │\n" +
"│ │ │(SAG) │\n" +
"│ │ │* COVID-19 outbreak │\n" +
"│ │ │* clinical isolate assembly │\n" +
"├────────────────────┼───────────┼─────────────────────────────────────────────┤\n" +
"│COVERAGE │Mandatory │Sequencing coverage │\n" +
"├────────────────────┼───────────┼─────────────────────────────────────────────┤\n" +
......
......@@ -101,4 +101,14 @@ public class GenomeManifestReaderFileCountTest {
.field("ASSEMBLY_TYPE", "primary metagenome")
.test();
}
@Test
public void testClinicalIsolateAssemblyFileCount() {
new ManifestReaderFileCountTester<>(
GenomeManifestReader.class, GenomeManifest.FileType.values())
// Supported file groups
.files(GenomeManifest.FileType.FASTA)
.field("ASSEMBLY_TYPE", "clinical isolate assembly")
.test();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment