Commit 11ffd18e authored by M. Haseeb's avatar M. Haseeb

ENA-4067

- added two new fields into context's manifest and xml implementation.
- updated readtools version.
parent e6cfdbb0
......@@ -11,7 +11,7 @@ plugins {
apply plugin: 'io.spring.dependency-management'
group = 'uk.ac.ebi.ena.webin-cli'
version = '3.2.2'
version = '3.3.0'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
......@@ -75,10 +75,10 @@ task printWebinTestCredentials {
}
dependencies {
implementation( 'uk.ac.ebi.ena.webin-cli:webin-cli-validator:1.0.9.1' )
implementation( 'uk.ac.ebi.ena.webin-cli:webin-cli-validator:1.1.0' )
implementation( 'uk.ac.ebi.ena.sequence:sequencetools:2.0.86' )
implementation( 'uk.ac.ebi.ena.txmbtools:txmbtools:1.0.3' )
implementation( 'uk.ac.ebi.ena:readtools:1.6.1' )
implementation( 'uk.ac.ebi.ena:readtools:1.8.0' )
implementation( 'org.springframework.boot:spring-boot-starter' )
implementation( 'org.springframework.boot:spring-boot-starter-web' ) {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
......
......@@ -100,6 +100,34 @@ public abstract class SequenceToolsXmlWriter<M extends Manifest, R extends Valid
for (Element e : createXmlFileElements(manifest, inputDir, uploadDir)) filesE.addContent(e);
Element analysisAttributesE = new Element("ANALYSIS_ATTRIBUTES");
if (manifest.getSubmissionTool() != null && !manifest.getSubmissionTool().isEmpty()) {
Element submissionToolAnalysisAttributeTagE = new Element("TAG").setText("SUBMISSION_TOOL");
Element submissionToolAnalysisAttributeValueE = new Element("VALUE").setText(manifest.getSubmissionTool());
Element submissionToolAnalysisAttributeE = new Element("ANALYSIS_ATTRIBUTE");
submissionToolAnalysisAttributeE.addContent(submissionToolAnalysisAttributeTagE);
submissionToolAnalysisAttributeE.addContent(submissionToolAnalysisAttributeValueE);
analysisAttributesE.addContent(submissionToolAnalysisAttributeE);
}
if (manifest.getSubmissionToolVersion() != null && !manifest.getSubmissionToolVersion().isEmpty()) {
Element submissionToolVersionAnalysisAttributeTagE = new Element("TAG").setText("SUBMISSION_TOOL_VERSION");
Element submissionToolVersionAnalysisAttributeValueE = new Element("VALUE").setText(manifest.getSubmissionToolVersion());
Element submissionToolVersionAnalysisAttributeE = new Element("ANALYSIS_ATTRIBUTE");
submissionToolVersionAnalysisAttributeE.addContent(submissionToolVersionAnalysisAttributeTagE);
submissionToolVersionAnalysisAttributeE.addContent(submissionToolVersionAnalysisAttributeValueE);
analysisAttributesE.addContent(submissionToolVersionAnalysisAttributeE);
}
if (analysisAttributesE.getContentSize() > 0) {
analysisE.addContent(analysisAttributesE);
}
XMLOutputter xmlOutput = new XMLOutputter();
xmlOutput.setFormat(Format.getPrettyFormat());
StringWriter stringWriter = new StringWriter();
......
......@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.Map;
import uk.ac.ebi.ena.webin.cli.WebinCliMessage;
import uk.ac.ebi.ena.webin.cli.context.reads.ReadsManifestReader;
import uk.ac.ebi.ena.webin.cli.manifest.*;
import uk.ac.ebi.ena.webin.cli.manifest.processor.*;
import uk.ac.ebi.ena.webin.cli.validator.file.SubmissionFile;
......@@ -47,6 +48,8 @@ GenomeManifestReader extends ManifestReader<GenomeManifest> {
String AGP = "AGP";
String AUTHORS = "AUTHORS";
String ADDRESS = "ADDRESS";
String SUBMISSION_TOOL = "SUBMISSION_TOOL";
String SUBMISSION_TOOL_VERSION = "SUBMISSION_TOOL_VERSION";
}
......@@ -73,6 +76,8 @@ GenomeManifestReader extends ManifestReader<GenomeManifest> {
String AGP = "AGP file";
String AUTHORS = "For submission brokers only. Submitter's names as a comma-separated list";
String ADDRESS = "For submission brokers only. Submitter's address";
String SUBMISSION_TOOL = "Name of third-party or developed tool used to submit to ENA";
String SUBMISSION_TOOL_VERSION = "Version number of the third-party or developed tool used to submit to ENA";
}
......@@ -129,7 +134,9 @@ GenomeManifestReader extends ManifestReader<GenomeManifest> {
.file().optional().name( Field.UNLOCALISED_LIST ).desc( Description.UNLOCALISED_LIST ).processor( getUnlocalisedListProcessors() ).and()
.meta().optional().name( Field.TPA ).desc( Description.TPA ).processor( CVFieldProcessor.CV_BOOLEAN ).and()
.meta().optional().name( Field.AUTHORS ).desc( Description.AUTHORS ).processor(new AuthorProcessor()).and()
.meta().optional().name( Field.ADDRESS ).desc( Description.ADDRESS )
.meta().optional().name( Field.ADDRESS ).desc( Description.ADDRESS ).and()
.meta().optional().name(ReadsManifestReader.Field.SUBMISSION_TOOL).desc(ReadsManifestReader.Description.SUBMISSION_TOOL).and()
.meta().optional().name(ReadsManifestReader.Field.SUBMISSION_TOOL_VERSION).desc(ReadsManifestReader.Description.SUBMISSION_TOOL_VERSION)
.build()
,
// File groups.
......@@ -242,6 +249,9 @@ GenomeManifestReader extends ManifestReader<GenomeManifest> {
manifest.setTpa( getAndValidateBoolean( getManifestReaderResult().getField( Field.TPA ) ) );
}
manifest.setSubmissionTool(getManifestReaderResult().getValue(ReadsManifestReader.Field.SUBMISSION_TOOL));
manifest.setSubmissionToolVersion(getManifestReaderResult().getValue(ReadsManifestReader.Field.SUBMISSION_TOOL_VERSION));
SubmissionFiles<GenomeManifest.FileType> submissionFiles = manifest.files();
getFiles( getInputDir(), getManifestReaderResult(), Field.FASTA ).forEach(fastaFile -> submissionFiles.add( new SubmissionFile( GenomeManifest.FileType.FASTA, fastaFile ) ) );
......
......@@ -44,6 +44,8 @@ ReadsManifestReader extends ManifestReader<ReadsManifest> {
String FASTQ = "FASTQ";
String BAM = "BAM";
String CRAM = "CRAM";
String SUBMISSION_TOOL = "SUBMISSION_TOOL";
String SUBMISSION_TOOL_VERSION = "SUBMISSION_TOOL_VERSION";
}
public interface Description {
......@@ -64,6 +66,8 @@ ReadsManifestReader extends ManifestReader<ReadsManifest> {
String FASTQ = "Fastq file";
String BAM = "BAM file";
String CRAM = "CRAM file";
String SUBMISSION_TOOL = "Name of third-party or developed tool used to submit to ENA";
String SUBMISSION_TOOL_VERSION = "Version number of the third-party or developed tool used to submit to ENA";
}
private final static String INSTRUMENT_UNSPECIFIED = "unspecified";
......@@ -108,7 +112,10 @@ ReadsManifestReader extends ManifestReader<ReadsManifest> {
.file().optional().name(Field.BAM).desc(Description.BAM).processor(getBamProcessors()).and()
.file().optional().name(Field.CRAM).desc(Description.CRAM).processor(getCramProcessors()).and()
.meta().optional().hidden().name(Field.QUALITY_SCORE).desc(Description.QUALITY_SCORE).processor(new CVFieldProcessor(CV_QUALITY_SCORE)).and()
.meta().optional().hidden().name(Field.__HORIZON).desc(Description.__HORIZON).build()
.meta().optional().hidden().name(Field.__HORIZON).desc(Description.__HORIZON).and()
.meta().optional().name(Field.SUBMISSION_TOOL).desc(Description.SUBMISSION_TOOL).and()
.meta().optional().name(Field.SUBMISSION_TOOL_VERSION).desc(Description.SUBMISSION_TOOL_VERSION)
.build()
,
// File groups.
new ManifestFileCount.Builder()
......@@ -193,6 +200,9 @@ ReadsManifestReader extends ManifestReader<ReadsManifest> {
if (getManifestReaderResult().getCount(Field.__HORIZON) > 0)
manifest.setPairingHorizon(getAndValidatePositiveInteger(getManifestReaderResult().getField(Field.__HORIZON)));
manifest.setSubmissionTool(getManifestReaderResult().getValue(Field.SUBMISSION_TOOL));
manifest.setSubmissionToolVersion(getManifestReaderResult().getValue(Field.SUBMISSION_TOOL_VERSION));
processInstrumentAndPlatform();
SubmissionFiles<ReadsManifest.FileType> submissionFiles = manifest.files();
......
......@@ -153,6 +153,34 @@ public class ReadsXmlWriter implements XmlWriter<ReadsManifest, ReadsValidationR
instrumentModelE.setText(instrument);
platformRefE.addContent(instrumentModelE);
Element expAttributesE = new Element("EXPERIMENT_ATTRIBUTES");
if (manifest.getSubmissionTool() != null && !manifest.getSubmissionTool().isEmpty()) {
Element submissionToolExpAttributeTagE = new Element("TAG").setText("SUBMISSION_TOOL");
Element submissionToolExpAttributeValueE = new Element("VALUE").setText(manifest.getSubmissionTool());
Element submissionToolExpAttributeE = new Element("EXPERIMENT_ATTRIBUTE");
submissionToolExpAttributeE.addContent(submissionToolExpAttributeTagE);
submissionToolExpAttributeE.addContent(submissionToolExpAttributeValueE);
expAttributesE.addContent(submissionToolExpAttributeE);
}
if (manifest.getSubmissionToolVersion() != null && !manifest.getSubmissionToolVersion().isEmpty()) {
Element submissionToolVersionExpAttributeTagE = new Element("TAG").setText("SUBMISSION_TOOL_VERSION");
Element submissionToolVersionExpAttributeValueE = new Element("VALUE").setText(manifest.getSubmissionToolVersion());
Element submissionToolVersionExpAttributeE = new Element("EXPERIMENT_ATTRIBUTE");
submissionToolVersionExpAttributeE.addContent(submissionToolVersionExpAttributeTagE);
submissionToolVersionExpAttributeE.addContent(submissionToolVersionExpAttributeValueE);
expAttributesE.addContent(submissionToolVersionExpAttributeE);
}
if (expAttributesE.getContentSize() > 0) {
experimentE.addContent(expAttributesE);
}
XMLOutputter xmlOutput = new XMLOutputter();
xmlOutput.setFormat(Format.getPrettyFormat());
StringWriter stringWriter = new StringWriter();
......@@ -207,6 +235,34 @@ public class ReadsXmlWriter implements XmlWriter<ReadsManifest, ReadsValidationR
.forEach(
file -> filesE.addContent(createFileElement(inputDir, uploadDir, file, "fastq")));
Element runAttributesE = new Element("RUN_ATTRIBUTES");
if (manifest.getSubmissionTool() != null && !manifest.getSubmissionTool().isEmpty()) {
Element submissionToolRunAttributeTagE = new Element("TAG").setText("SUBMISSION_TOOL");
Element submissionToolRunAttributeValueE = new Element("VALUE").setText(manifest.getSubmissionTool());
Element submissionToolRunAttributeE = new Element("RUN_ATTRIBUTE");
submissionToolRunAttributeE.addContent(submissionToolRunAttributeTagE);
submissionToolRunAttributeE.addContent(submissionToolRunAttributeValueE);
runAttributesE.addContent(submissionToolRunAttributeE);
}
if (manifest.getSubmissionToolVersion() != null && !manifest.getSubmissionToolVersion().isEmpty()) {
Element submissionToolVersionRunAttributeTagE = new Element("TAG").setText("SUBMISSION_TOOL_VERSION");
Element submissionToolVersionRunAttributeValueE = new Element("VALUE").setText(manifest.getSubmissionToolVersion());
Element submissionToolVersionRunAttributeE = new Element("RUN_ATTRIBUTE");
submissionToolVersionRunAttributeE.addContent(submissionToolVersionRunAttributeTagE);
submissionToolVersionRunAttributeE.addContent(submissionToolVersionRunAttributeValueE);
runAttributesE.addContent(submissionToolVersionRunAttributeE);
}
if (runAttributesE.getContentSize() > 0) {
runE.addContent(runAttributesE);
}
XMLOutputter xmlOutput = new XMLOutputter();
xmlOutput.setFormat(Format.getPrettyFormat());
StringWriter stringWriter = new StringWriter();
......
......@@ -13,6 +13,7 @@ package uk.ac.ebi.ena.webin.cli.context.sequence;
import java.util.Map;
import uk.ac.ebi.ena.webin.cli.WebinCliMessage;
import uk.ac.ebi.ena.webin.cli.context.reads.ReadsManifestReader;
import uk.ac.ebi.ena.webin.cli.manifest.*;
import uk.ac.ebi.ena.webin.cli.manifest.processor.*;
import uk.ac.ebi.ena.webin.cli.validator.file.SubmissionFile;
......@@ -34,6 +35,8 @@ SequenceManifestReader extends ManifestReader<SequenceManifest>
String FLATFILE = "FLATFILE";
String AUTHORS = "AUTHORS";
String ADDRESS = "ADDRESS";
String SUBMISSION_TOOL = "SUBMISSION_TOOL";
String SUBMISSION_TOOL_VERSION = "SUBMISSION_TOOL_VERSION";
}
......@@ -49,6 +52,8 @@ SequenceManifestReader extends ManifestReader<SequenceManifest>
String FLATFILE = "Flat file";
String AUTHORS = "For submission brokers only. Submitter's names as a comma-separated list";
String ADDRESS = "For submission brokers only. Submitter's address";
String SUBMISSION_TOOL = "Name of third-party or developed tool used to submit to ENA";
String SUBMISSION_TOOL_VERSION = "Version number of the third-party or developed tool used to submit to ENA";
}
private final SequenceManifest manifest = new SequenceManifest();
......@@ -67,7 +72,9 @@ SequenceManifestReader extends ManifestReader<SequenceManifest>
.file().optional().name( Field.TAB ).desc( Description.TAB ).processor( getTabProcessors() ).and()
.file().optional().name( Field.FLATFILE ).desc( Description.FLATFILE ).processor( getFlatfileProcessors() ).and()
.meta().optional().name( Field.AUTHORS ).desc( Description.AUTHORS ).processor(new AuthorProcessor()).and()
.meta().optional().name( Field.ADDRESS ).desc( Description.ADDRESS )
.meta().optional().name( Field.ADDRESS ).desc( Description.ADDRESS ).and()
.meta().optional().name(ReadsManifestReader.Field.SUBMISSION_TOOL).desc(ReadsManifestReader.Description.SUBMISSION_TOOL).and()
.meta().optional().name(ReadsManifestReader.Field.SUBMISSION_TOOL_VERSION).desc(ReadsManifestReader.Description.SUBMISSION_TOOL_VERSION)
.build()
,
// File groups.
......@@ -119,6 +126,9 @@ SequenceManifestReader extends ManifestReader<SequenceManifest>
manifest.setName(getManifestReaderResult().getValue( Field.NAME ));
manifest.setDescription(getManifestReaderResult().getValue( Field.DESCRIPTION ));
manifest.setSubmissionTool(getManifestReaderResult().getValue(ReadsManifestReader.Field.SUBMISSION_TOOL));
manifest.setSubmissionToolVersion(getManifestReaderResult().getValue(ReadsManifestReader.Field.SUBMISSION_TOOL_VERSION));
SubmissionFiles<SequenceManifest.FileType> submissionFiles = manifest.files();
getFiles( getInputDir(), getManifestReaderResult(), Field.TAB ).forEach(fastaFile-> submissionFiles.add( new SubmissionFile( SequenceManifest.FileType.TAB,fastaFile ) ) );
......
......@@ -13,6 +13,7 @@ package uk.ac.ebi.ena.webin.cli.context.transcriptome;
import java.util.Map;
import uk.ac.ebi.ena.webin.cli.WebinCliMessage;
import uk.ac.ebi.ena.webin.cli.context.reads.ReadsManifestReader;
import uk.ac.ebi.ena.webin.cli.manifest.*;
import uk.ac.ebi.ena.webin.cli.manifest.processor.*;
import uk.ac.ebi.ena.webin.cli.validator.file.SubmissionFile;
......@@ -40,6 +41,8 @@ TranscriptomeManifestReader extends ManifestReader<TranscriptomeManifest>
String AUTHORS = "AUTHORS";
String ADDRESS = "ADDRESS";
String ASSEMBLY_TYPE = "ASSEMBLY_TYPE";
String SUBMISSION_TOOL = "SUBMISSION_TOOL";
String SUBMISSION_TOOL_VERSION = "SUBMISSION_TOOL_VERSION";
}
......@@ -61,6 +64,8 @@ TranscriptomeManifestReader extends ManifestReader<TranscriptomeManifest>
String AUTHORS = "For submission brokers only. Submitter's names as a comma-separated list";
String ADDRESS = "For submission brokers only. Submitter's address";
String ASSEMBLY_TYPE = "Assembly type";
String SUBMISSION_TOOL = "Name of third-party or developed tool used to submit to ENA";
String SUBMISSION_TOOL_VERSION = "Version number of the third-party or developed tool used to submit to ENA";
}
private static final ManifestCVList CV_ASSEMBLY_TYPE = new ManifestCVList(
......@@ -90,7 +95,9 @@ TranscriptomeManifestReader extends ManifestReader<TranscriptomeManifest>
.meta().optional().name( Field.TPA ).desc( Description.TPA ).processor( CVFieldProcessor.CV_BOOLEAN ).and()
.meta().optional().name( Field.AUTHORS ).desc( Description.AUTHORS ).processor(new AuthorProcessor()).and()
.meta().optional().name( Field.ADDRESS ).desc( Description.ADDRESS ).and()
.meta().required().name( Field.ASSEMBLY_TYPE ).desc( Description.ASSEMBLY_TYPE ).processor( new CVFieldProcessor( CV_ASSEMBLY_TYPE ) )
.meta().required().name( Field.ASSEMBLY_TYPE ).desc( Description.ASSEMBLY_TYPE ).processor( new CVFieldProcessor( CV_ASSEMBLY_TYPE ) ).and()
.meta().optional().name(ReadsManifestReader.Field.SUBMISSION_TOOL).desc(ReadsManifestReader.Description.SUBMISSION_TOOL).and()
.meta().optional().name(ReadsManifestReader.Field.SUBMISSION_TOOL_VERSION).desc(ReadsManifestReader.Description.SUBMISSION_TOOL_VERSION)
.build()
,
// File groups.
......@@ -161,6 +168,9 @@ TranscriptomeManifestReader extends ManifestReader<TranscriptomeManifest>
manifest.setTpa( getAndValidateBoolean( getManifestReaderResult().getField(Field.TPA ) ) );
}
manifest.setSubmissionTool(getManifestReaderResult().getValue(ReadsManifestReader.Field.SUBMISSION_TOOL));
manifest.setSubmissionToolVersion(getManifestReaderResult().getValue(ReadsManifestReader.Field.SUBMISSION_TOOL_VERSION));
SubmissionFiles<TranscriptomeManifest.FileType> submissionFiles = manifest.files();
getFiles( getInputDir(), getManifestReaderResult(), Field.FASTA ).forEach(file-> submissionFiles.add( new SubmissionFile( TranscriptomeManifest.FileType.FASTA, file ) ) );
......
......@@ -46,6 +46,8 @@ public class GenomeXmlTest {
manifest.setCoverage("1");
manifest.setProgram("test_program");
manifest.setPlatform("test_platform");
manifest.setSubmissionTool("ST-001");
manifest.setSubmissionToolVersion("STV-001");
return manifest;
}
......@@ -96,6 +98,16 @@ public class GenomeXmlTest {
+ " </SEQUENCE_ASSEMBLY>\n"
+ " </ANALYSIS_TYPE>\n"
+ " <FILES />\n"
+ " <ANALYSIS_ATTRIBUTES>\n"
+ " <ANALYSIS_ATTRIBUTE>\n"
+ " <TAG>SUBMISSION_TOOL</TAG>\n"
+ " <VALUE>ST-001</VALUE>\n"
+ " </ANALYSIS_ATTRIBUTE>\n"
+ " <ANALYSIS_ATTRIBUTE>\n"
+ " <TAG>SUBMISSION_TOOL_VERSION</TAG>\n"
+ " <VALUE>STV-001</VALUE>\n"
+ " </ANALYSIS_ATTRIBUTE>\n"
+ " </ANALYSIS_ATTRIBUTES>\n"
+ " </ANALYSIS>\n"
+ "</ANALYSIS_SET>\n");
}
......
......@@ -100,6 +100,8 @@ ReadsManifestReaderTest {
Assert.assertNull(manifest.getName());
assertThat(manifest.files().files()).size().isZero();
Assert.assertNull(manifest.getDescription());
Assert.assertNull(manifest.getSubmissionTool());
Assert.assertNull(manifest.getSubmissionToolVersion());
manifestReader.readManifest(Paths.get("."),
new ManifestBuilder()
......@@ -114,6 +116,8 @@ ReadsManifestReaderTest {
.field(Field.NAME, " SOME-FANCY-NAME")
.field(Field.DESCRIPTION, " description")
.file("BAM", TempFileBuilder.empty("bam"))
.field(Field.SUBMISSION_TOOL, "ST-001")
.field(Field.SUBMISSION_TOOL_VERSION, "STV-001")
.build());
Assert.assertEquals("ILLUMINA", manifest.getPlatform());
......@@ -127,6 +131,8 @@ ReadsManifestReaderTest {
Assert.assertEquals("SOME-FANCY-NAME", manifest.getName());
assertThat(manifest.files().files()).size().isOne();
Assert.assertEquals("description", manifest.getDescription());
Assert.assertEquals("ST-001", manifest.getSubmissionTool());
Assert.assertEquals("STV-001", manifest.getSubmissionToolVersion());
}
@Test
......
......@@ -72,6 +72,8 @@ public class ReadsXmlTest {
manifest.setLibraryStrategy("CLONEEND");
manifest.setLibrarySource("OTHER");
manifest.setLibrarySelection("Inverse rRNA selection");
manifest.setSubmissionTool("ST-001");
manifest.setSubmissionToolVersion("STV-001");
SubmissionBundle sb = prepareSubmissionBundle(manifest);
......@@ -102,10 +104,55 @@ public class ReadsXmlTest {
+ " <INSTRUMENT_MODEL>unspecified</INSTRUMENT_MODEL>\n"
+ " </ILLUMINA>\n"
+ " </PLATFORM>\n"
+ " <EXPERIMENT_ATTRIBUTES>\n"
+ " <EXPERIMENT_ATTRIBUTE>\n"
+ " <TAG>SUBMISSION_TOOL</TAG>\n"
+ " <VALUE>ST-001</VALUE>\n"
+ " </EXPERIMENT_ATTRIBUTE>\n"
+ " <EXPERIMENT_ATTRIBUTE>\n"
+ " <TAG>SUBMISSION_TOOL_VERSION</TAG>\n"
+ " <VALUE>STV-001</VALUE>\n"
+ " </EXPERIMENT_ATTRIBUTE>\n"
+ " </EXPERIMENT_ATTRIBUTES>\n"
+ " </EXPERIMENT>\n"
+ "</EXPERIMENT_SET>");
}
@Test
public void testRun() {
ReadsManifest manifest = getDefaultManifest();
manifest.setPlatform("ILLUMINA");
manifest.setInstrument("unspecified");
manifest.setSubmissionTool("ST-001");
manifest.setSubmissionToolVersion("STV-001");
SubmissionBundle sb = prepareSubmissionBundle(manifest);
String runXml = sb.getXMLFile(SubmissionBundle.SubmissionXMLFileType.RUN).getXml();
XmlTester.assertXml(
runXml,
"<RUN_SET>\n"
+ " <RUN>\n"
+ " <TITLE>Raw reads: test_reads</TITLE>\n"
+ " <EXPERIMENT_REF refname=\"webin-reads-test_reads\"/>\n"
+ " <DATA_BLOCK>\n"
+ " <FILES/>\n"
+ " </DATA_BLOCK>\n"
+ " <RUN_ATTRIBUTES>\n"
+ " <RUN_ATTRIBUTE>\n"
+ " <TAG>SUBMISSION_TOOL</TAG>\n"
+ " <VALUE>ST-001</VALUE>\n"
+ " </RUN_ATTRIBUTE>\n"
+ " <RUN_ATTRIBUTE>\n"
+ " <TAG>SUBMISSION_TOOL_VERSION</TAG>\n"
+ " <VALUE>STV-001</VALUE>\n"
+ " </RUN_ATTRIBUTE>\n"
+ " </RUN_ATTRIBUTES>\n"
+ " </RUN>\n"
+ "</RUN_SET>");
}
@Test
public void testRunWithCramFile() {
ReadsManifest manifest = getDefaultManifest();
......
......@@ -42,6 +42,8 @@ public class SequenceXmlTest {
manifest.setStudy(new Study());
manifest.getStudy().setBioProjectId("test_study");
manifest.setDescription("test_description");
manifest.setSubmissionTool("ST-001");
manifest.setSubmissionToolVersion("STV-001");
return manifest;
}
......@@ -86,6 +88,16 @@ public class SequenceXmlTest {
+ "<SEQUENCE_FLATFILE/>\n"
+ "</ANALYSIS_TYPE>\n"
+ " <FILES />\n"
+ " <ANALYSIS_ATTRIBUTES>\n"
+ " <ANALYSIS_ATTRIBUTE>\n"
+ " <TAG>SUBMISSION_TOOL</TAG>\n"
+ " <VALUE>ST-001</VALUE>\n"
+ " </ANALYSIS_ATTRIBUTE>\n"
+ " <ANALYSIS_ATTRIBUTE>\n"
+ " <TAG>SUBMISSION_TOOL_VERSION</TAG>\n"
+ " <VALUE>STV-001</VALUE>\n"
+ " </ANALYSIS_ATTRIBUTE>\n"
+ " </ANALYSIS_ATTRIBUTES>\n"
+ "</ANALYSIS>\n"
+ "</ANALYSIS_SET>");
}
......
......@@ -47,6 +47,8 @@ public class TranscriptomeXmlTest {
manifest.getStudy().setBioProjectId("test_study");
manifest.setProgram("test_program");
manifest.setPlatform("test_platform");
manifest.setSubmissionTool("ST-001");
manifest.setSubmissionToolVersion("STV-001");
return manifest;
}
......@@ -96,6 +98,16 @@ public class TranscriptomeXmlTest {
+ " </TRANSCRIPTOME_ASSEMBLY>\n"
+ " </ANALYSIS_TYPE>\n"
+ " <FILES />\n"
+ " <ANALYSIS_ATTRIBUTES>\n"
+ " <ANALYSIS_ATTRIBUTE>\n"
+ " <TAG>SUBMISSION_TOOL</TAG>\n"
+ " <VALUE>ST-001</VALUE>\n"
+ " </ANALYSIS_ATTRIBUTE>\n"
+ " <ANALYSIS_ATTRIBUTE>\n"
+ " <TAG>SUBMISSION_TOOL_VERSION</TAG>\n"
+ " <VALUE>STV-001</VALUE>\n"
+ " </ANALYSIS_ATTRIBUTE>\n"
+ " </ANALYSIS_ATTRIBUTES>\n"
+ " </ANALYSIS>\n"
+ "</ANALYSIS_SET>\n");
}
......
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