Skip to content

Conversation

@camiel-m
Copy link
Contributor

Polar determines the dtypes dynamically in read_fragments by reading the first 100 lines. If the chromosome names contain strings that could be integers (e.g "1" instead of "chr1"), then the dtype will be set incorrectly. Best to set dtype in the function call instead of through .with_columns.

@ghuls
Copy link
Member

ghuls commented Aug 29, 2024

read_fragments_from_file should be removed and fragments.read_fragments_to_pyranges should be used instead:

https://github.com/aertslab/pycisTopic/blob/d6a2f8c832c14faae07def1d3ad8755531f50ad5/src/pycisTopic/fragments.py#L21C1-L164C27

@SeppeDeWinter
Copy link
Collaborator

Thanks Camiel & Gert!

@camiel-m I just pushed some changes to your fork.
To give some context, this code was already updated a while ago but not actually used ;).

@camiel-m can you test my changes to make sure the fragment files are read correctly?

Best,

Seppe

@camiel-m
Copy link
Contributor Author

@SeppeDeWinter It worked fine for me.

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.

3 participants