Skip to content

Commit

Permalink
Merge pull request #362 from overture-stack/score-client-quality-of-l…
Browse files Browse the repository at this point in the history
…ife-changes

Updates to address #229 - #346
  • Loading branch information
dahiyaAD authored Apr 27, 2023
2 parents e8a8f47 + 598b3ca commit 9c09662
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion score-client/src/main/bin/score-client
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ CLIENT_DIR="$(cd ${BASE_DIR} && pwd -P)"
exec java -Xmx3G \
--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED \
--add-opens=java.base/java.nio=ALL-UNNAMED \
--illegal-access=deny \
-Dlogging.path=${BASE_DIR}/logs \
-Dspring.config.additional-location=${CLIENT_DIR}/conf/ \
-Dlogging.config=${CLIENT_DIR}/conf/logback.xml \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import bio.overture.score.client.exception.BadManifestException;
import bio.overture.score.client.metadata.EntityNotFoundException;
import com.beust.jcommander.*;
import htsjdk.samtools.util.Log;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
Expand Down Expand Up @@ -89,6 +90,8 @@ public class ClientMain implements CommandLineRunner {

public static void main(String[] args) {
try {
Log.setGlobalLogLevel(Log.LogLevel.ERROR);

// Bootstrap
val profiles = bootstrap(args);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ private void validateParms() {
}

checkParameter(objectId != null || sequenceFile != null || manifestResource != null,
"One of --object-id, --input-file or --manifest must be specified");
"One of --object-id, --input-file or --manifest must be specified. " +
"For CRAM files, please additionally include --reference-file.");

if (objectId == null && sequenceFile == null) {
checkParameter(manifestResource != null && outputDir != null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ public SamFileBuilder getBuilder(@NonNull SeekableStream inputStream, SeekableSt
// Since CRAM is a compressed form of BAM file that saves space by only recording
// the differences between an individual BAM file and a standard reference file.
// we need to have the reference file in order to decode the CRAM file.
if(referenceFile == null){
throw new RuntimeException("CRAM file type detected, an indexed (fai) reference file (fa, fasta) must be provided. Please specify via --reference-file.");
}
val reference = new ReferenceSource(referenceFile);
val primitiveReader = new CRAMFileReader(inputStream, indexStream,reference, ValidationStringency.DEFAULT_STRINGENCY);
val reader = new SamReader.PrimitiveSamReaderToSamReaderAdapter(
Expand Down

0 comments on commit 9c09662

Please sign in to comment.