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

group with --per-contig unnecessarily requires gene tags #568

Closed
mfansler opened this issue Dec 14, 2022 · 5 comments
Closed

group with --per-contig unnecessarily requires gene tags #568

mfansler opened this issue Dec 14, 2022 · 5 comments

Comments

@mfansler
Copy link
Contributor

The --per-contig flag requires the --per-gene flag, and if outputting a TSV, ends up in this branch of the code:

if options.tsv:
if options.per_gene:
gene = read.get_tag(gene_tag)
else:
gene = "NA"

This results in an error if there are no gene tags. I believe this is unnecessary because the --per-contig flag already entails that gene should be equated to the contig. Namely, we could instead handle the case like:

  if options.tsv:
    if options.per_gene:
      if options.per_contig:
        gene = read.reference_name
      else:
        gene = read.get_tag(gene_tag)
    else:
      gene = "NA"
@IanSudbery
Copy link
Member

I agree. @TomSmithCGAT ?

@TomSmithCGAT
Copy link
Member

Completely agree. From the commits, it looks this code section was not updated when the --per-contig option was added.

Thanks very much @mfansler. Do you want to issue a PR so your contribution is properly attributed?

@mfansler
Copy link
Contributor Author

mfansler commented Jan 3, 2023

@TomSmithCGAT sounds good. Yes, happy to put a PR together.

@akmorrow13
Copy link
Contributor

akmorrow13 commented Feb 28, 2023

fixed with #577

@mfansler
Copy link
Contributor Author

@akmorrow13 thanks! Lost track of this one 😬

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