Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches: ["**"]
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
cache: gradle
- name: Cache CRAM reference data
uses: actions/cache@v4
with:
path: ~/.cache/hts-ref
key: hts-ref
restore-keys: |
hts-ref
- name: Run tests
run: ./gradlew test
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dependencies {

implementation( group: 'com.beust', name: 'jcommander', version: '1.72' )

implementation( group: 'com.github.samtools', name: 'htsjdk', version: '4.1.0' )
implementation( group: 'com.github.samtools', name: 'htsjdk', version: '4.3.0' )

implementation( "org.jdom:jdom:2.0.2" )

Expand Down
Binary file added gradle/wrapper/gradle-wrapper-shared.jar
Binary file not shown.
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradlew
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions src/test/java/uk/ac/ebi/ena/readtools/sam/CramV31Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2010-2021 EMBL - European Bioinformatics Institute
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package uk.ac.ebi.ena.readtools.sam;

import htsjdk.samtools.SamReader;
import htsjdk.samtools.SamReaderFactory;
import htsjdk.samtools.ValidationStringency;
import htsjdk.samtools.cram.ref.ReferenceSource;
import java.io.File;
import java.nio.file.Paths;
import org.junit.Assert;
import org.junit.Test;

public class CramV31Test {
@Test
public void cramV31IsReadableWithHtsjdk() throws Exception {
File file = Paths.get("src/test/resources/rawreads/18045_1#93.v3.cram").toFile();
SamReaderFactory factory = SamReaderFactory.make();
factory.validationStringency(ValidationStringency.SILENT);
factory.referenceSource(new ReferenceSource((File) null));

try (SamReader reader = factory.open(file)) {
Assert.assertNotNull(reader.getFileHeader());
Assert.assertTrue(reader.iterator().hasNext());
}
}
}
Binary file added src/test/resources/rawreads/18045_1#93.v3.cram
Binary file not shown.