Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samtools flags fails with multiple flag parameters, despite help msg #749

Closed
tseemann opened this issue Dec 6, 2017 · 3 comments
Closed

Comments

@tseemann
Copy link

tseemann commented Dec 6, 2017


# claims to take multiple things with [,...]
About: Convert between textual and numeric flag representation
Usage: samtools flags INT|STR[,...]

# works
$ samtools flags 60
0x3c    60      UNMAP,MUNMAP,REVERSE,MREVERSE

# help message and no answer
$ samtools flags 60 43

About: Convert between textual and numeric flag representation
Usage: samtools flags INT|STR[,...]

Flags:
        0x1     PAIRED        .. paired-end (or multiple-segment) sequencing technology
        0x2     PROPER_PAIR   .. each segment properly aligned according to the aligner
        0x4     UNMAP         .. segment unmapped
        0x8     MUNMAP        .. next segment in the template unmapped
        0x10    REVERSE       .. SEQ is reverse complemented
        0x20    MREVERSE      .. SEQ of the next segment in the template is reversed
        0x40    READ1         .. the first segment in the template
        0x80    READ2         .. the last segment in the template
        0x100   SECONDARY     .. secondary alignment
        0x200   QCFAIL        .. not passing quality controls
        0x400   DUP           .. PCR or optical duplicate
        0x800   SUPPLEMENTARY .. supplementary alignment

# lets try the comma it suggested, but it ignores the second one
$ samtools flags 60,43
0x3c    60      UNMAP,MUNMAP,REVERSE,MREVERSE
@dlaehnemann
Copy link

Looks like an unclear documentation to me. I think that the comma only refers to when providing STRs as arguments, whereas you can only supply one INT at a time. I think:

  1. The docs should state something clarifying that it is 1 numeric <-> set of textual, e.g.:
About: Convert numerical flag value into respective set of textual flags, or a set of textual flag into the corresponding numerical flag.
  1. samtools flags 60 43 (outputs help message, 0 exit status) and samtools flags 60,43 (outputs textual set of first numerical flag) should maybe complain about too many arguments being provided, instead of the inconsistent behaviour?

@dkj
Copy link
Member

dkj commented Dec 12, 2017

samtools flags INT and samtools flags STR[,...] suggested doc improvement in Tuesday meeting.

@valeriuo
Copy link
Contributor

Fixed by #1401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants