Skip to content

Commit

Permalink
Merge branch 'hotfix/1.1.0-beta.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-yuen committed Jan 16, 2015
2 parents 3c0a669 + 3f3ddf5 commit 5e4ae85
Show file tree
Hide file tree
Showing 42 changed files with 189 additions and 113 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<artifactId>seqware</artifactId>
<packaging>pom</packaging>
<groupId>com.github.seqware</groupId>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>

<repositories>
<repository>
Expand Down
4 changes: 2 additions & 2 deletions seqware-admin-webservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -112,7 +112,7 @@
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.6</version>
<version>2.7</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down
2 changes: 1 addition & 1 deletion seqware-archetypes/seqware-archetype-decider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<description>SeqWare Java Decider archetype</description>

<parent>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<relativePath>../../pom.xml</relativePath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<seqware-version>1.1.0-beta.0</seqware-version>
<seqware-version>1.1.0-beta.1-SNAPSHOT</seqware-version>
<workflow-version>1.0</workflow-version>
<workflow-name>${workflow-name}</workflow-name>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion seqware-archetypes/seqware-archetype-java-workflow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<description>SeqWare Java workflow archetype</description>

<parent>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<relativePath>../../pom.xml</relativePath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<seqware-version>1.1.0-beta.0</seqware-version>
<seqware-version>1.1.0-beta.1-SNAPSHOT</seqware-version>
<skipITs>true</skipITs>
<workflow-full-name>Workflow_Bundle_${workflow-name}_${workflow-version}_SeqWare_${seqware-version}</workflow-full-name>
<workflow-dir>${project.build.directory}/${workflow-full-name}/Workflow_Bundle_${workflow-name}/${workflow-version}</workflow-dir>
Expand Down
2 changes: 1 addition & 1 deletion seqware-archetypes/seqware-archetype-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<description>SeqWare module archetype</description>

<parent>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<relativePath>../../pom.xml</relativePath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<seqware-version>1.1.0-beta.0</seqware-version>
<seqware-version>1.1.0-beta.1-SNAPSHOT</seqware-version>
</properties>

<build>
Expand Down
2 changes: 1 addition & 1 deletion seqware-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<packaging>jar</packaging>

<parent>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<relativePath>../pom.xml</relativePath>
Expand Down
2 changes: 1 addition & 1 deletion seqware-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<relativePath>../pom.xml</relativePath>
Expand Down
2 changes: 1 addition & 1 deletion seqware-ext-admin-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<relativePath>../pom.xml</relativePath>
Expand Down
2 changes: 1 addition & 1 deletion seqware-ext-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<relativePath>../pom.xml</relativePath>
Expand Down
2 changes: 1 addition & 1 deletion seqware-meta-db/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion seqware-pipeline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,11 @@ private void addFileToSets(ReturnValue file, FileMetadata fm, Collection<String>
if (swid == null || swid.trim().isEmpty()) {
swid = file.getAttribute(Header.LANE_SWA.getTitle());
}
// seqware-2002 it is possible that both are null if the path goes through sample_processing
if (swid == null || swid.trim().isEmpty()) {
return;
}
workflowParentAccessionsToRun.add(swid);

}
}

Expand Down Expand Up @@ -1040,16 +1043,6 @@ private List<ReturnValue> convertFileProvenanceReport(List<Map<String, String>>
handleAttributes(map, row, Header.SEQUENCER_RUN_ATTRIBUTES, Header.SEQUENCER_RUN_TAG_PREFIX);
handleAttributes(map, row, Header.PROCESSING_ATTRIBUTES, Header.PROCESSING_TAG_PREFIX);
handleAttributes(map, row, Header.FILE_ATTRIBUTES, Header.FILE_TAG_PREFIX);

// handle additional quirks that don't belong in the files report here FindAllTheFiles
// parent sample name and parent sample swid end with ':' for some reason and OicrDecider seems to have code relying on this
String parentSampleName = map.get(Header.PARENT_SAMPLE_NAME.getTitle());
parentSampleName += ":";
map.put(Header.PARENT_SAMPLE_NAME.getTitle(), parentSampleName);
String parentSampleSWID = map.get(Header.PARENT_SAMPLE_SWA.getTitle());
parentSampleSWID += ":";
map.put(Header.PARENT_SAMPLE_SWA.getTitle(), parentSampleSWID);

}
return list;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,25 @@
package net.sourceforge.seqware.pipeline.plugins.fileprovenance;

import com.google.common.collect.ImmutableList;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import joptsimple.ArgumentAcceptingOptionSpec;
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
import net.sourceforge.seqware.common.err.NotFoundException;
import net.sourceforge.seqware.common.metadata.Metadata;
import net.sourceforge.seqware.common.model.FileProvenanceParam;
import net.sourceforge.seqware.common.model.Sample;
import net.sourceforge.seqware.common.model.SequencerRun;
import net.sourceforge.seqware.common.model.Study;
import net.sourceforge.seqware.common.util.Log;

