Commit a32a2f58 authored by Andreas Tille's avatar Andreas Tille

Imported Upstream version 2.6.3

parent 6881a000
......@@ -26,6 +26,19 @@
The NCBI SRA Software Development Kit
Contact: sra-tools@ncbi.nlm.nih.gov
NCBI External Developer Release: SRA Toolkit 2.6.3
May 25, 2016
bam-load: Corrects an optimization used to compare read lengths when lengths are greater than 255
bam-load: alignments which are below the minimum match count but with at least 1/2 of the aligned bases matching are accepted
bam-load: improved performance of SAM parsing code
bam-load: non-fatal result codes no longer cause the reader thread to quit early
bam-load: will NOT do spot assembly using hard clipped secondary alignments even when make-spots-with-secondary is enabled;
WILL do spot assembly using hard-clipped secondary alignments when defer-secondary is enabled
build: MSVS 2013 toolset (12.0) is now supported across all repositories
vdb: Fixed a bound on memory cache that would never flush under certain access modes
NCBI External Developer Release: SRA Toolkit 2.6.2
April 20, 2016
......
# NCBI External Developer Release:
## SRA Toolkit 2.6.3
**May 25, 2016**
**bam-load**: Corrects an optimization used to compare read lengths when lengths are greater than 255
**bam-load**: alignments which are below the minimum match count but with at least 1/2 of the aligned bases matching are accepted
**bam-load**: improved performance of SAM parsing code
**bam-load**: non-fatal result codes no longer cause the reader thread to quit early
**bam-load**: will NOT do spot assembly using hard clipped secondary alignments even when make-spots-with-secondary is enabled; WILL do spot assembly using hard-clipped secondary alignments when defer-secondary is enabled
**build**: MSVS 2013 toolset (12.0) is now supported across all repositories
**vdb**: Fixed a bound on memory cache that would never flush under certain access modes
## SRA Toolkit 2.6.2
**April 20, 2016**
......
################################################################################
sub PACKAGE { 'sra-tools' }
sub VERSION { '2.6.2' }
sub VERSION { '2.6.3' }
sub PACKAGE_TYPE { 'B' }
sub PACKAGE_NAME { 'SRA-TOOLS' }
sub PACKAGE_NAMW { 'SRATOOLS' }
......
general-loader.2.6.2 err: general-loader: error "something is wrong"
general-loader.2.6.2 err: error exists while reading file - load failed
general-loader.2.6.3 err: general-loader: error "something is wrong"
general-loader.2.6.3 err: error exists while reading file - load failed
general-loader.2.6.2 err: general-loader: error "something is wrong"
general-loader.2.6.2 err: error exists while reading file - load failed
general-loader.2.6.3 err: general-loader: error "something is wrong"
general-loader.2.6.3 err: error exists while reading file - load failed
#define ALIGN_INFO_VERS 0x02060002
#define ALIGN_INFO_VERS 0x02060003
......@@ -29,6 +29,7 @@ TOP ?= $(abspath ../..)
MODULE = tools/bam-loader
INT_TOOLS = \
samview
EXT_TOOLS = \
bam-load
......@@ -102,3 +103,22 @@ BAMLOAD_LIB = \
$(BINDIR)/bam-load: $(BAMLOAD_OBJ)
$(LP) --exe --vers $(SRCDIR) -o $@ $^ $(BAMLOAD_LIB)
#-------------------------------------------------------------------------------
# samview
#
SAMVIEW_SRC = \
bam \
samview
SAMVIEW_OBJ = \
$(addsuffix .$(OBJX),$(SAMVIEW_SRC))
SAMVIEW_LIB = \
-lkapp \
-sncbi-vdb \
-lm
$(BINDIR)/samview: $(SAMVIEW_OBJ)
$(LP) --exe --vers $(SRCDIR) -o $@ $^ $(SAMVIEW_LIB)
......@@ -120,18 +120,24 @@ rc_t AlignmentGetSpotKey(Alignment *const self, uint64_t * keyId)
switch (self->st) {
case 0:
rc = TableWriterAlgn_TmpKeyStart(self->tbl[tblPrimary]);
if (rc)
break;
if (self->tbl[tblPrimary]) {
rc = TableWriterAlgn_TmpKeyStart(self->tbl[tblPrimary]);
if (rc)
break;
}
self->rowId = 0;
++self->st;
case 1:
rc = TableWriterAlgn_TmpKey(self->tbl[tblPrimary], ++self->rowId, keyId);
if (rc == 0)
break;
++self->st;
if (GetRCState(rc) != rcNotFound || GetRCObject(rc) != rcRow || self->tbl[tblSecondary] == NULL)
break;
if (self->tbl[tblPrimary]) {
rc = TableWriterAlgn_TmpKey(self->tbl[tblPrimary], ++self->rowId, keyId);
if (rc == 0)
break;
++self->st;
if (GetRCState(rc) != rcNotFound || GetRCObject(rc) != rcRow || self->tbl[tblSecondary] == NULL)
break;
}
else
++self->st;
case 2:
rc = TableWriterAlgn_TmpKeyStart(self->tbl[tblSecondary]);
if (rc)
......@@ -167,7 +173,7 @@ rc_t AlignmentWriteSpotId(Alignment * const self, int64_t const spotId)
rc_t AlignmentWhack(Alignment * const self, bool const commit)
{
rc_t const rc = TableWriterAlgn_Whack(self->tbl[tblPrimary], commit, NULL);
rc_t const rc = self->tbl[tblPrimary] ? TableWriterAlgn_Whack(self->tbl[tblPrimary], commit, NULL) : 0;
rc_t const rc2 = self->tbl[tblSecondary] ? TableWriterAlgn_Whack(self->tbl[tblSecondary], commit | (rc == 0), NULL) : 0;
VDatabaseRelease(self->db);
......
This diff is collapsed.
......@@ -317,9 +317,9 @@ rc_t BAM_AlignmentGetCigar ( const BAM_Alignment *self,
rc_t BAM_AlignmentGetInsertSize ( const BAM_Alignment *self, int64_t *size );
rc_t BAM_AlignmentFormatSAM(const BAM_Alignment *self,
size_t *actsize,
size_t maxsize,
char *buffer);
size_t *actsize,
size_t maxsize,
char *buffer);
/* OptDataForEach
* DANGER
......
This diff is collapsed.
......@@ -416,16 +416,14 @@ rc_t ReferenceAddCoverage(Reference *const self,
{
unsigned const refEnd = refStart + refLength;
if (refLength == 0) /* this happens for insert-only alignments */
return 0;
if (refEnd > self->endPos) {
if (refEnd > self->endPos || self->endPos == 0) {
unsigned const t1 = refEnd + (G.maxSeqLen - 1);
unsigned const adjust = t1 % G.maxSeqLen;
unsigned const newEndPos = t1 - adjust;
unsigned const t2 = t1 - adjust;
unsigned const newEndPos = t2 != 0 ? t2 : G.maxSeqLen;
unsigned const baseCount = self->endPos - self->curPos;
unsigned const newBaseCount = newEndPos - self->curPos;
BAIL_ON_FAIL(KDataBufferResize(&self->coverage, newBaseCount));
BAIL_ON_FAIL(KDataBufferResize(&self->mismatches, newBaseCount));
BAIL_ON_FAIL(KDataBufferResize(&self->indels, newBaseCount));
......@@ -561,6 +559,11 @@ rc_t ReferenceRead(Reference *self, AlignmentRecord *data, uint64_t const pos,
return 0;
}
rc_t ReferenceGetSequence(Reference *self, char *rslt, unsigned position, unsigned nCIGAR, unsigned *CIGAR)
{
return ReferenceSeq_Read(self->rseq, rslt, position, nCIGAR, CIGAR);
}
static rc_t IdVecAppend(KDataBuffer *vec, uint64_t id)
{
uint64_t const end = vec->elem_count;
......
......@@ -73,4 +73,6 @@ rc_t ReferenceRead(Reference *self, AlignmentRecord *data, uint64_t pos,
uint8_t rna_orient, uint32_t *matches, uint32_t *misses);
rc_t ReferenceWhack(Reference *self, bool commit);
rc_t ReferenceGetSequence(Reference *self, char *rslt, unsigned position, unsigned nCIGAR, unsigned *CIGAR);
#endif
/* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It was written as part of
* the author's official duties as a United States Government employee and
* thus cannot be copyrighted. This software/database is freely available
* to the public for use. The National Library of Medicine and the U.S.
* Government have not placed any restriction on its use or reproduction.
*
* Although all reasonable efforts have been taken to ensure the accuracy
* and reliability of the software and data, the NLM and the U.S.
* Government do not and cannot warrant the performance or results that
* may be obtained by using this software or data. The NLM and the U.S.
* Government disclaim all warranties, express or implied, including
* warranties of performance, merchantability or fitness for any particular
* purpose.
*
* Please cite the author in any work or product based on this material.
*
* ===========================================================================
*
*/
#include <kapp/args.h>
#include <kapp/main.h>
#include <klib/log.h>
#include <kfs/file.h>
#include <stdlib.h>
#include <stdio.h>
#include "bam.h"
#include <klib/rc.h>
static void writeHeader(BAM_File const *const bam)
{
char const *header = NULL;
size_t hsize = 0;
BAM_FileGetHeaderText(bam, &header, &hsize);
fwrite(header, 1, hsize, stdout);
}
static rc_t writeSAM(BAM_Alignment const *const rec)
{
static char buffer[64*1024];
size_t actsize = 0;
rc_t const rc = BAM_AlignmentFormatSAM(rec, &actsize, sizeof(buffer), buffer);
if (rc == 0)
fwrite(buffer, 1, actsize, stdout);
return rc;
}
static
void samview(char const path[])
{
BAM_File const *bam = NULL;
rc_t rc = BAM_FileMake(&bam, NULL, NULL, path);
if (rc == 0) {
BAM_Alignment const *rec = NULL;
writeHeader(bam);
while ((rc = BAM_FileRead2(bam, &rec)) == 0) {
rc_t const rc2 = writeSAM(rec);
BAM_AlignmentRelease(rec);
if (rc2)
break;
}
BAM_FileRelease(bam);
if (GetRCObject(rc) == rcRow && GetRCState(rc) == rcNotFound)
rc = 0;
}
if (rc)
LOGERR(klogWarn, rc, "Final RC");
}
rc_t CC UsageSummary(char const *name)
{
return 0;
}
rc_t CC Usage(Args const *args)
{
return 0;
}
ver_t CC KAppVersion(void)
{
return 0;
}
rc_t CC KMain(int argc, char *argv[])
{
if (argc == 1) {
samview("/dev/stdin");
return 0;
}
while (--argc) {
samview(*++argv);
}
return 0;
}
#define CACHE_MGR_VERS 0x02060002
#define CACHE_MGR_VERS 0x02060003
#define LATF_LOAD_VERS 0x02060002
#define LATF_LOAD_VERS 0x02060003
#define SRA_FUSER_TEST_VERS 0x02060002
#define SRA_FUSER_TEST_VERS 0x02060003
#define GENERAL_LOADER_VERS 0x02060002
#define GENERAL_LOADER_VERS 0x02060003
#define KAR_VERS 0x02060002
#define KAR_VERS 0x02060003
#define SRA_KAR_VERS 0x02060002
#define SRA_KAR_VERS 0x02060003
#define PREFETCH_VERS 0x02060002
#define PREFETCH_VERS 0x02060003
#define QUAL_RECALIB_STAT_VERS 0x02060002
#define QUAL_RECALIB_STAT_VERS 0x02060003
#define READ_FILTER_REDACT_VERS 0x02060002
#define READ_FILTER_REDACT_VERS 0x02060003
#define REF_VARIATION_VERS 0x02060002
#define REF_VARIATION_VERS 0x02060003
#define VAR_EXPAND_VERS 0x02060002
#define VAR_EXPAND_VERS 0x02060003
#define ABI_DUMP_VERS 0x02060002
#define ABI_DUMP_VERS 0x02060003
#define FASTQ_DUMP_VERS 0x02060002
#define FASTQ_DUMP_VERS 0x02060003
#define ILLUMINA_DUMP_VERS 0x02060002
#define ILLUMINA_DUMP_VERS 0x02060003
#define SFF_DUMP_VERS 0x02060002
#define SFF_DUMP_VERS 0x02060003
#define SAM_DUMP_VERS 0x02060002
#define SAM_DUMP_VERS 0x02060003
#define SRA_PILEUP_VERS 0x02060002
#define SRA_PILEUP_VERS 0x02060003
#define SRA_STAT_VERS 0x02060002
#define SRA_STAT_VERS 0x02060003
#define SRAPATH_VERS 0x02060002
#define SRAPATH_VERS 0x02060003
#define KDBMETA_VERS 0x02060002
#define KDBMETA_VERS 0x02060003
#define MD5CP_VERS 0x02060002
#define MD5CP_VERS 0x02060003
#define RCEXPLAIN_VERS 0x02060002
#define RCEXPLAIN_VERS 0x02060003
#define SCHEMA_REPLACE_VERS 0x02060002
#define SCHEMA_REPLACE_VERS 0x02060003
#define TEST_SRA_VERS 0x02060002
#define TEST_SRA_VERS 0x02060003
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment