Skip to content

Commit

Permalink
Changing htsjdk to produce sam version 1.6 (#1211)
Browse files Browse the repository at this point in the history
* Changing htsjdk to produce sam version 1.6

* Htsjdk has technically been producing Sam version 1.6 since support for long cigars was added.
* Updating that list of acceptable versions to include 1.6 and setting the header version of new bams to 1.6.
* There is a known issue with writing utf-8 characters in the sam header, this is now allowed for some fields but not handled correctly. See #1202
  • Loading branch information
lbergelson authored Nov 7, 2018
1 parent 4408649 commit 393f2c0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/main/java/htsjdk/samtools/SAMFileHeader.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public class SAMFileHeader extends AbstractSAMHeaderRecord
public static final String VERSION_TAG = "VN";
public static final String SORT_ORDER_TAG = "SO";
public static final String GROUP_ORDER_TAG = "GO";
public static final String CURRENT_VERSION = "1.5";
public static final Set<String> ACCEPTABLE_VERSIONS = CollectionUtil.makeSet("1.0", "1.3", "1.4", "1.5");
public static final String CURRENT_VERSION = "1.6";
public static final Set<String> ACCEPTABLE_VERSIONS = CollectionUtil.makeSet("1.0", "1.3", "1.4", "1.5", CURRENT_VERSION );

private SortOrder sortOrder = null;
private GroupOrder groupOrder = null;
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/htsjdk/samtools/ValidateSamFileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ public void testHeaderVersions() throws Exception {
}

// Test an unacceptable version
testHeaderVersion("1.6", false);
testHeaderVersion("1.1", false);
}

@Test(enabled = false)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@HD VN:1.5 GO:none SO:coordinate
@HD VN:1.6 GO:none SO:coordinate
@SQ SN:chrM LN:16571 AS:HG18 UR:/seq/references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta M5:d2ed829b8a1628d16cbeee88e88e39eb SP:Homo sapiens
@RG ID:1 PL:ILLUMINA SM:sample1
@PG ID:1 PN:something
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@HD VN:1.0 GO:none SO:coordinate
@HD VN:1.6 GO:none SO:coordinate
@SQ SN:chrM LN:16571 AS:HG18 UR:/seq/references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta M5:d2ed829b8a1628d16cbeee88e88e39eb SP:Homo sapiens
@RG ID:1 SM:sample1 PL:ILLUMINA
@PG ID:1 PN:A
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@HD VN:1.5 GO:none SO:coordinate
@HD VN:1.6 GO:none SO:coordinate
@SQ SN:chrM LN:16571 AS:HG18 UR:/seq/references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta M5:d2ed829b8a1628d16cbeee88e88e39eb SP:Homo sapiens
@RG ID:1 PL:ILLUMINA SM:sample1
@RG ID:1.1 PL:ILLUMINA SM:sample2
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/htsjdk/samtools/roundtrip.sam
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@HD VN:1.5 SO:unsorted
@HD VN:1.6 SO:unsorted
@SQ SN:chr1 LN:101
@SQ SN:chr2 LN:101
@SQ SN:chr3 LN:101
Expand Down

0 comments on commit 393f2c0

Please sign in to comment.