/**
* Convenience methods that can be shared by utilities that access the FileProvenance report
Expand Down Expand Up @@ -122,16 +126,30 @@ public static Map<FileProvenanceParam, List<String>> convertOptionsToMap(OptionS
} else if (filter == HumanProvenanceFilters.STUDY_NAME) {
for (String value : (List<String>) swaValues) {
List<Study> studiesByName = metadata.getStudyByName(value);
// User must be notified if the sample name or root sample name was invalid (could not be found).
if (studiesByName == null || studiesByName.size() == 0) {
String errorText = "The study with the name \"" + value + "\" could not be found.";
Log.error(errorText);
throw new NotFoundException(errorText);
}
for (Study study : studiesByName) {
swaStrings.add(String.valueOf(study.getSwAccession()));
}

}
} else if (filter == HumanProvenanceFilters.SAMPLE_NAME || filter == HumanProvenanceFilters.ROOT_SAMPLE_NAME) {
for (String value : (List<String>) swaValues) {
List<Sample> samplesByName = metadata.getSampleByName(value);
// User must be notified if the sample name or root sample name was invalid (could not be found).
if (samplesByName == null || samplesByName.size() == 0) {
String errorText = "The sample with the name \"" + value + "\" could not be found.";
Log.error(errorText);
throw new NotFoundException(errorText);
}
for (Sample sample : samplesByName) {
swaStrings.add(String.valueOf(sample.getSwAccession()));
}

}
} else if (filter == HumanProvenanceFilters.SEQUENCER_RUN_NAME) {
for (String value : (List<String>) swaValues) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public class WorkflowApp {
public static final int THRESHOLD = Integer.valueOf(ConfigTools.getSettings()
.containsKey(SqwKeys.OOZIE_BATCH_THRESHOLD.getSettingKey()) ? ConfigTools.getSettings().get(
SqwKeys.OOZIE_BATCH_THRESHOLD.getSettingKey()) : "5");
public static final String JOB_PREFIX = "swa_";
// note: jobs must be prefixed with a valid character from the alphabet
public static final String JOB_PREFIX = "s";

private final AbstractWorkflowDataModel wfdm;
/**
Expand Down Expand Up @@ -486,7 +487,8 @@ private void handleUnattachedProvisionFileEvents(final AbstractWorkflowDataModel
if (!wfdm.getFiles().isEmpty()) {
Set<OozieJob> newParents = new LinkedHashSet<>();
for (Map.Entry<String, SqwFile> entry : wfdm.getFiles().entrySet()) {
AbstractJob abstractProvisionXJob = new BashJob("provisionFile_" + entry.getKey().replaceAll("\\.", "_"));
AbstractJob abstractProvisionXJob = new BashJob("pf" + (entry.getValue().isInput() ? "i" : "o") + "_"
+ entry.getKey().replaceAll("\\.", "_"));
abstractProvisionXJob.getFiles().add(entry.getValue());
OozieProvisionFileJob oozieProvisionXJob = new OozieProvisionFileJob(abstractProvisionXJob, entry.getValue(), JOB_PREFIX
+ workflowRunAccession + "_" + abstractProvisionXJob.getAlgo() + "_" + this.jobs.size(), this.uniqueWorkingDir,
Expand Down Expand Up @@ -581,7 +583,7 @@ private void handleAttachedProvisionFileEventsForJob(final AbstractJob job, fina
// create a provisionfile job
if (file.isInput()) {
// create a provisionFileJob;
AbstractJob abstractProvisionInJob = new BashJob("provisionFile_in");
AbstractJob abstractProvisionInJob = new BashJob("pfi");
abstractProvisionInJob.getFiles().add(file);
OozieProvisionFileJob oozieProvisionInJob = new OozieProvisionFileJob(abstractProvisionInJob, file, JOB_PREFIX
+ workflowRunAccession + "_" + abstractProvisionInJob.getAlgo() + "_" + jobs.size(), this.uniqueWorkingDir,
Expand Down Expand Up @@ -615,7 +617,7 @@ private void handleAttachedProvisionFileEventsForJob(final AbstractJob job, fina
}
} else {
// create a provisionFileJob;
AbstractJob abstractProvisionOutJob = new BashJob("provisionFile_out");
AbstractJob abstractProvisionOutJob = new BashJob("pfo");
abstractProvisionOutJob.getFiles().add(file);
OozieProvisionFileJob oozieProvisionOutJob = new OozieProvisionFileJob(abstractProvisionOutJob, file, JOB_PREFIX
+ workflowRunAccession + "_" + abstractProvisionOutJob.getAlgo() + "_" + jobs.size(), this.uniqueWorkingDir,
Expand Down Expand Up @@ -689,8 +691,7 @@ public BucketGenerator(boolean input, String uniqueName, String workflowRunAcces
* @return
*/
private BatchedOozieProvisionFileJob createBucket() {
String name = JOB_PREFIX + workflowRunAccession + "_provisionFile_" + (input ? "In" : "Out") + "_" + uniqueName + "_Batch_"
+ currentBucketCount;
String name = JOB_PREFIX + workflowRunAccession + "_pf" + (input ? "i" : "o") + "_" + uniqueName + "_b" + currentBucketCount;
currentBucketCount += BUCKET_SIZE;
AbstractJob abstractBucketJob = new BashJob(name);
currentBucket = new BatchedOozieProvisionFileJob(abstractBucketJob, name, WorkflowApp.this.uniqueWorkingDir,
Expand Down
2 changes: 1 addition & 1 deletion seqware-portal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion seqware-sanity-check/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<relativePath>../pom.xml</relativePath>
Expand Down
2 changes: 1 addition & 1 deletion seqware-webservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>com.github.seqware</groupId>
<artifactId>seqware</artifactId>
<version>1.1.0-beta.0</version>
<version>1.1.0-beta.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Loading

0 comments on commit 5e4ae85

Please sign in to comment.