-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TASK-5513 Fix the Docker image configuration for OpenCGA analysis #2389
Closed
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c66d0e6
analysis: add docker image names in the analysis section within the c…
jtarraga 7fef49b
Merge branch 'develop' into TASK-5513
jtarraga 9608f1d
analysis: add Junit tests for samtools, fastqc, deeptools analyses, #…
jtarraga 2dd26ed
analysis: fix 'bwa mem' and add Junit tests, #TASK-5513
jtarraga 35088f6
test: add comment, #TASK-5513
jtarraga 6452f2a
Merge branch 'develop' into TASK-5513
jtarraga d3636f7
analysis: fix alignment JUnit tests, #TASK-5513
jtarraga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,21 +18,16 @@ | |
|
||
import org.opencb.biodata.models.alignment.RegionCoverage; | ||
import org.opencb.biodata.models.core.Region; | ||
import org.opencb.commons.datastore.core.Query; | ||
import org.opencb.commons.datastore.core.QueryOptions; | ||
import org.opencb.commons.utils.DockerUtils; | ||
import org.opencb.opencga.analysis.alignment.AlignmentStorageManager; | ||
import org.opencb.opencga.analysis.variant.mutationalSignature.MutationalSignatureLocalAnalysisExecutor; | ||
import org.opencb.opencga.catalog.db.api.FileDBAdaptor; | ||
import org.opencb.opencga.catalog.exceptions.CatalogException; | ||
import org.opencb.opencga.catalog.managers.FileManager; | ||
import org.opencb.opencga.core.exceptions.ToolException; | ||
import org.opencb.opencga.core.models.file.File; | ||
import org.opencb.opencga.core.response.OpenCGAResult; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Path; | ||
import java.util.*; | ||
import java.util.AbstractMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static org.opencb.opencga.core.tools.variant.InferredSexAnalysisExecutor.GRCH37_CHROMOSOMES; | ||
import static org.opencb.opencga.core.tools.variant.InferredSexAnalysisExecutor.GRCH38_CHROMOSOMES; | ||
|
@@ -92,14 +87,13 @@ public static double[] computeRatios(String study, File bamFile, String assembly | |
return new double[]{1.0d * means[1] / means[0], 1.0d * means[2] / means[0]}; | ||
} | ||
|
||
public static java.io.File plot(File inputFile, Path outDir) throws ToolException { | ||
public static java.io.File plot(File inputFile, Path outDir, String dockerImage) throws ToolException { | ||
// Execute R script in docker | ||
AbstractMap.SimpleEntry<String, String> outputBinding = new AbstractMap.SimpleEntry<>(outDir.toAbsolutePath().toString(), | ||
"/data/output"); | ||
String rParams = "R CMD Rscript --vanilla /data/input/" + inputFile.getName(); | ||
try { | ||
String cmdline = DockerUtils.run(MutationalSignatureLocalAnalysisExecutor.R_DOCKER_IMAGE, null, outputBinding, rParams, null); | ||
System.out.println("Docker command line: " + cmdline); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😎 |
||
DockerUtils.run(dockerImage, null, outputBinding, rParams, null); | ||
} catch (IOException e) { | ||
throw new ToolException(e); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of manually "moving and linking" the file, there is a method
OpenCgaTool#moveFile
that you could use, which moves, links and associates the file with the job