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

Converter script for .hic to hseq #4

Merged
merged 6 commits into from
Dec 13, 2024

Conversation

cvaske
Copy link
Collaborator

@cvaske cvaske commented Dec 10, 2024

This script converts the well-established .hic file format into the HoloSeq hseq format using the
straw library. The hic format
stores a symmetric matrix, and the converter only provides the lower
triangle of counts to distinguish it from asymmetric matrices.

The hseq data format is described here:
https://github.com/holoviz-topics/holoSeq/blob/main/docs/HoloSeqOverview.md

Usage:

  1. Install the required dependency:

    pip install hic-straw
    
  2. Download a .hic file. For example, in the series
    GSE207951,
    click on "(custom)" in the table at the bottom, check a single .hic
    file, then click the "Download" button. Untar it.

  3. Run the conversion script:

    python3 scripts/hic2hseq.py input.hic output.hseq.gz
    
  4. Use the output file in the HoloSeq environment to display the matrix:

    panel serve scripts/holoseq_display.py --show --args --inFile output.hseq.gz --size 1000
    

Example Data:

A pre-converted HTAN file for GSM6326543 is
available (530MB)
.

See hseq conversion output of GSM6326543 at holoseq/docs/assets/README_GSM6326543.png

README_GSM6326543

@droumis droumis self-requested a review December 12, 2024 22:44
Copy link
Contributor

@droumis droumis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvaske throwing the review back to you after refactoring and reorganizing into the scripts dir.. please run the conversion now to confirm and then merge if you're happy with this

@droumis droumis changed the title small converter for .hic Converter script for .hic Dec 12, 2024
@droumis droumis changed the title Converter script for .hic Converter script for .hic to hseq Dec 12, 2024
@droumis
Copy link
Contributor

droumis commented Dec 12, 2024

@cvaske, could you also please add a one sentence motivation/context at the top of the PR description for those less aware of this domain

@cvaske cvaske requested a review from droumis December 13, 2024 00:24
@cvaske
Copy link
Collaborator Author

cvaske commented Dec 13, 2024

The script worked great, however I moved the dependency on hic-straw to the pyprojec.toml since we now have a proper package. Requesting review to make sure that's the best place for the dependency.

Copy link
Contributor

@droumis droumis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@droumis droumis merged commit 72e75d1 into holoviz-topics:main Dec 13, 2024
3 checks passed
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 this pull request may close these issues.

2 participants