Skip to content

Commit 947b6a8

Browse files
committed
Update rsync target folder
1 parent 4c8750d commit 947b6a8

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

SequenceAnalysis/api-src/org/labkey/api/sequenceanalysis/pipeline/ReferenceGenomeManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public void cacheGenomeLocally(ReferenceGenome genome, Logger log) throws Pipeli
9090

9191
File sourceDir = genome.getSourceFastaFile().getParentFile();
9292

93+
//Note: neither source nor dest have trailing slashes, so the entire source (i.e '128', gets synced into a subdir of dest)
9394
new SimpleScriptWrapper(log).execute(Arrays.asList(
9495
"rsync", "-r", "-vi", "-a", "--delete", "--delete-excluded", "--no-owner", "--no-group", sourceDir.getPath(), localCacheDir.getPath()
9596
));

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ Set<String> getContigsInInputs(List<File> inputVCFs, Logger log) throws Pipeline
335335

336336
private void copyToLevelFiles(PipelineJob job, File sourceWorkspace, File destinationWorkspace) throws IOException
337337
{
338-
job.getLogger().info("Copying top-level files");
338+
job.getLogger().info("Copying top-level files from: " + sourceWorkspace.getPath());
339339
for (String fn : Arrays.asList("callset.json", "vidmap.json", "vcfheader.vcf", "__tiledb_workspace.tdb"))
340340
{
341341
File source = new File(sourceWorkspace, fn);
@@ -537,8 +537,9 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
537537
else
538538
{
539539
ctx.getLogger().debug("Copying directory with rsync: " + sourceFolder.getPath());
540+
//NOTE: since neither path will end in slashes, rsync to the parent folder should result in the correct placement
540541
new SimpleScriptWrapper(ctx.getLogger()).execute(Arrays.asList(
541-
"rsync", "-r", "-vi", "-a", "--delete", "--delete-excluded", "--no-owner", "--no-group", sourceFolder.getPath(), destContigFolder.getPath()
542+
"rsync", "-r", "-vi", "-a", "--delete", "--delete-excluded", "--no-owner", "--no-group", sourceFolder.getPath(), destContigFolder.getParentFile().getPath()
542543
));
543544
}
544545

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,10 @@ else if (f.isDirectory() && doneFile.exists())
195195
}
196196
else
197197
{
198+
//NOTE: since neither path will end in slashes, rsync to the parent folder should result in the correct placement
198199
ctx.getLogger().debug("Copying directory with rsync: " + movedFile.getPath());
199200
new SimpleScriptWrapper(ctx.getLogger()).execute(Arrays.asList(
200-
"rsync", "-r", "-vi", "-a", "--delete", "--delete-excluded", "--no-owner", "--no-group", f.getPath(), movedFile.getPath()
201+
"rsync", "-r", "-vi", "-a", "--delete", "--delete-excluded", "--no-owner", "--no-group", f.getPath(), movedFile.getParentFile().getPath()
201202
));
202203
}
203204

0 commit comments

Comments
 (0)