Skip to content

Commit 3cdd880

Browse files
committed
Fix merge conflicts
2 parents 0ff913a + 6178d86 commit 3cdd880

File tree

17 files changed

+97
-49
lines changed

17 files changed

+97
-49
lines changed

.github/workflows/sync-repos.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ on:
44
- cron: "10 */3 * * *"
55
jobs:
66
sync-release-branches:
7-
if: github.repository == 'BimberLab/DiscvrLabkeyModules'
7+
if: github.repository == 'BimberLab/DiscvrLabKeyModules'
88
runs-on: ubuntu-latest
99
steps:
1010
- name: "Sync Release Branches"
1111
uses: bimberlabinternal/DevOps/githubActions/branch-create@master
1212
with:
13-
source_repo: "labkey/DiscvrLabkeyModules"
13+
source_repo: "labkey/DiscvrLabKeyModules"
1414
source_branch_prefix: "release"
15-
destination_repo: "BimberLab/DiscvrLabkeyModules"
15+
destination_repo: "BimberLab/DiscvrLabKeyModules"
1616
destination_branch_prefix: "discvr-"
1717
github_token: ${{ secrets.GITHUB_TOKEN }}
1818
sync-develop:
19-
if: github.repository == 'BimberLab/DiscvrLabkeyModules'
19+
if: github.repository == 'BimberLab/DiscvrLabKeyModules'
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: "Sync Develop Branch"
2323
uses: bimberlabinternal/DevOps/githubActions/git-sync@master
2424
with:
25-
source_repo: "labkey/DiscvrLabkeyModules"
25+
source_repo: "labkey/DiscvrLabKeyModules"
2626
source_branch: "develop"
2727
destination_branch: "develop"
2828
github_token: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ cache:
1414
- $HOME/.gradle/caches/
1515
- $HOME/.gradle/wrapper/
1616
- $HOME/.m2
17-
- $HOME/labkey_build/
1817
- $HOME/site-library
1918

2019
install: skip

SequenceAnalysis/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ dependencies {
2929
external("com.github.broadinstitute:picard:2.18.4") {
3030
exclude group: "javax.servlet", module: "servlet-api"
3131
}
32+
33+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:LabDevKitModules:laboratory", depProjectConfig: "published", depExtension: "module")
34+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: "published", depExtension: "module")
3235
}
3336

3437
if (project.findProject(BuildUtils.getTestProjectPath(project.gradle)) != null && project.hasProperty("teamcity"))

SequenceAnalysis/module.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
ModuleClass: org.labkey.sequenceanalysis.SequenceAnalysisModule
2-
ModuleDependencies: Pipeline, FileContent, Experiment, LDK, Laboratory
32
ConsolidateScripts: false
43
ManageVersion: false

SequenceAnalysis/src/org/labkey/sequenceanalysis/SequenceAnalysisController.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
import org.labkey.sequenceanalysis.pipeline.ImportGenomeTrackPipelineJob;
144144
import org.labkey.sequenceanalysis.pipeline.OrphanFilePipelineJob;
145145
import org.labkey.sequenceanalysis.pipeline.ReadsetImportJob;
146+
import org.labkey.sequenceanalysis.pipeline.ReferenceGenomeImpl;
146147
import org.labkey.sequenceanalysis.pipeline.ReferenceLibraryPipelineJob;
147148
import org.labkey.sequenceanalysis.pipeline.SequenceAlignmentJob;
148149
import org.labkey.sequenceanalysis.pipeline.SequenceConcatPipelineJob;
@@ -2807,6 +2808,22 @@ protected File getTargetFile(String filename) throws IOException
28072808
}
28082809
}
28092810

2811+
@Override
2812+
public void validateCommand(ImportTrackForm form, Errors errors)
2813+
{
2814+
super.validateCommand(form, errors);
2815+
2816+
//ensure has write access in genome container
2817+
if (form.getLibraryId() != null)
2818+
{
2819+
Container genomeFolder = ReferenceGenomeImpl.getFolderForGenome(form.getLibraryId());
2820+
if (genomeFolder != null && !genomeFolder.hasPermission(getUser(), UpdatePermission.class))
2821+
{
2822+
throw new UnauthorizedException("The current user does not have permission to update genome " + form.getLibraryId() + " which is saved in the folder: " + genomeFolder.getPath());
2823+
}
2824+
}
2825+
}
2826+
28102827
@Override
28112828
public String getResponse(ImportTrackForm form, Map<String, Pair<File, String>> files) throws UploadException
28122829
{
@@ -2827,7 +2844,7 @@ public String getResponse(ImportTrackForm form, Map<String, Pair<File, String>>
28272844
Container target = getContainer().isWorkbook() ? getContainer().getParent() : getContainer();
28282845
PipeRoot root = PipelineService.get().getPipelineRootSetting(target);
28292846

2830-
//TODO: permissions on source container (shared)?
2847+
//note: permissions on source container should be checked in validate()
28312848
ImportGenomeTrackPipelineJob job = new ImportGenomeTrackPipelineJob(target, getUser(), null, root, form.getLibraryId(), form.getTrackName(), file, entry.getValue().getValue(), form.getTrackDescription(), form.getDoChrTranslation() == null ? true : form.getDoChrTranslation());
28322849
PipelineService.get().queueJob(job);
28332850

@@ -4967,6 +4984,12 @@ public ApiResponse execute(ImportTracksForm form, BindException errors) throws E
49674984
try
49684985
{
49694986
Container target = getContainer().isWorkbook() ? getContainer().getParent() : getContainer();
4987+
Container genomeFolder = ReferenceGenomeImpl.getFolderForGenome(o.getInt("libraryId"));
4988+
if (!genomeFolder.hasPermission(getUser(), UpdatePermission.class))
4989+
{
4990+
throw new UnauthorizedException("You do not have permission to update genome " + o.get("libraryId") + ", which is saved in the folder: " + genomeFolder.getPath());
4991+
}
4992+
49704993
ImportGenomeTrackPipelineJob job = new ImportGenomeTrackPipelineJob(target, getUser(), null, root, o.getInt("libraryId"), o.getString("name"), file, file.getName(), o.getString("description"), form.getDoChrTranslation() == null ? true : form.getDoChrTranslation());
49714994
toCreate.add(job);
49724995
}

SequenceAnalysis/src/org/labkey/sequenceanalysis/pipeline/ReferenceGenomeImpl.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@
33
import com.fasterxml.jackson.annotation.JsonIgnore;
44
import org.jetbrains.annotations.NotNull;
55
import org.jetbrains.annotations.Nullable;
6+
import org.labkey.api.data.Container;
7+
import org.labkey.api.data.ContainerManager;
8+
import org.labkey.api.data.SimpleFilter;
9+
import org.labkey.api.data.TableSelector;
610
import org.labkey.api.exp.api.ExpData;
11+
import org.labkey.api.query.FieldKey;
712
import org.labkey.api.sequenceanalysis.pipeline.AlignerIndexUtil;
813
import org.labkey.api.sequenceanalysis.pipeline.ReferenceGenome;
914
import org.labkey.api.sequenceanalysis.pipeline.SequencePipelineService;
1015
import org.labkey.api.util.FileUtil;
16+
import org.labkey.api.util.PageFlowUtil;
17+
import org.labkey.sequenceanalysis.SequenceAnalysisSchema;
1118

1219
import java.io.File;
1320

@@ -142,4 +149,11 @@ public File getAlignerIndexDir(String name)
142149
}
143150
}
144151
}
152+
153+
public static Container getFolderForGenome(int libraryId)
154+
{
155+
String containerId = new TableSelector(SequenceAnalysisSchema.getTable(SequenceAnalysisSchema.TABLE_REF_LIBRARIES), PageFlowUtil.set("container"), new SimpleFilter(FieldKey.fromString("rowid"), libraryId), null).getObject(String.class);
156+
157+
return containerId == null ? null : ContainerManager.getForId(containerId);
158+
}
145159
}

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/CombineGVCFsHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public CombineGVCFsHandler()
4545
super(ModuleLoader.getInstance().getModule(SequenceAnalysisModule.class), NAME, "This will run GATK\'s CombineGVCFs on a set of GVCF files. Note: this cannot work against any VCF file - these are primarily VCFs created using GATK\'s HaplotypeCaller.", new LinkedHashSet<>(Arrays.asList("sequenceanalysis/panel/VariantScatterGatherPanel.js")), Arrays.asList(
4646
ToolParameterDescriptor.create("fileBaseName", "Filename", "This is the basename that will be used for the output gzipped VCF", "textfield", null, "CombinedGenotypes"),
4747
ToolParameterDescriptor.create("doCopyLocal", "Copy gVCFs To Working Directory", "If selected, the gVCFs will be copied to the working directory first, which can improve performance when working with a large set of files.", "checkbox", new JSONObject(){{
48-
put("checked", true);
49-
}}, true),
48+
put("checked", false);
49+
}}, false),
5050
ToolParameterDescriptor.create("scatterGather", "Scatter/Gather Options", "If selected, this job will be divided to run job per chromosome. The final step will take the VCF from each intermediate step and combined to make a final VCF file.", "sequenceanalysis-variantscattergatherpanel", null, false)
5151
));
5252
}

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/GenomicsDBImportHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public GenomicsDBImportHandler()
4040
super(ModuleLoader.getInstance().getModule(SequenceAnalysisModule.class), NAME, "This will run GATK\'s GenomicsDBImport on a set of GVCF files. Note: this cannot work against any VCF file - these are primarily VCFs created using GATK\'s HaplotypeCaller.", null, Arrays.asList(
4141
ToolParameterDescriptor.create("fileBaseName", "Filename", "This is the basename that will be used for the output gzipped VCF", "textfield", null, "CombinedGenotypes"),
4242
ToolParameterDescriptor.create("doCopyLocal", "Copy gVCFs To Working Directory", "If selected, the gVCFs will be copied to the working directory first, which can improve performance when working with a large set of files.", "checkbox", new JSONObject(){{
43-
put("checked", true);
43+
put("checked", false);
4444
}}, false),
4545
ToolParameterDescriptor.createCommandLineParam(CommandLineParam.create("--batch-size"), "batchSize", "Batch Size", "Batch size controls the number of samples for which readers are open at once and therefore provides a way to minimize memory consumption. However, it can take longer to complete. Use the consolidate flag if more than a hundred batches were used. This will improve feature read time. batchSize=0 means no batching (i.e. readers for all samples will be opened at once) Defaults to 0.", "ldk-integerfield", null, null),
4646
ToolParameterDescriptor.createCommandLineParam(CommandLineParam.create("--reader-threads"), "readerThreads", "Reader Threads", "How many simultaneous threads to use when opening VCFs in batches; higher values may improve performance when network latency is an issue", "ldk-integerfield", null, null)

blast/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ dependencies
55
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:LabDevKitModules:laboratory", depProjectConfig: "apiJarFile")
66
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: "apiJarFile")
77
BuildUtils.addLabKeyDependency(project: project, config: "implementation", depProjectPath: ":server:modules:DiscvrLabKeyModules:SequenceAnalysis", depProjectConfig: "apiJarFile")
8+
9+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:LabDevKitModules:laboratory", depProjectConfig: "published", depExtension: "module")
10+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:LabDevKitModules:LDK", depProjectConfig: "published", depExtension: "module")
11+
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:DiscvrLabKeyModules:SequenceAnalysis", depProjectConfig: "published", depExtension: "module")
812
}

blast/module.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
ModuleClass: org.labkey.blast.BLASTModule
2-
ModuleDependencies: FileContent, Experiment, LDK, Laboratory, SequenceAnalysis
32
ConsolidateScripts: false
43
ManageVersion: false

0 commit comments

Comments
 (0)