concat, head-genome, rename, range: descriptions cut or lost, rename -m overwrites, range wraps, concat -F misplaces fill (exit 0)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
The issue gives reproducible examples for concat, head-genome, rename, and range, but names no source files or tests. Start by locating those command implementations and their existing tests, then run the supplied small FASTA cases against each affected command. Done means descriptions are preserved, duplicate rename outputs fail before writing, negative ranges select no records when they end before the first record, and empty concat inputs do not change output.
索引モデルが issue の本文から書いたものです。
説明
Version: seqkit v2.14.0 (bioconda), Linux x86_64
Five problems found with small test files. Each one changes or loses data and
the command exits 0.
concat, head-genome, rename: the description loses its first letter
What happens
When the ID and the description are separated by an even number of spaces or
tabs (2, 4, 6), the first letter of the description is lost.
$ printf '>A two\nACGT\n>B three\nACGT\n' > d.fa
$ seqkit concat d.fa d.fa
>B three|three
ACGTACGT
>A wo|wo
ACGTACGT
$ printf '>a even\nACGT\n>a even\nACGT\n' > rn.fa
$ seqkit rename rn.fa
>a even
ACGT
>a_2 ven
ACGT
In head-genome the cut changes which records are written. With one space,
only a1 is written. With two spaces, both descriptions read as A B, so
a2 is written too:
$ printf '>a1 XA B\nACGT\n>a2 YA B\nACGT\n' > e.fa
$ seqkit head-genome e.fa
>a1 XA B
ACGT
>a2 YA B
ACGT
A one-letter description becomes empty: >a1 A gives
[ERRO] no description: a1.
Expected
The description is all the text after the spaces and tabs that follow the ID.
No letter is lost.
concat, head-genome, rename: --id-regexp or --id-ncbi drops every description
What happens
With any --id-regexp other than the exact default text ^(\S+)\s?, or with
--id-ncbi, every description is empty.
$ printf '>a1 desc one\nACGT\n>a1 desc two\nACGT\n' > r.fa
$ seqkit rename --id-regexp '^(\S+)\s' r.fa
>a1 desc one
ACGT
>a1_2
ACGT
$ seqkit concat --id-regexp '^(\S+)\s' r.fa r.fa
>a1
ACGTACGT
...
$ seqkit head-genome --id-regexp '^(\S+)\s' r.fa
[ERRO] no description: a1
Expected
The description stays the same when the expression finds the ID.
rename -m: two inputs with the same base name write one file
What happens
With -m, the output file name is the input base name. Two inputs with the
same base name (or one file given twice) write the same output file. The
second replaces the first. There is no warning.
$ printf '>x\nAAAA\n' > in/ex.fa
$ printf '>y\nCCCC\n' > in2/ex.fa
$ seqkit rename -m -O o in/ex.fa in2/ex.fa; echo $?
0
$ ls o; cat o/ex.fa
ex.fa
>y
CCCC
Expected
An error before any file is written, and a non-zero exit code.
range: two negative numbers past the start select wrong records
What happens
On a file of 10 records, a range that ends before the first record should
give nothing. The end index wraps around instead.
$ printf '>r%d\nA\n' 1 2 3 4 5 6 7 8 9 10 > ten.fa
$ seqkit range -r -11:-11 ten.fa | grep '>' | tr '\n' ' '
>r1 >r2 >r3 >r4 >r5 >r6 >r7 >r8 >r9 >r10
$ seqkit range -r -100:-95 ten.fa | grep '>' | tr '\n' ' '
>r1 >r2 >r3 >r4 >r5 >r6
Expected
-11:-11 and -100:-95 give no records on a 10-record file. A start before
the first record is cut to record 1, as -15:-8 gives r1 to r3.
concat -f -F: an empty first file moves the fill
What happens
An input file with no records changes the fill when it comes first.
$ printf '>x\nAAA\n>y\nCCC\n' > a.fa
$ printf '>x\nGG\n' > b.fa
$ : > empty.fa
$ seqkit concat -f -F N a.fa b.fa
>x
AAAGG
>y
CCCNN
$ seqkit concat -f -F N empty.fa a.fa b.fa
>x
AAAGGNN
>y
CCCNNNNN
With a.fa empty.fa b.fa, x also gets AAAGGNN.
Expected
A file with no records adds nothing. The output is the same as without it.
- 主要言語
- Go
- スター
- 1.6k
- フォーク
- 188
- 平均マージ
- 5日 12時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
shenwei356/seqkit のほかの issue
-
convert: no range check between Phred encodings, so a wrong --from writes a broken FASTQ (exit 0)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
shenwei356/seqkit#612 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
shenwei356/seqkit#620 ·
-
sliding, merge-slides, mutate, translate, replace: panics, lost windows and wrong output with exit 0オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
shenwei356/seqkit#619 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
shenwei356/seqkit#618 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
shenwei356/seqkit#617 ·
shenwei356/seqkit の issue をすべて見る
似ている issue
-
needs-area
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Azure/typespec-azure#5936 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
Fix mode unpins a reusable workflow call when the same repository is also used as a step actionオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/gh-actions-lock#261 ·
メンテナーはふだん 1 日以内に返信
-
bug documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
labmonkeys-space/nl6#974 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100