Skip to content
Merged
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
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file is part of abismal
#
# Copyright (C) 2018-2020: Andrew D. Smith
# Copyright (C) 2018-2023: Andrew D. Smith and Guilherme de Sena Brandine
#
# Authors: Andrew D. Smith
# Authors: Andrew D. Smith and Guilherme de Sena Brandine
#
# This is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ If you don't have adminstrator privileges, there are other options.
If you have the `libhts-dev` installed, to build `abismal` the
following should work:
```console
$ wget https://github.com/smithlabcode/abismal/releases/download/v3.1.1/abismal-3.1.1.tar.gz
$ tar -zxvf abismal-3.1.1.tar.gz
$ cd abismal-3.1.1
$ wget https://github.com/smithlabcode/abismal/releases/download/v3.2.0/abismal-3.2.0.tar.gz
$ tar -zxvf abismal-3.2.0.tar.gz
$ cd abismal-3.2.0
$ mkdir build && cd build
$ ../configure --prefix=/where/you/want/abismal
$ make
Expand Down Expand Up @@ -84,9 +84,9 @@ be needed below. If you don't already have `abismal` downloaded, the next
step is to download it. Here we will assume you are using a release rather
than a clone. To build from a clone involves at least one more step.
```console
$ wget https://github.com/smithlabcode/abismal/releases/download/v3.1.1/abismal-3.1.1.tar.gz
$ tar -zxvf abismal-3.1.1.tar.gz
$ cd abismal-3.1.1
$ wget https://github.com/smithlabcode/abismal/releases/download/v3.2.0/abismal-3.2.0.tar.gz
$ tar -zxvf abismal-3.2.0.tar.gz
$ cd abismal-3.2.0
```
Finally, these steps build the software:
```console
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl This file is part of abismal
dnl
dnl Copyright (C) 2019-2022: Andrew D. Smith and Guilherme de Sena Brandine
dnl Copyright (C) 2019-2023: Andrew D. Smith and Guilherme de Sena Brandine
dnl
dnl Authors: Andrew D. Smith and Guilherme de Sena Brandine
dnl
Expand All @@ -14,7 +14,7 @@ dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.

