-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow initial whitespace in FASTA ">" headers
Fixes samtools/samtools#449. Also ensure an empty name works; fixes #258, hat tip @mtmorgan. Add test/faidx.fa test cases, with unnamed sequence, extra whitespace, and tests for previously-fixed blank line-related bugs fixed in 1980e58. Fix memory leaks introduced by 642783e. [NEWS] * fai_build() and samtools faidx now accept initial whitespace in ">" headers (e.g., "> chr1 description" is taken to refer to "chr1")
- Loading branch information
Showing
5 changed files
with
77 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
'\" t | ||
.TH faidx 5 "August 2013" "htslib" "Bioinformatics formats" | ||
.TH faidx 5 "August 2015" "htslib" "Bioinformatics formats" | ||
.SH NAME | ||
faidx \- an index enabling random access to FASTA files | ||
.\" | ||
.\" Copyright (C) 2013 Genome Research Ltd. | ||
.\" Copyright (C) 2013, 2015 Genome Research Ltd. | ||
.\" | ||
.\" Author: John Marshall <[email protected]> | ||
.\" | ||
|
@@ -98,9 +98,8 @@ or other line termination, the newline characters present must be consistent, | |
at least within each reference sequence. | ||
.P | ||
The \fBsamtools\fP implementation uses the first word of the "\fB>\fP" header | ||
line text (i.e., up to the first whitespace character) as the \fBNAME\fP column. | ||
At present, there may be no whitespace between the | ||
">" character and the \fIname\fP. | ||
line text (i.e., up to the first whitespace character, having skipped any | ||
initial whitespace after the ">") as the \fBNAME\fP column. | ||
.SH EXAMPLE | ||
For example, given this FASTA file | ||
.LP | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
> | ||
ATGC | ||
>trailingblank1 | ||
AAATTTGGGCCC | ||
TTTGGGCCCAAA | ||
GGGCCCAAA | ||
|
||
>trailingblank2 with last dna line the same length | ||
AAATTTGGGCCCAAATTTGGGCCC | ||
TTTGGGCCCAAATTTGGGCCCAAA | ||
GGGCCCAAATTTGGGCCCAAATTT | ||
|
||
> foo | ||
TGCATG | ||
CA | ||
> bar description | ||
TTTTAAAA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters