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

Visualize.py with linear output #241

Open
ljwharbers opened this issue Sep 20, 2024 · 1 comment
Open

Visualize.py with linear output #241

ljwharbers opened this issue Sep 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ljwharbers
Copy link

Hi,

Just wanted to bring to the attention here that visualize.py currently only works for the 'standard' wide output that is the default. On data that is run with --counts_format linear, the tool will crash with the following error (whiel trying to read in genes).

$ visualize.py . --gene_list ../genes.txt --counts

/some/path/isoquant-3.6.0-0/src/file_utils.py:25: SyntaxWarning: invalid escape sequence '\d'
  file_names.sort(key=lambda s: [int(t) if t.isdigit() else t.lower() for t in re.split('(\d+)', s)])
File ./OUT/OUT.read_assignments.tsv.gz was decompressed to ./OUT/OUT.read_assignments.tsv.
Traceback (most recent call last):
  File "/some/path/visualize.py", line 184, in <module>
    main()
  File "/some/path/visualize.py", line 95, in main
    updated_gene_dict = dictionary_builder.update_gene_dict(gene_dict, gene_file)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/some/path/isoquant-3.6.0-0/src/post_process.py", line 464, in update_gene_dict
    header = next(reader)
             ^^^^^^^^^^^^
StopIteration

Hopefully you would consider also making it compatible with the linear output format. If not, it would be good to specify in the documentation that only the 'wide' output is supported and check for empty files so the error message would be clearer.

Thanks again for the great tool!

Best,
Luuk

@andrewprzh andrewprzh added the enhancement New feature or request label Sep 20, 2024
@andrewprzh
Copy link
Collaborator

Dear @ljwharbers

Yes, visualizer was not designed to work with the linear format, and the option was introduced later without properly adapting visualize.py. Thank you for bringing our attention - we will improve this functionality.

Best
Andrey

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

No branches or pull requests

2 participants