AC_INIT([abismal], [3.1.1], [andrewds@usc.edu],
AC_INIT([abismal], [3.2.0], [andrewds@usc.edu],
[abismal], [https://github.com/smithlabcode/abismal])

dnl the config.h is not currently #included in the source, and only
Expand Down
9 changes: 4 additions & 5 deletions data/md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
b9699416969133224b620f05af97ac90 tests/reads_pbat_pe_1.fq
12c9d36ab3bf2b9ecb5683d7a093a10d tests/reads_pbat_pe_2.fq
3edbf931e6f0da55a50b24e01a975565 tests/reads_pbat_pe.mstats
51b695cd3aeb3cead392821628acf0f1 tests/reads_pbat_pe.sam
58d6c1157b187a66d43087fe3e70a38c tests/reads_pbat.sam
8e5ad0faefe241de9c2c5748e005e2e8 tests/reads_pe_1.fq
4ebacfec717182fafce46b037591b228 tests/reads_pe_2.fq
072a7df62d45dc3d3d4350d79efc9ca1 tests/reads_pe.mstats
56318794f9e55549c9050a636161e883 tests/reads_pe.sam
e66339e591563032af436ca2af9b75b1 tests/reads_rpbat_pe_1.fq
aed5705c4a99601d5799fc8ee42af5b2 tests/reads_rpbat_pe_2.fq
da00a63969113e09406b61cbe280daa5 tests/reads_rpbat_pe.mstats
7f3f547ff06296ef2fcc7d1cb8169766 tests/reads_rpbat_pe.sam
50ec2af709639fa242654f9b3a46981b tests/reads.sam
3ba5a1c4c420ca7a2dbd88290033c3bc tests/tRex1.idx
cd4a9d6b8c9b00254c53e3e5e5cd249e tests/reads_pbat_pe.sam
c466e11e3ed0bfe32c4baa1f16096a95 tests/reads_pe.sam
c5bf84d3e4e01e27804d39321569c11c tests/reads_rpbat_pe.sam
9cab40d2130b4eb9d95f5694d184a5e1 tests/reads.sam
8 changes: 4 additions & 4 deletions docs/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ substantially.

Run the following commands to install abismal
```
wget https://github.com/smithlabcode/abismal/releases/download/v3.1.1/abismal-3.1.1.tar.gz
tar -xvzf abismal-3.1.1.tar.gz
cd abismal-3.1.1
wget https://github.com/smithlabcode/abismal/releases/download/v3.2.0/abismal-3.2.0.tar.gz
tar -xvzf abismal-3.2.0.tar.gz
cd abismal-3.2.0
./configure --prefix=$(pwd)
make
make install
Expand Down Expand Up @@ -317,7 +317,7 @@ sequence.
The last line of the headers is a copy of how the program was called
to generate the SAM output, and is of the form
```
@PG ID:ABISMAL VN:3.1.1 CL:"[command-call]"
@PG ID:ABISMAL VN:3.2.0 CL:[command-call]
```
where [command-call] is the shell command used to run abismal.

Expand Down
8 changes: 4 additions & 4 deletions docs/abismal.1
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ Run the following commands to install abismal
.IP
.nf
\f[C]
wget https://github.com/smithlabcode/abismal/releases/download/v3.1.1/abismal-3.1.1.tar.gz
tar -xvzf abismal-3.1.1.tar.gz
cd abismal-3.1.1
wget https://github.com/smithlabcode/abismal/releases/download/v3.2.0/abismal-3.2.0.tar.gz
tar -xvzf abismal-3.2.0.tar.gz
cd abismal-3.2.0
\&./configure --prefix=$(pwd)
make
make install
Expand Down Expand Up @@ -364,7 +364,7 @@ generate the SAM output, and is of the form
.IP
.nf
\f[C]
\[at]PG ID:ABISMAL VN:3.1.1 CL:\[dq][command-call]\[dq]
\[at]PG ID:ABISMAL VN:3.2.0 CL:\[dq][command-call]\[dq]
\f[R]
.fi
.PP
Expand Down
8 changes: 4 additions & 4 deletions docs/abismal.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ <h1 id="description">DESCRIPTION</h1>
<p>absimal was built to map short reads of up to 250 bases. It should successfully map reads of size up to 1 million, but because it uses very short seeds for filtration, the mapping time will increase substantially.</p>
<h1 id="quick-installation">QUICK INSTALLATION</h1>
<p>Run the following commands to install abismal</p>
<pre><code>wget https://github.com/smithlabcode/abismal/releases/download/v3.1.1/abismal-3.1.1.tar.gz
tar -xvzf abismal-3.1.1.tar.gz
cd abismal-3.1.1
<pre><code>wget https://github.com/smithlabcode/abismal/releases/download/v3.2.0/abismal-3.2.0.tar.gz
tar -xvzf abismal-3.2.0.tar.gz
cd abismal-3.2.0
./configure --prefix=$(pwd)
make
make install</code></pre>
Expand Down Expand Up @@ -204,7 +204,7 @@ <h2 id="output-headers">Output headers</h2>
<pre><code>@SQ SN:[chrom-name] LN:[chrom-length]</code></pre>
<p>where [chrom-name] is given by the first word of the chromosome name in the FASTA file (anything after the first white space is deleted), and [chrom-length] is the number of bases in the chromosome sequence.</p>
<p>The last line of the headers is a copy of how the program was called to generate the SAM output, and is of the form</p>
<pre><code>@PG ID:ABISMAL VN:3.1.1 CL:&quot;[command-call]&quot;</code></pre>
<pre><code>@PG ID:ABISMAL VN:3.2.0 CL:&quot;[command-call]&quot;</code></pre>
<p>where [command-call] is the shell command used to run abismal.</p>
<h2 id="output-mapped-lines">Output mapped lines</h2>
<p>Following the header lines, reads that are mapped once (or at least once if the -a flag is used) are reported. Each read is a set of thirteen tab-separated fields as follows.</p>
Expand Down
21 changes: 9 additions & 12 deletions src/abismal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "abismal.hpp"

#include <bamxx.hpp>
#include <config.h>
#include <htslib/bgzf.h>
#include <htslib/hfile.h>
#include <htslib/sam.h>
Expand Down Expand Up @@ -171,9 +172,9 @@ update_max_read_length(size_t &max_length, const vector<string> &reads) {
}

struct se_element { // size = 8
score_t diffs; // 2 bytes
flags_t flags; // 2 bytes
uint32_t pos; // 4 bytes
score_t diffs; // 2 bytes
flags_t flags; // 2 bytes
uint32_t pos; // 4 bytes

se_element(): diffs(MAX_DIFFS), flags(0), pos(0) {}

Expand Down Expand Up @@ -2041,8 +2042,7 @@ file_exists(const string &filename) {
}

static int
abismal_make_sam_header(const ChromLookup &cl, const string program_name,
const string program_version, const int argc,
abismal_make_sam_header(const ChromLookup &cl, const int argc,
const char **argv, bamxx::bam_header &hdr) {
assert(cl.names.size() > 2); // two entries exist for the padding
assert(cl.starts.size() == cl.names.size() + 1);
Expand All @@ -2060,14 +2060,13 @@ abismal_make_sam_header(const ChromLookup &cl, const string program_name,

// chromosome sizes
const size_t n_chroms = names.size();
for (size_t i = 0; i < n_chroms; ++i) {
for (size_t i = 0; i < n_chroms; ++i)
out << "@SQ" << '\t' << "SN:" << names[i] << '\t' << "LN:" << sizes[i]
<< '\n';
}

// program details
out << "@PG" << '\t' << "ID:" << program_name << '\t'
<< "VN:" << program_version << '\t';
out << "@PG" << '\t' << "ID:"
<< "ABISMAL" << '\t' << "VN:" << VERSION << '\t';

// how the program was run
std::ostringstream the_command;
Expand All @@ -2082,7 +2081,6 @@ abismal_make_sam_header(const ChromLookup &cl, const string program_name,
int
abismal(int argc, const char **argv) {
try {
static const string ABISMAL_VERSION = "3.1.1";
bool VERBOSE = false;
bool GA_conversion = false;
bool allow_ambig = false;
Expand Down Expand Up @@ -2248,8 +2246,7 @@ abismal(int argc, const char **argv) {
if (!out) throw runtime_error("failed to open output file: " + outfile);

bamxx::bam_header hdr;
int ret = abismal_make_sam_header(abismal_index.cl, "ABISMAL",
ABISMAL_VERSION, argc, argv, hdr);
int ret = abismal_make_sam_header(abismal_index.cl, argc, argv, hdr);

if (ret < 0) throw runtime_error("error formatting header");

Expand Down