ngless-toolkit / ngless-toolkit/ngless

Using collect on countables from mapstats gives a funny result

Open
#138 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
152
Forks
23
PR merge metrics
No merged PRs in 30d

Description

I have the following code

human_mapped = map(input, reference='hg19')
mapping_statistics = mapstats(human_mapped)
collect(mapping_statistics,
current=sample,
allneeded=samples,
ofile=QCDIR </> 'mapping_to_human.txt')

In the output file I get the following
sampe_1 sample_2 sample_3 sample_4 sample_5
total 39084 0 0 0 0
aligned 745 0 0 0 0
total 0 37051 0 0 0
aligned 0 4615 0 0 0
total 0 0 35219 0 0
aligned 0 0 13042 0 0
total 0 0 0 39876 0
aligned 0 0 0 805 0
total 0 0 0 0 34963
aligned 0 0 0 0 7
unique 744 4600 12994 805 7

I would have expected 3 rows (total, aligned, unique) instead of 11 rows.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the mapstats and collect snippet from the issue and inspect the collect handling for countable mapping statistics. Compare the generated table with the expected three rows—total, aligned, and unique—and use that output difference to locate the relevant implementation or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
bioinformatics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.