Inconsistent number of fields in info output file

Open
#586 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python

Research direction

Reproduce the reported cutadapt command with the example test.fq and inspect the generated test.info columns. Read the info-file format documentation linked in the issue, then identify the relevant CLI output path and tests. Done means --info-file emits a consistent, documented column structure for reads with and without an adapter.

Written by the indexing model from the issue text.

Description

cutadapt 3.5, python 3.9.7, installed with conda.

The file produced with option --info-file has 4 columns if the adapter was not found and 11 if it was found. It would be useful to always have the same number of columns, maybe even included the 12th column described in the documentation. This would make it easier to process the output using e.g. x = line.split('\t')[10].

Example test.fq:

@r1
TTTAACCTTCGCGCCGCGCCCCGGCCCGGG
+
IIIIIIIIIIIIIIIIIIIIIIIIIIIIII
@r2
TTTAAGCTTCGCGCCGCGCCCCGGCCCGGG
+
IIIIIIIIIIIIIIIIIIIIIIIIIIIIII

Run and note the different number of columns in test.info:

cutadapt -g '^NNNAAGCTTC' --info-file test.info test.fq > /dev/null

cat -vet test.info
r1^I-1^ITTTAACCTTCGCGCCGCGCCCCGGCCCGGG^IIIIIIIIIIIIIIIIIIIIIIIIIIIIIII$
r2^I0^I0^I10^I^ITTTAAGCTTC^IGCGCCGCGCCCCGGCCCGGG^I1^I^IIIIIIIIIII^IIIIIIIIIIIIIIIIIIIII^I$

Thanks again!

Dominant language
Python
Stars
587
Forks
144
Avg merge
2h 37m
Merged PRs (30d)
1

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.

More from marcelm/cutadapt

All issues in marcelm/cutadapt

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.